Drivers/DwUfsHcDxe: add memory barrier

UFS device couldn't be initialized by UEFI on some HiKey960 platforms
if it's built in release mode. Since UFS device is not initialized
successfully, UEFI couldn't read any valuable data from UFS device.
Then it hangs.

After adding memory barrier, UFS device could be initialized successfully.
So this issue may be related to instructions out of order by CPU
optimization.

Signed-off-by: qwx495460 <[email protected]>
Signed-off-by: Baopeng Feng <[email protected]>
Signed-off-by: Li Wei <[email protected]>
Signed-off-by: Haojian Zhuang <[email protected]>
1 file changed