Re: [PATCH 05/10] scsi: ufs: dwc: Export common clock divider and link status helpers

Frank Li <[email protected]>
Newsgroups org.kernel.vger.linux-scsi,dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <ao8En1LWAsgY6wzX@SMW015318>
On Wed, Aug 26, 2026 at 03:40:43PM +0200, Larisa Grigore wrote:
>
> Make ufshcd_dwc_program_clk_div() and ufshcd_dwc_link_is_up() available to
> DWC-based platform glue drivers. These helpers are needed by platform
> drivers that must program the controller HCLK divider and verify link state
> during their vendor-specific initialization flows.
>
> Signed-off-by: Larisa Grigore <[email protected]>
> ---

Reviewed-by: Frank Li <[email protected]>

>  drivers/ufs/host/ufshcd-dwc.c | 6 ++++--
>  drivers/ufs/host/ufshcd-dwc.h | 2 ++
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ufs/host/ufshcd-dwc.c b/drivers/ufs/host/ufshcd-dwc.c
> index 45920793d1a8..4a689d211e81 100644
> --- a/drivers/ufs/host/ufshcd-dwc.c
> +++ b/drivers/ufs/host/ufshcd-dwc.c
> @@ -39,10 +39,11 @@ EXPORT_SYMBOL(ufshcd_dwc_dme_set_attrs);
>   * @divider_val: clock divider value to be programmed
>   *
>   */
> -static void ufshcd_dwc_program_clk_div(struct ufs_hba *hba, u32 divider_val)
> +void ufshcd_dwc_program_clk_div(struct ufs_hba *hba, u32 divider_val)
>  {
>         ufshcd_writel(hba, divider_val, DWC_UFS_REG_HCLKDIV);
>  }
> +EXPORT_SYMBOL(ufshcd_dwc_program_clk_div);
>
>  /**
>   * ufshcd_dwc_link_is_up() - check if link is up.
> @@ -50,7 +51,7 @@ static void ufshcd_dwc_program_clk_div(struct ufs_hba *hba, u32 divider_val)
>   *
>   * Return: 0 on success, non-zero value on failure.
>   */
> -static int ufshcd_dwc_link_is_up(struct ufs_hba *hba)
> +int ufshcd_dwc_link_is_up(struct ufs_hba *hba)
>  {
>         int dme_result = 0;
>
> @@ -63,6 +64,7 @@ static int ufshcd_dwc_link_is_up(struct ufs_hba *hba)
>
>         return 1;
>  }
> +EXPORT_SYMBOL(ufshcd_dwc_link_is_up);
>
>  /**
>   * ufshcd_dwc_connection_setup() - configure unipro attributes.
> diff --git a/drivers/ufs/host/ufshcd-dwc.h b/drivers/ufs/host/ufshcd-dwc.h
> index d8673cd54d4c..53b523ef59df 100644
> --- a/drivers/ufs/host/ufshcd-dwc.h
> +++ b/drivers/ufs/host/ufshcd-dwc.h
> @@ -47,4 +47,6 @@ int ufshcd_dwc_dme_set_attrs(struct ufs_hba *hba,
>                                 const struct ufshcd_dme_attr_val *v, int n);
>  int ufshcd_dwc_phy_reg_write(struct ufs_hba *hba, u32 addr, u32 val);
>  int ufshcd_dwc_phy_reg_read(struct ufs_hba *hba, u32 addr, u32 *val);
> +int ufshcd_dwc_link_is_up(struct ufs_hba *hba);
> +void ufshcd_dwc_program_clk_div(struct ufs_hba *hba, u32 divider_val);
>  #endif /* End of Header */
> --
> 2.43.0
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.