From d68d163dd744aa35787bc3f8a9e987230fa576e9 Mon Sep 17 00:00:00 2001 From: Jorge Troncoso Date: Thu, 23 Sep 2021 17:14:29 -0700 Subject: refactor(ufs): reuse ufshc_send_uic_cmd This change aims to make the UFS code more robust by removing asserts and adding retry logic. We also reduce repetition by reusing ufshc_send_uic_cmd for DME_GET and DME_SET commands. Signed-off-by: Jorge Troncoso Change-Id: Id70aa1687d5ca78dc7d47234372255ac5a04a612 --- include/drivers/ufs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/drivers/ufs.h') diff --git a/include/drivers/ufs.h b/include/drivers/ufs.h index 574c4ea0a..3f8f3605f 100644 --- a/include/drivers/ufs.h +++ b/include/drivers/ufs.h @@ -254,6 +254,10 @@ #define UFS_VENDOR_SKHYNIX U(0x1AD) #define MAX_MODEL_LEN 16 + +/* maximum number of retries for a general UIC command */ +#define UFS_UIC_COMMAND_RETRIES 3 + /** * ufs_dev_desc - ufs device details from the device descriptor * @wmanufacturerid: card details -- cgit v1.2.1