0, // UfsHostController\r
0, // UfsHcBase\r
{0, 0}, // UfsHcInfo\r
+ {NULL, NULL}, // UfsHcDriverInterface\r
0, // TaskTag\r
0, // UtpTrlBase\r
0, // Nutrs\r
\r
UINT8 mUfsTargetId[TARGET_MAX_BYTES];\r
\r
+GLOBAL_REMOVE_IF_UNREFERENCED EDKII_UFS_HC_PLATFORM_PROTOCOL *mUfsHcPlatform;\r
+\r
/**\r
Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function\r
supports both blocking I/O and nonblocking I/O. The blocking I/O functionality is required, and the\r
Private->ExtScsiPassThru.Mode = &Private->ExtScsiPassThruMode;\r
Private->UfsHostController = UfsHc;\r
Private->UfsHcBase = UfsHcBase;\r
+ Private->Handle = Controller;\r
+ Private->UfsHcDriverInterface.UfsHcProtocol = UfsHc;\r
+ Private->UfsHcDriverInterface.UfsExecUicCommand = UfsHcDriverInterfaceExecUicCommand;\r
InitializeListHead (&Private->Queue);\r
+\r
+ //\r
+ // This has to be done before initializing UfsHcInfo or calling the UfsControllerInit\r
+ //\r
+ if (mUfsHcPlatform == NULL) {\r
+ Status = gBS->LocateProtocol (&gEdkiiUfsHcPlatformProtocolGuid, NULL, (VOID**)&mUfsHcPlatform);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_INFO, "No UfsHcPlatformProtocol present\n"));\r
+ }\r
+ }\r
+\r
Status = GetUfsHcInfo (Private);\r
if (EFI_ERROR (Status)) {\r
DEBUG ((DEBUG_ERROR, "Failed to initialize UfsHcInfo\n"));\r