summaryrefslogtreecommitdiff
path: root/drivers/phy/samsung/phy-samsung-ufs.c
diff options
context:
space:
mode:
authorAlim Akhtar <alim.akhtar@samsung.com>2022-06-10 16:11:15 +0530
committerVinod Koul <vkoul@kernel.org>2022-06-16 17:18:37 -0700
commite313216b52813a9c51cad0bf406b60d3248b268f (patch)
tree4db90b1b76b7ca595ee34d5ee7fbfab50901cfef /drivers/phy/samsung/phy-samsung-ufs.c
parent63f4676dd879d72f33e5f1ea1bc166411af2cbea (diff)
downloadlwn-e313216b52813a9c51cad0bf406b60d3248b268f.tar.gz
lwn-e313216b52813a9c51cad0bf406b60d3248b268f.zip
phy: samsung-ufs: move cdr offset to drvdata
Move CDR lock offset to drv data so that it can be extended for other SoCs which are having CDR lock at different register offset. Signed-off-by: Bharat Uppal <bharat.uppal@samsung.com> Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com> Reviewed-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220610104119.66401-3-alim.akhtar@samsung.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy/samsung/phy-samsung-ufs.c')
-rw-r--r--drivers/phy/samsung/phy-samsung-ufs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c
index 206a79c69a6c..8cec7652b459 100644
--- a/drivers/phy/samsung/phy-samsung-ufs.c
+++ b/drivers/phy/samsung/phy-samsung-ufs.c
@@ -63,7 +63,8 @@ static int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy)
}
err = readl_poll_timeout(
- ufs_phy->reg_pma + PHY_APB_ADDR(PHY_CDR_LOCK_STATUS),
+ ufs_phy->reg_pma +
+ PHY_APB_ADDR(ufs_phy->drvdata->cdr_lock_status_offset),
val, (val & PHY_CDR_LOCK_BIT), sleep_us, timeout_us);
if (err)
dev_err(ufs_phy->dev,
@@ -327,6 +328,7 @@ static int samsung_ufs_phy_probe(struct platform_device *pdev)
drvdata = match->data;
phy->dev = dev;
+ phy->drvdata = drvdata;
phy->cfgs = drvdata->cfgs;
phy->has_symbol_clk = drvdata->has_symbol_clk;
memcpy(&phy->isol, &drvdata->isol, sizeof(phy->isol));