From cbebadf59534d3d7fffb78ae3f997e9e062a3d1a Mon Sep 17 00:00:00 2001
From: John Stultz <john.stultz@linaro.org>
Date: Mon, 13 May 2019 16:56:19 -0700
Subject: [PATCH] drivers: ufs: Extend the delay after reset to wait for some
 slower chips

We've seen issues with some THG based UFS chips, where
after reset the LUNs don't always enumerate properly.

After some debugging, we found that extending the mdelay
here seems to resolve the issue by giving the chips enough
time to complete reset.

Change-Id: I848f810b2438ed6ad3d33db614c61d2cef9ac400
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 drivers/ufs/ufs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ufs/ufs.c b/drivers/ufs/ufs.c
index b2c1046123..6dbf372361 100644
--- a/drivers/ufs/ufs.c
+++ b/drivers/ufs/ufs.c
@@ -704,7 +704,7 @@ static void ufs_enum(void)
 	ufs_verify_ready();
 
 	ufs_set_flag(FLAG_DEVICE_INIT);
-	mdelay(100);
+	mdelay(200);
 	/* dump available LUNs */
 	for (i = 0; i < UFS_MAX_LUNS; i++) {
 		ufs_read_capacity(i, &blk_num, &blk_size);
-- 
GitLab