diff options
author | Peter Griffin <peter.griffin@linaro.org> | 2024-04-04 15:25:52 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-04-06 11:57:17 +0300 |
commit | a4de58a9096b471f9dc1c2bc6bfaa8aa48110c31 (patch) | |
tree | be0d79364985247861857ee5deab92b6cd3374c7 /drivers/phy/samsung/phy-samsung-ufs.h | |
parent | f2c6d0fa197a1558f4ef50162bb87e6644af232d (diff) | |
download | linux-a4de58a9096b471f9dc1c2bc6bfaa8aa48110c31.tar.xz |
phy: samsung-ufs: ufs: Add SoC callbacks for calibration and clk data recovery
Some SoCs like gs101 don't fit in well with the existing pll lock and
clock data recovery (CDR) callback used by existing exynos platforms.
Allow SoCs to specifify and implement their own calibration and CDR
functions that can be called by the generic samsung phy code.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240404122559.898930-11-peter.griffin@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/samsung/phy-samsung-ufs.h')
-rw-r--r-- | drivers/phy/samsung/phy-samsung-ufs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h index e122960cfee8..7de6b574b94d 100644 --- a/drivers/phy/samsung/phy-samsung-ufs.h +++ b/drivers/phy/samsung/phy-samsung-ufs.h @@ -112,6 +112,9 @@ struct samsung_ufs_phy_drvdata { const char * const *clk_list; int num_clks; u32 cdr_lock_status_offset; + /* SoC's specific operations */ + int (*wait_for_cal)(struct phy *phy, u8 lane); + int (*wait_for_cdr)(struct phy *phy, u8 lane); }; struct samsung_ufs_phy { @@ -139,6 +142,8 @@ static inline void samsung_ufs_phy_ctrl_isol( phy->isol.mask, isol ? 0 : phy->isol.en); } +int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy, u8 lane); + extern const struct samsung_ufs_phy_drvdata exynos7_ufs_phy; extern const struct samsung_ufs_phy_drvdata exynosautov9_ufs_phy; extern const struct samsung_ufs_phy_drvdata fsd_ufs_phy; |