summaryrefslogtreecommitdiff
path: root/drivers/phy/samsung/phy-samsung-ufs.h
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2022-06-07 16:29:06 +0900
committerVinod Koul <vkoul@kernel.org>2022-06-08 21:51:33 +0530
commitf86c1d0a58b1f63a176f537e2f6851be49c20ad4 (patch)
tree84a65cf49df0f76061b2961aa526896b97f21d76 /drivers/phy/samsung/phy-samsung-ufs.h
parent521f88bf4daa04ca96968be1f49a49f5a4e31488 (diff)
downloadlwn-f86c1d0a58b1f63a176f537e2f6851be49c20ad4.tar.gz
lwn-f86c1d0a58b1f63a176f537e2f6851be49c20ad4.zip
phy: samsung: ufs: remove drvdata from struct samsung_ufs_phy
To change an offset of pmu_isol, we need to store its data instead of having drvdata's pointer. The definition of the pmu_isol structure should be extracted from samsung_ufs_phy_drvdata and rename the name with samsung_ufs_phy_ prefix. Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Link: https://lore.kernel.org/r/20220607072907.127000-5-chanho61.park@samsung.com 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.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/phy/samsung/phy-samsung-ufs.h b/drivers/phy/samsung/phy-samsung-ufs.h
index 5cd919539a3e..854b53bdf347 100644
--- a/drivers/phy/samsung/phy-samsung-ufs.h
+++ b/drivers/phy/samsung/phy-samsung-ufs.h
@@ -101,13 +101,15 @@ struct samsung_ufs_phy_cfg {
u8 id;
};
+struct samsung_ufs_phy_pmu_isol {
+ u32 offset;
+ u32 mask;
+ u32 en;
+};
+
struct samsung_ufs_phy_drvdata {
const struct samsung_ufs_phy_cfg **cfgs;
- struct pmu_isol {
- u32 offset;
- u32 mask;
- u32 en;
- } isol;
+ struct samsung_ufs_phy_pmu_isol isol;
bool has_symbol_clk;
};
@@ -122,7 +124,8 @@ struct samsung_ufs_phy {
struct clk *rx1_symbol_clk;
const struct samsung_ufs_phy_drvdata *drvdata;
const struct samsung_ufs_phy_cfg * const *cfgs;
- const struct pmu_isol *isol;
+ struct samsung_ufs_phy_pmu_isol isol;
+ bool has_symbol_clk;
u8 lane_cnt;
int ufs_phy_state;
enum phy_mode mode;
@@ -136,8 +139,8 @@ static inline struct samsung_ufs_phy *get_samsung_ufs_phy(struct phy *phy)
static inline void samsung_ufs_phy_ctrl_isol(
struct samsung_ufs_phy *phy, u32 isol)
{
- regmap_update_bits(phy->reg_pmu, phy->isol->offset,
- phy->isol->mask, isol ? 0 : phy->isol->en);
+ regmap_update_bits(phy->reg_pmu, phy->isol.offset,
+ phy->isol.mask, isol ? 0 : phy->isol.en);
}
extern const struct samsung_ufs_phy_drvdata exynos7_ufs_phy;