From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: hao.a.wu@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Mon, 24 Jun 2019 01:15:56 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jun 2019 01:14:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,411,1557212400"; d="scan'208";a="184060568" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 24 Jun 2019 01:14:54 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 01:14:54 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 24 Jun 2019 01:14:53 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.185]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.76]) with mapi id 14.03.0439.000; Mon, 24 Jun 2019 16:14:51 +0800 From: "Wu, Hao A" To: "Albecki, Mateusz" , "devel@edk2.groups.io" Subject: Re: [PATCH v3 1/2] MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase Thread-Topic: [PATCH v3 1/2] MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase Thread-Index: AQHVKEPIMyFlvpv0wE2QM2K6DuPpWqaqRmlA Date: Mon, 24 Jun 2019 08:14:51 +0000 Message-ID: References: <20190621151205.2444-1-mateusz.albecki@intel.com> <20190621151205.2444-2-mateusz.albecki@intel.com> In-Reply-To: <20190621151205.2444-2-mateusz.albecki@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Albecki, Mateusz > Sent: Friday, June 21, 2019 11:12 PM > To: devel@edk2.groups.io > Cc: Albecki, Mateusz; Wu, Hao A > Subject: [PATCH v3 1/2] MdeModulePkg/SdMmcOverride: Add > GetOperatingParam notify phase >=20 > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1882 >=20 > The new notify phase allows platform to configure additional > bus paramters 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 configur= e > 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. Hello Mateusz, For "Reordered the SD_MMC_BUS_MODE to fix problem with driver never choosing the DDR50 speed mode", it seems to me that the change is not covered by this patch. Did I miss it? Also, a couple of typos: unsuportted -> unsupported choosen -> chosen Others look good to me. Best Regards, Hao Wu >=20 > Cc: Hao A Wu > Signed-off-by: Mateusz Albecki > --- > MdeModulePkg/Include/Protocol/SdMmcOverride.h | 58 > ++++++++++++++++++++++++--- > 1 file changed, 52 insertions(+), 6 deletions(-) >=20 > diff --git a/MdeModulePkg/Include/Protocol/SdMmcOverride.h > b/MdeModulePkg/Include/Protocol/SdMmcOverride.h > index 9c8bf37efd..1cf27008ea 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, 0x= 23, > 0x23 } } >=20 > -#define EDKII_SD_MMC_OVERRIDE_PROTOCOL_VERSION 0x2 > +#define EDKII_SD_MMC_OVERRIDE_PROTOCOL_VERSION 0x3 >=20 > typedef struct _EDKII_SD_MMC_OVERRIDE EDKII_SD_MMC_OVERRIDE; >=20 > -// > -// Bus timing modes > -// > +#define EDKII_SD_MMC_BUS_WIDTH_IGNORE MAX_UINT8 > +#define EDKII_SD_MMC_CLOCK_FREQ_IGNORE MAX_UINT32 > +#define EDKII_SD_MMC_DRIVER_STRENGTH_IGNORE MAX_UINT8 > + > +typedef enum { > + SdDriverStrengthTypeB =3D 0, > + SdDriverStrengthTypeA, > + SdDriverStrengthTypeC, > + SdDriverStrengthTypeD, > + SdDriverStrengthIgnore =3D EDKII_SD_MMC_DRIVER_STRENGTH_IGNORE > +} SD_DRIVER_STRENGTH_TYPE; > + > typedef enum { > + EmmcDriverStrengthType0 =3D 0, > + EmmcDriverStrengthType1, > + EmmcDriverStrengthType2, > + EmmcDriverStrengthType3, > + EmmcDriverStrengthType4, > + EmmcDriverStrengthIgnore =3D > 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 > + // bus width for a given mode. > + // > + UINT8 BusWidth; > + // > + // 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. > + // > + 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; >=20 > /** > - > Override function for SDHCI capability bits >=20 > @param[in] ControllerHandle The EFI_HANDLE of the controller= . > @@ -70,7 +117,6 @@ EFI_STATUS > ); >=20 > /** > - > Override function for SDHCI controller operations >=20 > @param[in] ControllerHandle The EFI_HANDLE of the controller= . > -- > 2.14.1.windows.1