Message ID | 1731048987-229149-6-git-send-email-shawn.lin@rock-chips.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | Initial support for RK3576 UFS controller | expand |
On Fri, Nov 08, 2024 at 02:56:24PM +0800, Shawn Lin wrote: > These two APIs will be used by host driver if they need a different s/host/glue drivers > HCE process. > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> - Mani > --- > > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > drivers/ufs/core/ufshcd.c | 6 ++++-- > include/ufs/ufshcd.h | 2 ++ > 2 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c > index 24a32e2..9d1d56d 100644 > --- a/drivers/ufs/core/ufshcd.c > +++ b/drivers/ufs/core/ufshcd.c > @@ -4039,7 +4039,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, > @@ -4053,6 +4053,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, > @@ -4078,7 +4079,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, > @@ -4092,6 +4093,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) > { > diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h > index 3f68ae3e4..b9733dc 100644 > --- a/include/ufs/ufshcd.h > +++ b/include/ufs/ufshcd.h > @@ -1360,6 +1360,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); > -- > 2.7.4 >
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 24a32e2..9d1d56d 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -4039,7 +4039,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, @@ -4053,6 +4053,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, @@ -4078,7 +4079,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, @@ -4092,6 +4093,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) { diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h index 3f68ae3e4..b9733dc 100644 --- a/include/ufs/ufshcd.h +++ b/include/ufs/ufshcd.h @@ -1360,6 +1360,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);
These two APIs will be used by host driver if they need a different HCE process. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/ufs/core/ufshcd.c | 6 ++++-- include/ufs/ufshcd.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-)