]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: ufs: core: Export ufshcd_dme_reset() and ufshcd_dme_enable()
authorShawn Lin <shawn.lin@rock-chips.com>
Wed, 5 Feb 2025 06:15:54 +0000 (14:15 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 25 Feb 2025 00:18:44 +0000 (19:18 -0500)
These two APIs will be used by glue driver if they need a different HCE
process.

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://lore.kernel.org/r/1738736156-119203-6-git-send-email-shawn.lin@rock-chips.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c
include/ufs/ufshcd.h

index 1893a7ad95316b45bb4a554fcb743b64c0a257d3..40b28c61ef756521f674dfb5db9f2ee8cae6658a 100644 (file)
@@ -4005,7 +4005,7 @@ static int ufshcd_dme_link_startup(struct ufs_hba *hba)
  *
  * Return: 0 on success, non-zero value on failure.
  */
-static int ufshcd_dme_reset(struct ufs_hba *hba)
+int ufshcd_dme_reset(struct ufs_hba *hba)
 {
        struct uic_command uic_cmd = {
                .command = UIC_CMD_DME_RESET,
@@ -4019,6 +4019,7 @@ static int ufshcd_dme_reset(struct ufs_hba *hba)
 
        return ret;
 }
+EXPORT_SYMBOL_GPL(ufshcd_dme_reset);
 
 int ufshcd_dme_configure_adapt(struct ufs_hba *hba,
                               int agreed_gear,
@@ -4044,7 +4045,7 @@ EXPORT_SYMBOL_GPL(ufshcd_dme_configure_adapt);
  *
  * Return: 0 on success, non-zero value on failure.
  */
-static int ufshcd_dme_enable(struct ufs_hba *hba)
+int ufshcd_dme_enable(struct ufs_hba *hba)
 {
        struct uic_command uic_cmd = {
                .command = UIC_CMD_DME_ENABLE,
@@ -4058,6 +4059,7 @@ static int ufshcd_dme_enable(struct ufs_hba *hba)
 
        return ret;
 }
+EXPORT_SYMBOL_GPL(ufshcd_dme_enable);
 
 static inline void ufshcd_add_delay_before_dme_cmd(struct ufs_hba *hba)
 {
index 8bf31e6ca4e514b96089c4bb7044821014d64c1b..782670d36826a209bd2f0847baf26f5641bc795f 100644 (file)
@@ -1368,6 +1368,8 @@ extern int ufshcd_system_thaw(struct device *dev);
 extern int ufshcd_system_restore(struct device *dev);
 #endif
 
+extern int ufshcd_dme_reset(struct ufs_hba *hba);
+extern int ufshcd_dme_enable(struct ufs_hba *hba);
 extern int ufshcd_dme_configure_adapt(struct ufs_hba *hba,
                                      int agreed_gear,
                                      int adapt_val);