diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2018-02-01 15:08:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-01 15:08:38 +0800 |
commit | d9243970e87230f72086b8c7284022f970329c98 (patch) | |
tree | 1c59e4db949d80cc77b6204ed3bb5c2e2f9999e3 | |
parent | 6dfa27969674e134876b5ae544b797b1ac5bfc74 (diff) | |
parent | df12473802c39c93ab648c9fd958ecdd13760ae4 (diff) | |
download | device_linaro_bootloader_OpenPlatformPkg-d9243970e87230f72086b8c7284022f970329c98.tar.gz device_linaro_bootloader_OpenPlatformPkg-d9243970e87230f72086b8c7284022f970329c98.tar.bz2 device_linaro_bootloader_OpenPlatformPkg-d9243970e87230f72086b8c7284022f970329c98.zip |
Merge pull request #86 from hzhuang1/hynix_ufs
hynix ufs have some bugs for fixed
-rw-r--r-- | Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.c | 12 | ||||
-rw-r--r-- | Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.h | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.c b/Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.c index 562218e..3fac2d3 100644 --- a/Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.c +++ b/Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.c @@ -508,13 +508,23 @@ UfsHcPhyInit ( EFI_STATUS
EFIAPI
UfsHcPhySetPowerMode (
- IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This
+ IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This,
+ IN UINT32 DevQuirks
)
{
UFS_HOST_CONTROLLER_PRIVATE_DATA *Private;
UINT32 Data, TxLanes, RxLanes;
Private = UFS_HOST_CONTROLLER_PRIVATE_DATA_FROM_UFSHC (This);
+
+ if (DevQuirks & UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME) {
+ DEBUG ((DEBUG_INFO | DEBUG_LOAD, "ufs: H**** device must set VS_DebugSaveConfigTime 0x10\n"));
+ /* VS_DebugSaveConfigTime */
+ DwUfsDmeSet (Private->RegBase, 0xD0A0, 0x0, 0x10);
+ /* sync length */
+ DwUfsDmeSet (Private->RegBase, 0x1556, 0x0, 0x48);
+ }
+
// PA_Tactive
DwUfsDmeGet (Private->RegBase, 0x15A8, 0, &Data);
if (Data < 7) {
diff --git a/Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.h b/Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.h index 8c8476c..6c2fe34 100644 --- a/Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.h +++ b/Drivers/Block/DwUfsHcDxe/DwUfsHcDxe.h @@ -113,6 +113,8 @@ extern EFI_DRIVER_BINDING_PROTOCOL gUfsHcDriverBinding; extern EFI_COMPONENT_NAME_PROTOCOL gUfsHcComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gUfsHcComponentName2;
+#define UFS_DEVICE_QUIRK_HOST_VS_DEBUGSAVECONFIGTIME (1 << 0)
+
//
// Unique signature for private data structure.
//
@@ -591,6 +593,7 @@ UfsHcPhyInit ( EFI_STATUS
EFIAPI
UfsHcPhySetPowerMode (
- IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This
+ IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This,
+ IN UINT32 DevQuirks
);
#endif /* _DW_UFS_HOST_CONTROLLER_H_ */
|