From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web12.5199.1646878520110359241 for ; Wed, 09 Mar 2022 18:15:20 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=lOyTuLnt; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646878520; x=1678414520; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=B0SdmZ4yWIE9GwCq9o6tYCiKusmC01rQt7nXEeZRt50=; b=lOyTuLntrYAbyDLDx0T/AYt/9KaZ6M4nkunuiTZluC6hOk40L2Sao3vb L0zZix7kNDlpErqsdM69mLNTybRUUsLPEOlDZogU29F20zlO1FP+Rgssy Z7ToaHOGwOK4s+vj7X55vjiWUfLGnoypyXgqNAomVd/h+/AYUkmQWC7wx MIk64qr7D/C55/HkY2gLEkGmWuKOJq2lFP98KwbS+IMOqLdTULmkPLnB3 NRYBh/ytSarUnIYfJc7wvu3grw6UeyhecOp7El9t1lJQo8eee80reN9we MYklkULHGg+V9V9vd3b5d/5TpNRPibtj00cFxq0oc3I4lrwRpH0hvqFCn Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10281"; a="252709710" X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="252709710" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 18:15:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,169,1643702400"; d="scan'208";a="596497447" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga008.fm.intel.com with ESMTP; 09 Mar 2022 18:15:19 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Mar 2022 18:15:19 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Mar 2022 18:15:18 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Wed, 9 Mar 2022 18:15:18 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Wed, 9 Mar 2022 18:15:13 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B5jirUlWTERwEEplbJY3aeRY0w/aphdMUET8ytV05qdspp/EjsL2XRFjsOg7R41dGysLdZrfyrJKAFv9sxnhJn+sDH3KS8nWgkpKhv/RmskKOG7f+SbVJKdx+gyqmvgzErz5clz0PROSqe+tqMrzgFwdo5woK8dBlbjgHpcMfPswrKbM42ET+0TJ8eVGlzXQ/jhFl6H3z/I5ncNwD6b3pxTk5dZYA6PMuEc3Jj+lrwaWf91y91aMovvYxywug7V8WxtawN7ocBRiRX8sr1WTEqCX1kkGGB/FWET3CpIMDpbHsABOllLk5vCsspmHBNMGQ4WYKQFP27SqzQ/dkwXHFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SxrCQaWZa0sfjcyyBQSzs/yJDj6ZGD8wmLrhApJnWvo=; b=TIb84s6lYLzauh81Z6o88GVX03GQ4ArugqutXw4AqJ/nEs7Qcutw5T0zyR/nZPK+b7ZUKzzKt9JqKeVptVjJCmnJ/FtIBc3vIytcUWlkfEdR+FDsevoT3/KmXuvw9/dvXCQszqPHWuUlNgHoiQgSc37WNDvXxJ6XeT2fpHoEi3LmpVTIUGPzPEwg4FjHOo3AEbeYpLpDmQBb3OZUa7h4Vyw9rC5H0uCIMu3RqyScOcx4VoTr6ZAkRLqLXCeZUzaA6VJBNRfHIixKYBWz9y64b85N0AXpQwPBByrZNquDpe2OWDhZRjzZ4tovoBIjSzepGLzwGEUmIOt+e43AFbWG+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by BL0PR11MB3473.namprd11.prod.outlook.com (2603:10b6:208:6e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5061.21; Thu, 10 Mar 2022 02:15:09 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::2dd0:9ba8:a8c:fc96]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::2dd0:9ba8:a8c:fc96%3]) with mapi id 15.20.5038.027; Thu, 10 Mar 2022 02:15:09 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Wu, Hao A" , "Bandaru, Purna Chandra Rao" CC: "Albecki, Mateusz" , "Gao, Liming" , "Liu, Zhiguang" Subject: Re: [edk2-devel] [PATCH] [PATCH v3] MdeModulePkg: Add bRefClkFreq card attribute programming support Thread-Topic: [edk2-devel] [PATCH] [PATCH v3] MdeModulePkg: Add bRefClkFreq card attribute programming support Thread-Index: AQHYMubSdP1xQvu5jEOjaVFlt2Az16y2P92AgAGjgKA= Date: Thu, 10 Mar 2022 02:15:09 +0000 Message-ID: References: <4014f68bb8428892e14f15efe152805f95d9b829.1646741878.git.purna.chandra.rao.bandaru@intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fb9fb509-20cb-4fa4-7c5f-08da023bcd53 x-ms-traffictypediagnostic: BL0PR11MB3473:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 2nOrsGy9yE8uWIAyKDEQlq5U0ml8IYDCAdJIL7+qVjcG/tF2ctFwbsCQKN1NXnaIIm03oeBInaYbk3rRHLeQF61UXCmY7XlPVysiMjgQ60IC0CeM8bjhtuTKWJBZpFkW1wrznqeGNPQdXlVac2tjtchopIXzkQA5WPblSgae3u5iSsq8Kg5O7ZMUKAJ/fWg/gasPywhJHOJOpZxmgvGN7HKgIW0tAsXZrBZIMYrR2tHIdr65ZANVgMAqz6tL5Kb3YI33IUBVRUyHDM67GSdWhJF5b+tc82VoB+05BC+JBGqe8vmr/ioeH50VeHlwWRFbrzxiheckNOhWU9PJ7/3nBTg3dkie631MXeJ8sAyk3Wsnuv80ibYCAaJCuQ/lgwCLspRwMibj2hufkNxJtvyjipeqZZEBt3nJYutXC+abNX5koaD011asIidLUJZrbaXHqM1rdBllYDtrLcYDLHKSg/lv++C/jFVXQYWL9A82qa0dkXL8ijFGGIM7JTQY+rXeiwfxdl5bU4I0r+lvPiQgwxUzD+jTmJYKYdbfi5xqKdt3VJoVT5PoiZ+DRQoA64W61sdkiDR8ANc6ezXhM3pOSb5GfkNe2G+u6XaZavZ2EJTxAoCkubsJO/nynlTcA5GlaAixaBzkKh3d/nPPp0lpAGASClTBl1vKfTjfx4QWCdJbQiMV2vpdNh0GIGBclvlVs1JAPJSbrjfFELI2wRsGABuQ/JlJ4R4/Z6cYJDzk/hEdmNmQ7GGeVoCoIZ6IF8fnDt4cWEXjHA1BJv+x2QgkRJzm6NWrPEge+RoFiBsw13yHGMZKqbq3MFMRsPPvnR2i7p1iNkYH6UJ/h0EuWStBIfgyPcE3yHYaFbX4xOwkBLY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(122000001)(5660300002)(82960400001)(52536014)(8936002)(2906002)(38100700002)(71200400001)(107886003)(7696005)(86362001)(9686003)(33656002)(53546011)(6506007)(508600001)(966005)(45080400002)(8676002)(38070700005)(4326008)(66446008)(316002)(55016003)(64756008)(6636002)(83380400001)(110136005)(26005)(76116006)(54906003)(186003)(66476007)(66946007)(66556008)(145543001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?j2fmVxAYtOurstBZulJgR9BguLC28k9hVK8OXNeH23Z0yL8+nZsJZDUZpMC4?= =?us-ascii?Q?YHjMv1Vwpt8xCOlk24zNjFQs2vbnruIy4Ewd+WA7ZBoaeGln6s4UqJ0BP9u4?= =?us-ascii?Q?uLj4O+u+6Y3unkDpH31bV/A0nSVI+9bS8qv9HH5raRQIrcCcUqo9H6TR13zb?= =?us-ascii?Q?uE+KCpOrveQO0bij0mfVzJh+PIz4BcXNI0YlF9ucgTDzbsdar8tq30x4T78T?= =?us-ascii?Q?GzYvhMGBqOeD7qSpJPY3AZpUs6DAEVg4vsDADq9aCnUa8MOPSHWM4thQKgHg?= =?us-ascii?Q?+dEubhaVNqRkNt4bTXJ50iNXx1+qJKDCskwFBbtVmrvXTBQ9idaaJJm7CmUn?= =?us-ascii?Q?1/InZ4ZuLi3N2NLv7dkZGbQPpCc33fkeyI+OZHWWPbYSe9YMcGoPmUIT9PUa?= =?us-ascii?Q?fD750VLQWIQP1izsjEeyTkpINtqQW/EeOR4SOsUJqxJ676n+Kg93Nk08Pi/r?= =?us-ascii?Q?GcDixbkCpDw/gKRTp+gmR7dBlA/FeNRcOSIJD0DUBxC28ZADVQUGZoFeradm?= =?us-ascii?Q?rjKA/jAeoFC0GAzD1nno4/aLAklu5nRmcfHezjtJXaWQRbW+8b2G/J/hmoje?= =?us-ascii?Q?dqDwyvZWj2iNEcYhmOvJ7VJeBS1Gwc5ERYKUWR/QIHFO2LFQeZ44jPpStTrA?= =?us-ascii?Q?lMzUVCB2yu95qaCO/B5O9xYM+h3Hk+jHpj8CXAUEZ7ORZvCiIeqexlfk9YWj?= =?us-ascii?Q?ks6td2/OHiFmqQC56eGRB2TQNGuKx8H3wnXYf6xwI1IP6Jufui9dBswwCURb?= =?us-ascii?Q?ygT2O69MTCPyj2dyfihfTvF0z/9NkKyUcUKaeO+OnQN+ZWEfJoMDk97JBzGz?= =?us-ascii?Q?9YSNgyZJ8rM7bbhowNECRnG+vinRpAKjeBa1BAiwXOFqV55HOQszkKc0B8JD?= =?us-ascii?Q?U4278Qxl029jahqDLoQgzUySQzmT+S07lTOWquTDHMGbcSTaQ1suQgWbVr8B?= =?us-ascii?Q?yggCGOZFNjkMIGrFKyADpZpkG7gUEEQOyhF9FPWaGPwcgLrNYRVRzc8TVEM/?= =?us-ascii?Q?m8erfjQIXUqx2KpkfB7+L1ZRedhMs0rQHrt9J03bfSpBodV+JUNyEan5RrRy?= =?us-ascii?Q?oGeOXiHr2yCDs1V4ErXMspkuEx6zHVVcaLRbYj16n5PsmPZ3/ICPkIvjdjgf?= =?us-ascii?Q?X6kJv9YLjm3XlQ1KU68cS51lq12KHKwKNNMIDggeJSTOvf6w3UzpVpITTBvQ?= =?us-ascii?Q?9CFZcj7neyE8o852tJikHFdLWAC682970nwEmn5rV4DZ5o+eMfSMIbrbj81F?= =?us-ascii?Q?JpwaK74gxTKI4VBJReLOuqY00F2Y4011jnvMb+5hyjYGdVOswUlGjPzS8k7r?= =?us-ascii?Q?0oj29qWtnMemS4RTT9S5pp/plVVIQO2iY6QjYy7vFG5pewrTxbarliCIioW2?= =?us-ascii?Q?8aHB3meAtOieFECIoI3NR6qxRf7Dti7YiwOpkjFVisZ+HNwCfsqTYunRi2br?= =?us-ascii?Q?/y3OSDt2RaeSocYubO2110KUG5C+9izR?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb9fb509-20cb-4fa4-7c5f-08da023bcd53 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Mar 2022 02:15:09.6223 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: S3cu404l/+frv/AfDR+dJdn7Wm3snRMLq7nGgJnpZWB5TVykJEu/Q80ndcqrxSjB/3KRFXqmKjEDveMJD3yDrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR11MB3473 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed via: PR - https://github.com/tianocore/edk2/pull/2608 Commit - https://github.com/tianocore/edk2/commit/f06941cc46d002f66875b6f2f= 711fa3df2775da4 Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wu, Hao > A > Sent: Wednesday, March 9, 2022 9:14 AM > To: Bandaru, Purna Chandra Rao ; > devel@edk2.groups.io > Cc: Albecki, Mateusz ; Gao, Liming > ; Liu, Zhiguang > Subject: Re: [edk2-devel] [PATCH] [PATCH v3] MdeModulePkg: Add > bRefClkFreq card attribute programming support >=20 > Thanks. > Reviewed-by: Hao A Wu >=20 > Best Regards, > Hao Wu >=20 > > -----Original Message----- > > From: Bandaru, Purna Chandra Rao > > > Sent: Tuesday, March 8, 2022 8:20 PM > > To: devel@edk2.groups.io > > Cc: Bandaru, Purna Chandra Rao ; > > Wu, Hao A ; Albecki, Mateusz > > ; Gao, Liming ; > > Liu, Zhiguang > > Subject: [PATCH] [PATCH v3] MdeModulePkg: Add bRefClkFreq card > > attribute programming support > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3851 > > > > When the UFS card comes out of Manufacturer, bRefClkFreq attribute is > > set to 1h on the UFS card as per the Manufacturer Default Value > > specified by the spec JESD220*. However, depends on the UFS host > > system environment, it need to be set to the correct value. > > > > Reference Clock Frequency value > > 0h:19.2 MHz > > 1h: 26 MHz > > 2h: 38.4 MHz > > 3h: Obsolete > > Others: Reserved > > > > Cc: Wu Hao A > > Cc: Albecki Mateusz > > Cc: Liming Gao > > Cc: Zhiguang Liu > > > > Signed-off-by: Purna Chandra Rao Bandaru > > > > --- > > .../Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 70 ++++++++++++++++--- > > .../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 10 +-- > > .../Protocol/UfsHostControllerPlatform.h | 15 +++- > > 3 files changed, 74 insertions(+), 21 deletions(-) > > > > diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > > b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > > index 4c2d6ae27f..dc78e09678 100644 > > --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > > +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > > @@ -1,6 +1,6 @@ > > /** @file > > > > - Copyright (c) 2014 - 2021, Intel Corporation. All rights > > reserved.
> > + Copyright (c) 2014 - 2022, Intel Corporation. All rights > > + reserved.
> > Copyright (c) Microsoft Corporation.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > @@ -834,15 +834,17 @@ UfsPassThruDriverBindingStart ( > > IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath > > ) > > { > > - EFI_STATUS Status; > > - EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc; > > - UFS_PASS_THRU_PRIVATE_DATA *Private; > > - UINTN UfsHcBase; > > - UINT32 Index; > > - UFS_UNIT_DESC UnitDescriptor; > > - UFS_DEV_DESC DeviceDescriptor; > > - UINT32 UnitDescriptorSize; > > - UINT32 DeviceDescriptorSize; > > + EFI_STATUS Status; > > + EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc; > > + UFS_PASS_THRU_PRIVATE_DATA *Private; > > + UINTN UfsHcBase; > > + UINT32 Index; > > + UFS_UNIT_DESC UnitDescriptor; > > + UFS_DEV_DESC DeviceDescriptor; > > + UINT32 UnitDescriptorSize; > > + UINT32 DeviceDescriptorSize; > > + EDKII_UFS_CARD_REF_CLK_FREQ_ATTRIBUTE Attributes; > > + UINT8 RefClkAttr; > > > > Status =3D EFI_SUCCESS; > > UfsHc =3D NULL; > > @@ -917,6 +919,54 @@ UfsPassThruDriverBindingStart ( > > goto Error; > > } > > > > + if ((mUfsHcPlatform !=3D NULL) && > > + ((mUfsHcPlatform->RefClkFreq =3D=3D EdkiiUfsCardRefClkFreq19p2Mh= z) > || > > + (mUfsHcPlatform->RefClkFreq =3D=3D EdkiiUfsCardRefClkFreq26Mhz)= || > > + (mUfsHcPlatform->RefClkFreq =3D=3D > > + EdkiiUfsCardRefClkFreq38p4Mhz))) { > > + RefClkAttr =3D UfsAttrRefClkFreq; > > + Attributes =3D EdkiiUfsCardRefClkFreqObsolete; > > + Status =3D UfsRwAttributes (Private, TRUE, RefClkAttr, 0, 0, (= UINT32 > > *)&Attributes); > > + if (!EFI_ERROR (Status)) { > > + if (Attributes !=3D mUfsHcPlatform->RefClkFreq) { > > + Attributes =3D mUfsHcPlatform->RefClkFreq; > > + DEBUG ( > > + (DEBUG_INFO, > > + "Setting bRefClkFreq attribute(%x) to %x\n 0 -> 19.2 > > + Mhz\n 1 -> 26 > > Mhz\n 2 -> 38.4 Mhz\n 3 -> Obsolete\n", > > + RefClkAttr, > > + Attributes) > > + ); > > + Status =3D UfsRwAttributes (Private, FALSE, RefClkAttr, 0, 0, > > + (UINT32 > > *)&Attributes); > > + if (EFI_ERROR (Status)) { > > + DEBUG ( > > + (DEBUG_ERROR, > > + "Failed to Change Reference Clock Attribute to %d, Status= =3D %r \n", > > + mUfsHcPlatform->RefClkFreq, > > + Status) > > + ); > > + } > > + } > > + } else { > > + DEBUG ( > > + (DEBUG_ERROR, > > + "Failed to Read Reference Clock Attribute, Status =3D %r \n", > > + Status) > > + ); > > + } > > + } > > + > > + if ((mUfsHcPlatform !=3D NULL) && (mUfsHcPlatform->Callback !=3D NUL= L)) { > > + Status =3D mUfsHcPlatform->Callback (Private->Handle, > > EdkiiUfsHcPostLinkStartup, &Private->UfsHcDriverInterface); > > + if (EFI_ERROR (Status)) { > > + DEBUG ( > > + (DEBUG_ERROR, > > + "Failure from platform driver during > > + EdkiiUfsHcPostLinkStartup, Status > > =3D %r\n", > > + Status) > > + ); > > + return Status; > > + } > > + } > > + > > // > > // UFS 2.0 spec Section 13.1.3.3: > > // At the end of the UFS Interconnect Layer initialization on both > > host and device side, diff --git > > a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c > > b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c > > index eba35cc669..4a9fa01e7d 100644 > > --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c > > +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c > > @@ -2,7 +2,7 @@ > > UfsPassThruDxe driver is used to produce EFI_EXT_SCSI_PASS_THRU > > protocol interface > > for upper layer application to execute UFS-supported SCSI cmds. > > > > - Copyright (c) 2014 - 2019, Intel Corporation. All rights > > reserved.
> > + Copyright (c) 2014 - 2022, Intel Corporation. All rights > > + reserved.
> > Copyright (c) Microsoft Corporation.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > @@ -1970,14 +1970,6 @@ UfsDeviceDetection ( > > return EFI_DEVICE_ERROR; > > } > > } else { > > - if ((mUfsHcPlatform !=3D NULL) && (mUfsHcPlatform->Callback !=3D= NULL)) > { > > - Status =3D mUfsHcPlatform->Callback (Private->Handle, > > EdkiiUfsHcPostLinkStartup, &Private->UfsHcDriverInterface); > > - if (EFI_ERROR (Status)) { > > - DEBUG ((DEBUG_ERROR, "Failure from platform driver during > > EdkiiUfsHcPostLinkStartup, Status =3D %r\n", Status)); > > - return Status; > > - } > > - } > > - > > return EFI_SUCCESS; > > } > > } > > diff --git a/MdeModulePkg/Include/Protocol/UfsHostControllerPlatform.h > > b/MdeModulePkg/Include/Protocol/UfsHostControllerPlatform.h > > index faa82d0c4e..32e9f6488c 100644 > > --- a/MdeModulePkg/Include/Protocol/UfsHostControllerPlatform.h > > +++ b/MdeModulePkg/Include/Protocol/UfsHostControllerPlatform.h > > @@ -1,7 +1,7 @@ > > /** @file > > EDKII_UFS_HC_PLATFORM_PROTOCOL definition. > > > > -Copyright (c) 2019, Intel Corporation. All rights reserved.
> > +Copyright (c) 2019 - 2022, Intel Corporation. All rights > > +reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > > > **/ > > @@ -11,7 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > > > > #include > > > > -#define EDKII_UFS_HC_PLATFORM_PROTOCOL_VERSION 1 > > +#define EDKII_UFS_HC_PLATFORM_PROTOCOL_VERSION 2 > > > > extern EFI_GUID gEdkiiUfsHcPlatformProtocolGuid; > > > > @@ -83,6 +83,13 @@ typedef enum { > > EdkiiUfsHcPostLinkStartup > > } EDKII_UFS_HC_PLATFORM_CALLBACK_PHASE; > > > > +typedef enum { > > + EdkiiUfsCardRefClkFreq19p2Mhz, > > + EdkiiUfsCardRefClkFreq26Mhz, > > + EdkiiUfsCardRefClkFreq38p4Mhz, > > + EdkiiUfsCardRefClkFreqObsolete > > +} EDKII_UFS_CARD_REF_CLK_FREQ_ATTRIBUTE; > > + > > /** > > Callback function for platform driver. > > > > @@ -118,6 +125,10 @@ struct _EDKII_UFS_HC_PLATFORM_PROTOCOL { > > /// for host controller. > > /// > > EDKII_UFS_HC_PLATFORM_CALLBACK Callback; > > + /// > > + /// Reference Clock Frequency Ufs Card Attribute that need to be > > + set in > > this Ufs Host Environment. > > + /// > > + EDKII_UFS_CARD_REF_CLK_FREQ_ATTRIBUTE RefClkFreq; > > }; > > > > #endif > > -- > > 2.31.1.windows.1 >=20 >=20 >=20 >=20 >=20