From: "Albecki, Mateusz" <mateusz.albecki@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Wu, Hao A" <hao.a.wu@intel.com>
Subject: Re: [PATCH 1/2] MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase
Date: Thu, 13 Jun 2019 13:56:38 +0000 [thread overview]
Message-ID: <92CF190FF2351747A47C1708F0E09C0875E512E1@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <B80AF82E9BFB8E4FBD8C89DA810C6A093C8E4729@SHSMSX104.ccr.corp.intel.com>
Resending to group.
> -----Original Message-----
> From: Wu, Hao A
> Sent: Monday, June 10, 2019 5:19 AM
> To: Albecki, Mateusz <mateusz.albecki@intel.com>
> Subject: RE: [PATCH 1/2] MdeModulePkg/SdMmcOverride: Add
> GetOperatingParam notify phase
>
> Thanks Mateusz,
>
> Please refer to the comments in patch 2/2 for the reorder in definition
> 'SD_MMC_BUS_MODE'.
>
> Also, some inline comments below:
>
> Best Regards,
> Hao Wu
>
>
> > -----Original Message-----
> > From: Albecki, Mateusz
> > Sent: Monday, June 03, 2019 7:34 PM
> > Cc: Albecki, Mateusz; Wu, Hao A; Albecki
> > Subject: [PATCH 1/2] MdeModulePkg/SdMmcOverride: Add
> GetOperatingParam
> > notify phase
> >
> > The new notify phase allows platform to configure additional bus
> > parameters in addition to parameters that can already be configured
> > with capability override. Specifically we allow to configure bus
> > width, clock frequency and driver strength. If platform doesn't wish
> > to configure some of the parameters it can left it on default values
> > and driver will assume it's standard behavior with respect to those
> parameters.
> > The definition of the SD_MMC_BUS_MODE has been extended to
> incorporate
> > SD card default speed and high speed.
> >
> > Cc: hao.a.wu@intel.com
> > Signed-off-by: Albecki, Mateusz <mateusz.albecki@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > ---
> > MdeModulePkg/Include/Protocol/SdMmcOverride.h | 58
> > ++++++++++++++++++++++++---
> > 1 file changed, 52 insertions(+), 6 deletions(-)
> >
> > diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > index 9c8bf37efd..bb9545c80c 100644
> > --- a/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > +++ b/MdeModulePkg/Include/Protocol/SdMmcOverride.h
> > @@ -16,14 +16,61 @@
> > #define EDKII_SD_MMC_OVERRIDE_PROTOCOL_GUID \
> > { 0xeaf9e3c1, 0xc9cd, 0x46db, { 0xa5, 0xe5, 0x5a, 0x12, 0x4c, 0x83,
> > 0x23,
> > 0x23 } }
> >
> > -#define EDKII_SD_MMC_OVERRIDE_PROTOCOL_VERSION 0x2
> > +#define EDKII_SD_MMC_OVERRIDE_PROTOCOL_VERSION 0x3
> >
> > typedef struct _EDKII_SD_MMC_OVERRIDE EDKII_SD_MMC_OVERRIDE;
> >
> > -//
> > -// Bus timing modes
> > -//
> > +#define EDKII_SD_MMC_BUS_WIDTH_IGNORE MAX_UINT16 #define
> > +EDKII_SD_MMC_CLOCK_FREQ_IGNORE MAX_UINT32 #define
> > +EDKII_SD_MMC_DRIVER_STRENGTH_IGNORE MAX_UINT8
> > +
> > +typedef enum {
> > + SdDriverStrengthTypeB = 0,
> > + SdDriverStrengthTypeA,
> > + SdDriverStrengthTypeC,
> > + SdDriverStrengthTypeD,
> > + SdDriverStrengthIgnore = EDKII_SD_MMC_DRIVER_STRENGTH_IGNORE
> > +} SD_DRIVER_STRENGTH_TYPE;
> > +
> > typedef enum {
> > + EmmcDriverStrengthType0 = 0,
> > + EmmcDriverStrengthType1,
> > + EmmcDriverStrengthType2,
> > + EmmcDriverStrengthType3,
> > + EmmcDriverStrengthType4,
> > + EmmcDriverStrengthIgnore =
> > EDKII_SD_MMC_DRIVER_STRENGTH_IGNORE
> > +} EMMC_DRIVER_STRENGTH_TYPE;
> > +
> > +typedef union {
> > + SD_DRIVER_STRENGTH_TYPE Sd;
> > + EMMC_DRIVER_STRENGTH_TYPE Emmc;
> > +} EDKII_SD_MMC_DRIVER_STRENGTH;
> > +
> > +typedef struct {
> > + //
> > + // The target width of the bus. If user tells driver to ignore it
> > + // or specifies unsuportted width driver will choose highest
> > +supported
>
>
> unsuportted -> unsupported
>
>
> > + // bus width for a given mode.
> > + //
> > + UINT16 BusWidth;
>
>
> After seeing some type changes (from UINT8 to UINT16) for some variables
> in the 2nd patch, I realize that the 'BusWidth' type should be UINT8 here and
> the 'EDKII_SD_MMC_BUS_WIDTH_IGNORE' definition should be
> MAX_UINT8.
>
> I am really sorry for the typo I made in the foil sent to you.
>
>
> > + //
> > + // The target clock frequency of the bus in MHz. If user tells
> > + driver to
> > ignore
> > + // it or specifies unsupported frequency driver will choose highest
> > supported
> > + // clock frequency for a given mode.
> > + //
> > + UINT32 ClockFreq;
> > + //
> > + // The target driver strength of the bus. If user tells driver to
> > + // ignore it or specifies unsupported driver strength, driver will
> > + // default to Type0 for eMMC cards and TypeB for SD cards. Driver
> > strength
> > + // setting is only considered if choosen bus timing supports them.
>
>
> choosen -> chosen
>
> Best Regards,
> Hao Wu
>
>
> > + //
> > + EDKII_SD_MMC_DRIVER_STRENGTH DriverStrength; }
> > +EDKII_SD_MMC_OPERATING_PARAMETERS;
> > +
> > +typedef enum {
> > + SdMmcSdDs,
> > + SdMmcSdHs,
> > SdMmcUhsSdr12,
> > SdMmcUhsSdr25,
> > SdMmcUhsSdr50,
> > @@ -43,10 +90,10 @@ typedef enum {
> > EdkiiSdMmcInitHostPost,
> > EdkiiSdMmcUhsSignaling,
> > EdkiiSdMmcSwitchClockFreqPost,
> > + EdkiiSdMmcGetOperatingParam
> > } EDKII_SD_MMC_PHASE_TYPE;
> >
> > /**
> > -
> > Override function for SDHCI capability bits
> >
> > @param[in] ControllerHandle The EFI_HANDLE of the controller.
> > @@ -70,7 +117,6 @@ EFI_STATUS
> > );
> >
> > /**
> > -
> > Override function for SDHCI controller operations
> >
> > @param[in] ControllerHandle The EFI_HANDLE of the controller.
> > --
> > 2.14.1.windows.1
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
next prev parent reply other threads:[~2019-06-13 13:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190603113346.1288-1-mateusz.albecki@intel.com>
[not found] ` <B80AF82E9BFB8E4FBD8C89DA810C6A093C8E4722@SHSMSX104.ccr.corp.intel.com>
2019-06-13 13:43 ` [PATCH 0/2] Add GetOperatingParam notify phase to SdMmcOverride protocol mateusz.albecki
2019-06-14 1:46 ` Wu, Hao A
2019-06-14 18:44 ` Marcin Wojtas
[not found] ` <20190603113346.1288-2-mateusz.albecki@intel.com>
[not found] ` <B80AF82E9BFB8E4FBD8C89DA810C6A093C8E4729@SHSMSX104.ccr.corp.intel.com>
2019-06-13 13:56 ` Albecki, Mateusz [this message]
[not found] ` <20190603113346.1288-3-mateusz.albecki@intel.com>
[not found] ` <B80AF82E9BFB8E4FBD8C89DA810C6A093C8E473C@SHSMSX104.ccr.corp.intel.com>
2019-06-13 14:38 ` [PATCH 2/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol Albecki, Mateusz
2019-06-14 3:14 ` Wu, Hao A
2019-06-18 15:14 ` Albecki, Mateusz
[not found] ` <15A7C8F163ADE317.25258@groups.io>
2019-06-17 15:11 ` [edk2-devel] " Albecki, Mateusz
2019-06-18 3:23 ` Wu, Hao A
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92CF190FF2351747A47C1708F0E09C0875E512E1@IRSMSX102.ger.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox