From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web09.689.1646788422413914025 for ; Tue, 08 Mar 2022 17:13:42 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=ip9qQxXr; spf=pass (domain: intel.com, ip: 192.55.52.88, 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=1646788422; x=1678324422; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Q3VE9ZsbtpAIbbphLvjq4h/3pxwIVga+OrvDVxGqzm8=; b=ip9qQxXreGexq/DsEyxF92yeXN2NCjruQqo2OdCIk3ZkslT62jJiOJVd rj0/mh0TSF58GYbmGw5U7Y2r9mo+MwQKeR9AI5DfN/Cv/tocdPOTduvtf FziwS8DzFYP91MsNGiEq2jqOtd2DcP/IJKPx0kp2zUUMoSTDq5uXodrBf 0eoUa+x011TYRTXmOPy+V5aR4qwHt+CC3mScEFWs6AjTtd51kyDXiLH54 7Arkk/rEdP/gPemZSKfnKc8Qik5PXFlU9YjXzRnwelnPeeRvz7nC43vI6 uZMK41i54mDq8DyDcdc2A5Dd9tjqNeOIzVhzDpMC0v5GoC2En9p7qgsIJ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10280"; a="279579384" X-IronPort-AV: E=Sophos;i="5.90,165,1643702400"; d="scan'208";a="279579384" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2022 17:13:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,165,1643702400"; d="scan'208";a="547465527" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by fmsmga007.fm.intel.com with ESMTP; 08 Mar 2022 17:13:41 -0800 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 8 Mar 2022 17:13:41 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Tue, 8 Mar 2022 17:13:41 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Tue, 8 Mar 2022 17:13:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nc6GZrQ6EmA5B6pNBx/dsOAHPfkAWl9+Nf32ohcIqU15FJH1GjfbQe9GOVyeU3ceCFzpVBAEja9Z6/Wb4dvUFUfXhLbRDbkZKMWnuYTpBdmAx28vgJHHbBxwvPuGahE8b3OyeY3nCKgtZx+sCY9zffIf6zqmm0UuHRO19mceRl6YrxB2YOLtswIMF+BOTkidY7ciKgoksijDylh9HHQo15RtUm/d3chlDVp+lyTdqVWhG4fuhfl4a5PDo9FRR9tk1FLoMlVJOc09oqwTEiM43V2QttGBMrlpZk4k3er3x2IFlQ9uy1cVO02z1HLj3Y/sZ3aHJSE1HIhX6NGqkwZ6dQ== 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=0KfMhuXErz7fgOBqi4vKLKwI60y636vGkPDpCsyxpVU=; b=FwvRKjKcRMVFtCU5vdAe41ci/YUszOa0hPTzzp4zBorWK2lMKZL1pckCgj2geFHyHuu+70rSS5cYD79cqWdtplhhv/D6Hfdlg03ELLzIyoJJdMo4RBKWFWCiHJ4oZNsUPdR55MRPQ7qbI/A9f5bE3y3f8Vvg3d51AZo74xpo3Fue3c3rmsQYW5izxHAQLLlrTPwLRUhGq6dZTj/UKjRsl2BeyazPehctQyKpnybsHG2weUXrwzWUE8XZ8M/ZWfYRo3hgPONVchEtX/g/F8uIMBY9bDoONQUoLSW2gb2WmH79kklV/REwS9ZHCDlHIJ+d36kPIBMIVRVtQQYhEUQs7A== 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 BYAPR11MB2598.namprd11.prod.outlook.com (2603:10b6:a02:cb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.18; Wed, 9 Mar 2022 01:13:37 +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; Wed, 9 Mar 2022 01:13:37 +0000 From: "Wu, Hao A" To: "Bandaru, Purna Chandra Rao" , "devel@edk2.groups.io" CC: "Albecki, Mateusz" , "Gao, Liming" , "Liu, Zhiguang" Subject: Re: [PATCH] [PATCH v3] MdeModulePkg: Add bRefClkFreq card attribute programming support Thread-Topic: [PATCH] [PATCH v3] MdeModulePkg: Add bRefClkFreq card attribute programming support Thread-Index: AQHYMubSdP1xQvu5jEOjaVFlt2Az16y2P92A Date: Wed, 9 Mar 2022 01:13:37 +0000 Message-ID: References: <4014f68bb8428892e14f15efe152805f95d9b829.1646741878.git.purna.chandra.rao.bandaru@intel.com> In-Reply-To: <4014f68bb8428892e14f15efe152805f95d9b829.1646741878.git.purna.chandra.rao.bandaru@intel.com> 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: ef1213d8-9d82-4f1c-e407-08da016a0a15 x-ms-traffictypediagnostic: BYAPR11MB2598: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: /EHIwEHau81zMsBp49J3g/ShXDQCr62Gaz03DMqNJSAG8kaI8pDWtLhG9/F4DaT9Rn6ZWY6ZUqW4WCz84QBfp9EvTJLcKkDZJQYiex8F6otNdrmOGjzgRUgFDRCUJQpdnIdOwNTHOQU+IIPjx11tV9A7JBQwED3DOjckmWvhugrcFCmMZ/7gSFuZ8rykAsRXYHxC7JA286LifjQT+Dtxsamm6ma4tQVOnEMQ2GkdQxATu47cuk4xcJYVuWugFmOi96f/bmJSYoPKZjafhOYExSniBtgENeeWgm36B2chL/THlXufwlqh51bW98TIQHI6gBRhTOnfMTulVn98Ghmxi0eAl84DrkOschRVveZHFETfKDc2by3q5NhqXHOBvB5gLVR7W7FPtc2kU0T9CZCQEX6tbstkbmVa/lIgVHGSujUq8OZ9w8ODKVS3RGosAri/+PdTrVrCGcqWDyJ40o6nZ0+oknpnqbaRNoo3f/HIunt51p7S4XdlXUEcSC69qVSVocGtkh9ylmnMIUIIYdrwGqa8DeQjyQdoNkTBxSVj7H0Vk4MplopkeHrqGHU8MmYoBFtbukttphih5Img1vG6GJ9TKd2fbI8qGrd57waITz+hglLuNaVW5z00duDY+9P19ZaE1CJt4ZQPBgsjQXSibVpmcMslZiFo2Z4L/qvUO1gX97AF6MSxxliM3RTxVZjqAYxNjOYqS3xJrP3uthFYyK4kozXHMdopZQm5OspJka74QsGZAio6k0w62i9xSGEJblYqqsoMPxUz25S3zs3XaWGJ73SVZcSu0uUERK1Q2KLH4ZM312uI/Np7FPdOoU0n 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)(38070700005)(107886003)(122000001)(2906002)(52536014)(8936002)(54906003)(82960400001)(316002)(110136005)(9686003)(186003)(83380400001)(86362001)(26005)(55016003)(66476007)(5660300002)(71200400001)(53546011)(8676002)(76116006)(64756008)(33656002)(7696005)(4326008)(66446008)(66946007)(6506007)(66556008)(508600001)(45080400002)(38100700002)(966005)(145543001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RqBYyjGUxq/UBj6+P9oE1YLZA1f4g/69W5JAJMzAEETVnqr6IFHqteZduFC3?= =?us-ascii?Q?guJDBC4fHobR+7agRkV0jMOX1vPcDAH9QDuThIMtuwC7a6bGzg06Z0JWSMS5?= =?us-ascii?Q?iBc5tgiGE6JeTVstE2X8ffpmPpQeQB4ekjkOds3Kc37XUncSQTzryy8kQ5r9?= =?us-ascii?Q?OV2zO+lqtbKVdXRdreSNBmkX9Rqhlfvxbia+2Jz9KPHwChmrFpJc7d+8V2TW?= =?us-ascii?Q?yaDfeTvR7li7+Q55bHIvY+gkpwzqiCt+W5KpEqBwBmy06hNx24/XK2xdQBL1?= =?us-ascii?Q?54KUK8utZfqQpdof2ssQnsBXuQnrqhzB069bOR7uwKbtfLn3ijrRrljG8Sk8?= =?us-ascii?Q?ShUufHPla9x9iNfuCjWdLgk+8YRKB1StwPz5duqARetSB3Oc71pCB0wi+oKu?= =?us-ascii?Q?bbFHSUsf35yONV5Vm/S7PrKsLvMNjIZROU2rra5vCVdY3EPugVkkB54Q4oZ1?= =?us-ascii?Q?CTNaJCVvvHPGPWGxkAktVFDY8XTq1T7Y1jXgrSRPKHmS3wfAqk+JUs56vrPv?= =?us-ascii?Q?xW4PR9Mf39eoENTB704hIb2A+NDGzU7ZCfgvMY5a9LoOqsZ8KYdMQZe9qHgP?= =?us-ascii?Q?53HSgQ3eUe9PEWg5fKPfM1xwtUjrwI+xiPfQvMFd8ltEvfyCu/STZlFw+mcZ?= =?us-ascii?Q?b7sd6/S9Q+YGNlJKVvQfYDWWI6QcqR0VnnTI4X6OP7lQKP8RRELcOIFSTuW1?= =?us-ascii?Q?DZvvEzyWVomS8++GeGaLj6SgIu/V+kbQZVr9LBDjq0YpOLvN8CWc+6mCtvuc?= =?us-ascii?Q?YGHnRPFwv13M2lvs94NaKx3Fq8LvxOC+kyEIhbabW/Am7KWJPMAlmNEVe1m2?= =?us-ascii?Q?ngjv0rEPB53iQc8RnEG7yo18fKLo2Mj5a3vvVbEJjDegWgcJ2GeeqTuQl5OI?= =?us-ascii?Q?M8O+XbA+axOnmPKQnsbbSSk3Yg/CKLac/I+kzMuJAOTmzbBwU3UT1hr4x2sG?= =?us-ascii?Q?3qOHzGMhfU2Y+Uk7JDpjHtMOwtLIbGEhTGZ17EKh8oFr73TZ26LDsvh7S83L?= =?us-ascii?Q?dAg4PJUtNmFoOJC59aCnVRuvwmfg5eMHued62HuX9oyU8NMCK1a/q311GMmi?= =?us-ascii?Q?bRM9pzCXFg6tRyGvy4MpDkk6kioalwyDb205xxfugwJBREAajx4CepHDq/zR?= =?us-ascii?Q?+muerrV8EmsNI5nlqoEIMHNWik/jPISxkeMFrDu8I/MNBR1ikOOUM+Jg+R7T?= =?us-ascii?Q?lRdLKdOXJ+vbd0iIqN4B2II5FgOlUgsCQFlVd7l31ge/Z0lBtoqV+Cmgw/CQ?= =?us-ascii?Q?rvcyu1a5FVDgjA8+wM/NBcqOECMJqzZ+WV1F+DzQNbpmSIODz+X7Y5dZLLVt?= =?us-ascii?Q?PlyMrEiBOlDRj8LNu/25buJDviHG85VRESjC2XgIAmBSuHtTpKZeRKmUyjMx?= =?us-ascii?Q?yBqPR93xkwJ4JeNOEKhcSEqGliPAdxwXGHDckWtfqoKzAzNkHTADMBgeL1iJ?= =?us-ascii?Q?WxpYBj8ub+0mz5sjZYyYJANRVriA9ojYL82IEq5avzLyKMK4/vRegZaCk/N8?= =?us-ascii?Q?9MFBGXvAFkZtKTN+lu21bD+j4FUPQZI8wx/mBFqHXyvgFNK+H8JpfF9E6khC?= =?us-ascii?Q?P8k777vDdrMFUH7NX1jxjqrz6/+B7QwwkXn8aTrLIi2S+zu5+sNKuf9iJWjX?= =?us-ascii?Q?AYD3xCQEiw8ofJpta5kpHlg=3D?= 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: ef1213d8-9d82-4f1c-e407-08da016a0a15 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Mar 2022 01:13:37.2464 (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: BdyGLzpw4fZbRBd2VlPpO/JWjvi/+IF//XCojAJcJpBxeWwcPgnlaSHFCHJ/k4E+EsaoJNqCYsML7SldhhMI+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2598 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 Thanks. Reviewed-by: Hao A Wu Best Regards, Hao Wu > -----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 >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3851 >=20 > 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. >=20 > Reference Clock Frequency value > 0h:19.2 MHz > 1h: 26 MHz > 2h: 38.4 MHz > 3h: Obsolete > Others: Reserved >=20 > Cc: Wu Hao A > Cc: Albecki Mateusz > Cc: Liming Gao > Cc: Zhiguang Liu >=20 > 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(-) >=20 > 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 >=20 > - 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 >=20 > @@ -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; >=20 > Status =3D EFI_SUCCESS; > UfsHc =3D NULL; > @@ -917,6 +919,54 @@ UfsPassThruDriverBindingStart ( > goto Error; > } >=20 > + if ((mUfsHcPlatform !=3D NULL) && > + ((mUfsHcPlatform->RefClkFreq =3D=3D EdkiiUfsCardRefClkFreq19p2Mhz)= || > + (mUfsHcPlatform->RefClkFreq =3D=3D EdkiiUfsCardRefClkFreq26Mhz) |= | > + (mUfsHcPlatform->RefClkFreq =3D=3D EdkiiUfsCardRefClkFreq38p4Mhz)= )) > + { > + RefClkAttr =3D UfsAttrRefClkFreq; > + Attributes =3D EdkiiUfsCardRefClkFreqObsolete; > + Status =3D UfsRwAttributes (Private, TRUE, RefClkAttr, 0, 0, (UI= NT32 > *)&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, (U= INT32 > *)&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 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; > + } > + } > + > // > // UFS 2.0 spec Section 13.1.3.3: > // At the end of the UFS Interconnect Layer initialization on both hos= t 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. >=20 > - 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 >=20 > @@ -1970,14 +1970,6 @@ UfsDeviceDetection ( > return EFI_DEVICE_ERROR; > } > } else { > - if ((mUfsHcPlatform !=3D NULL) && (mUfsHcPlatform->Callback !=3D N= ULL)) { > - 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. >=20 > -Copyright (c) 2019, Intel Corporation. All rights reserved.
> +Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > **/ > @@ -11,7 +11,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > #include >=20 > -#define EDKII_UFS_HC_PLATFORM_PROTOCOL_VERSION 1 > +#define EDKII_UFS_HC_PLATFORM_PROTOCOL_VERSION 2 >=20 > extern EFI_GUID gEdkiiUfsHcPlatformProtocolGuid; >=20 > @@ -83,6 +83,13 @@ typedef enum { > EdkiiUfsHcPostLinkStartup > } EDKII_UFS_HC_PLATFORM_CALLBACK_PHASE; >=20 > +typedef enum { > + EdkiiUfsCardRefClkFreq19p2Mhz, > + EdkiiUfsCardRefClkFreq26Mhz, > + EdkiiUfsCardRefClkFreq38p4Mhz, > + EdkiiUfsCardRefClkFreqObsolete > +} EDKII_UFS_CARD_REF_CLK_FREQ_ATTRIBUTE; > + > /** > Callback function for platform driver. >=20 > @@ -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 i= n > this Ufs Host Environment. > + /// > + EDKII_UFS_CARD_REF_CLK_FREQ_ATTRIBUTE RefClkFreq; > }; >=20 > #endif > -- > 2.31.1.windows.1