summaryrefslogtreecommitdiff
path: root/include/drivers/ufs.h
diff options
context:
space:
mode:
authorJorge Troncoso <jatron@google.com>2021-10-05 22:46:35 -0700
committerJorge Troncoso <jatron@google.com>2021-10-15 13:22:49 -0700
commit905635d5e74e3c7b7b2412a673009c8aaabb73e1 (patch)
tree920ddf66b3476d53ceb287db4c28264be5fee1fc /include/drivers/ufs.h
parent99ff1a35fe5e039097ba2520f00ecd862de6f6de (diff)
downloadarm-trusted-firmware-905635d5e74e3c7b7b2412a673009c8aaabb73e1.tar.gz
fix(ufs): add reset before DME_LINKSTARTUP
This change aims to make the UFS code more robust by performing a controller reset if linkstartup fails. This idea was borrowed from Linux's ufshcd_link_startup function. Signed-off-by: Jorge Troncoso <jatron@google.com> Change-Id: I6b52148d1bf155b11198dc82a39b1120057adaaf
Diffstat (limited to 'include/drivers/ufs.h')
-rw-r--r--include/drivers/ufs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/drivers/ufs.h b/include/drivers/ufs.h
index 686d4c6dc..c074e85d1 100644
--- a/include/drivers/ufs.h
+++ b/include/drivers/ufs.h
@@ -258,6 +258,9 @@
/* maximum number of retries for a general UIC command */
#define UFS_UIC_COMMAND_RETRIES 3
+/* maximum number of link-startup retries */
+#define DME_LINKSTARTUP_RETRIES 10
+
#define HCE_ENABLE_OUTER_RETRIES 3
#define HCE_ENABLE_INNER_RETRIES 50
#define HCE_ENABLE_TIMEOUT_US 100