diff options
author | Albecki, Mateusz <mateusz.albecki@intel.com> | 2019-08-09 22:36:19 +0800 |
---|---|---|
committer | Hao A Wu <hao.a.wu@intel.com> | 2019-08-13 10:54:35 +0800 |
commit | a71272ed7a37e6f6bc1d32f3e72addc63196d933 (patch) | |
tree | ab3d7e90e1f2190961a1173dace1edc71e6d9e50 /MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | |
parent | 90952ad7339e19b5dcfc44a4559bce813f063e4a (diff) | |
download | edk2-a71272ed7a37e6f6bc1d32f3e72addc63196d933.tar.gz edk2-a71272ed7a37e6f6bc1d32f3e72addc63196d933.tar.bz2 edk2-a71272ed7a37e6f6bc1d32f3e72addc63196d933.zip |
MdeModulePkg/UfsPassThruDxe: Refactor private data to use UfsHcInfo
https://bugzilla.tianocore.org/show_bug.cgi?id=1343
Private data has been refactored to use EDKII_UFS_HC_INFO structure
to store host controller capabilities and version
information. Getting host controller data has been moved
into single place and is done before host controller enable.
Signed-off-by: Mateusz Albecki <mateusz.albecki@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c')
-rw-r--r-- | MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c index 1518b251d8..7dce217d49 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c @@ -1,6 +1,6 @@ /** @file
- Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -35,7 +35,7 @@ UFS_PASS_THRU_PRIVATE_DATA gUfsPassThruTemplate = { },
0, // UfsHostController
0, // UfsHcBase
- 0, // Capabilities
+ {0, 0}, // UfsHcInfo
0, // TaskTag
0, // UtpTrlBase
0, // Nutrs
@@ -865,6 +865,11 @@ UfsPassThruDriverBindingStart ( Private->UfsHostController = UfsHc;
Private->UfsHcBase = UfsHcBase;
InitializeListHead (&Private->Queue);
+ Status = GetUfsHcInfo (Private);
+ if (EFI_ERROR (Status)) {
+ DEBUG ((DEBUG_ERROR, "Failed to initialize UfsHcInfo\n"));
+ goto Error;
+ }
//
// Initialize UFS Host Controller H/W.
|