goto Error;\r
}\r
\r
+ //\r
+ // UFS 2.0 spec Section 13.1.3.3:\r
+ // At the end of the UFS Interconnect Layer initialization on both host and device side,\r
+ // the host shall send a NOP OUT UPIU to verify that the device UTP Layer is ready.\r
+ //\r
+ Status = UfsExecNopCmds (Private);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_ERROR, "Ufs Sending NOP IN command Error, Status = %r\n", Status));\r
+ goto Error;\r
+ }\r
+\r
+ Status = UfsFinishDeviceInitialization (Private);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((DEBUG_ERROR, "Device failed to finish initialization, Status = %r\n", Status));\r
+ goto Error;\r
+ }\r
+\r
if ((mUfsHcPlatform != NULL) &&\r
((mUfsHcPlatform->RefClkFreq == EdkiiUfsCardRefClkFreq19p2Mhz) ||\r
(mUfsHcPlatform->RefClkFreq == EdkiiUfsCardRefClkFreq26Mhz) ||\r
}\r
}\r
\r
- //\r
- // UFS 2.0 spec Section 13.1.3.3:\r
- // At the end of the UFS Interconnect Layer initialization on both host and device side,\r
- // the host shall send a NOP OUT UPIU to verify that the device UTP Layer is ready.\r
- //\r
- Status = UfsExecNopCmds (Private);\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "Ufs Sending NOP IN command Error, Status = %r\n", Status));\r
- goto Error;\r
- }\r
-\r
- Status = UfsFinishDeviceInitialization (Private);\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "Device failed to finish initialization, Status = %r\n", Status));\r
- goto Error;\r
- }\r
-\r
//\r
// Check if 8 common luns are active and set corresponding bit mask.\r
//\r