@@ -4298,7 +4298,7 @@ int ufshcd_hba_enable(struct ufs_hba *hba)
* instruction might be read back.
* This delay can be changed based on the controller.
*/
- ufshcd_wait_us(1000, 100, true);
+ ufshcd_wait_us(hba->hba_enable_delay_us, 100, true);
/* wait for the host controller to complete initialization */
retry = 10;
@@ -8421,6 +8421,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
hba->mmio_base = mmio_base;
hba->irq = irq;
+ hba->hba_enable_delay_us = 1000;
err = ufshcd_hba_init(hba);
if (err)
@@ -663,6 +663,7 @@ struct ufs_hba {
u32 eh_flags;
u32 intr_mask;
u16 ee_ctrl_mask;
+ u16 hba_enable_delay_us;
bool is_powered;
struct ufs_init_prefetch init_prefetch_data;