From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: hao.a.wu@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by groups.io with SMTP; Wed, 26 Jun 2019 19:49:54 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2019 19:49:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,422,1557212400"; d="scan'208";a="188887882" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga002.fm.intel.com with ESMTP; 26 Jun 2019 19:49:54 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Jun 2019 19:49:54 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 26 Jun 2019 19:49:53 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.185]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.246]) with mapi id 14.03.0439.000; Thu, 27 Jun 2019 10:49:51 +0800 From: "Wu, Hao A" To: "devel@edk2.groups.io" , Ard Biesheuvel , Marcin Wojtas CC: "Albecki, Mateusz" Subject: Re: [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol Thread-Topic: [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol Thread-Index: AQHVLCCOYRF7ds7YNkuv+BQelSkG46auxQMg Date: Thu, 27 Jun 2019 02:49:50 +0000 Message-ID: References: <20190626131003.3088-1-mateusz.albecki@intel.com> In-Reply-To: <20190626131003.3088-1-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 Except a minor comment in patch 2/2, the series looks good to me. Hello Ard and Marcin, please let me know if you have comments on this series. If no other feedbacks, I plan to push the change at early next week. Best Regards, Hao Wu > -----Original Message----- > From: Albecki, Mateusz > Sent: Wednesday, June 26, 2019 9:10 PM > To: devel@edk2.groups.io > Cc: Albecki, Mateusz; Wu, Hao A > Subject: [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision > 3 of SdMmcOverrideProtocol >=20 > To allow platform greater control over the bus settings for SD card and > eMMC card we have added a new notify phase to SdMmcOverrideProtocol > called GetOperatingParam. > This phase is signaled before SD card/eMMC initialization and allows plat= form > to tweak the values in new structure called > EDKII_SD_MMC_OPERATING_PARAMETERS which allows to configure bus > width, clock frequency and driver strength. > Other bus parameters can be configured by overriding host controller > capabilities. >=20 > Changes in v2: > - Fixed stylistic issues and documentation issues pointed out in v1 revie= w > - Changed bus width to be UINT8 > - Reordered the SD_MMC_BUS_MODE to fix problem with driver never > choosing the DDR50 speed mode > - Fixed the bug with driver not switching the controller into correct dri= ver > strength for SD card slots > - Fixed bug with the driver not considering driver strength support for S= D > card slots > - Fixed bug with driver choosing SdMmcMmcHsSdr if card doesn't support > frequencies above 26MHz > - Fixed bug with driver choosing driver strength for legacy speed modes >=20 > Changes in v3: > - Changed BusWidth field of EDKII_SD_MMC_OPERATING_PARAMETERS to > UINT16 >=20 > Changes in v4 > - Fixed typos and ordering in SD_MMC_BUS_MODE(this time for real) > - Fixed non boolean types usage in if statements > - Fixed code that checks if there was an error in switch response for SD = card. > The code has been updated to check if switch failed due to function being > busy >=20 > Tests: > - OS boot from eMMC without SdMmcOverride protocol installed > - OS boot from eMMC with SdMmcOverride installed and clock frequency > lowered to 100MHz in HS200 > - OS boot from eMMC with driver strength changed to Type1 > - OS boot from eMMC in HS400 without override protocol installed > - SD card enumeration in UEFI shell on default speed and high speed(non > UHS-I) with SdMmcOverride installed and UHS-I disabled in capability > - SD card enumeration in UEFI shell on default speed and high speed(non > UHS-I) with no Override protocol(legacy card used) >=20 >=20 > Cc: Hao A Wu >=20 >=20 > Albecki, Mateusz (1): > MdeModulePkg/SdMmcHcDxe: Implement revision 3 of > SdMmcOverrideProtocol >=20 > Mateusz Albecki (1): > MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase >=20 > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 512 > +++++++++++++++------ > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c | 410 > ++++++++++++++--- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 52 ++- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h | 18 +- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 34 ++ > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h | 19 + > MdeModulePkg/Include/Protocol/SdMmcOverride.h | 60 ++- > 7 files changed, 867 insertions(+), 238 deletions(-) >=20 > -- > 2.14.1.windows.1