Lines Matching refs:rk_phy

94 	struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy);  in rockchip_emmc_phy_power()  local
105 regmap_write(rk_phy->reg_base, in rockchip_emmc_phy_power()
106 rk_phy->reg_offset + GRF_EMMCPHY_CON6, in rockchip_emmc_phy_power()
110 regmap_write(rk_phy->reg_base, in rockchip_emmc_phy_power()
111 rk_phy->reg_offset + GRF_EMMCPHY_CON6, in rockchip_emmc_phy_power()
120 rate = clk_get_rate(rk_phy->emmcclk); in rockchip_emmc_phy_power()
163 regmap_write(rk_phy->reg_base, in rockchip_emmc_phy_power()
164 rk_phy->reg_offset + GRF_EMMCPHY_CON6, in rockchip_emmc_phy_power()
176 ret = regmap_read_poll_timeout(rk_phy->reg_base, in rockchip_emmc_phy_power()
177 rk_phy->reg_offset + GRF_EMMCPHY_STATUS, in rockchip_emmc_phy_power()
186 regmap_write(rk_phy->reg_base, in rockchip_emmc_phy_power()
187 rk_phy->reg_offset + GRF_EMMCPHY_CON0, in rockchip_emmc_phy_power()
192 regmap_write(rk_phy->reg_base, in rockchip_emmc_phy_power()
193 rk_phy->reg_offset + GRF_EMMCPHY_CON6, in rockchip_emmc_phy_power()
224 ret = regmap_read_poll_timeout(rk_phy->reg_base, in rockchip_emmc_phy_power()
225 rk_phy->reg_offset + GRF_EMMCPHY_STATUS, in rockchip_emmc_phy_power()
238 struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy); in rockchip_emmc_phy_init() local
256 rk_phy->emmcclk = clk_get(&phy->dev, "emmcclk"); in rockchip_emmc_phy_init()
257 if (IS_ERR(rk_phy->emmcclk)) { in rockchip_emmc_phy_init()
259 rk_phy->emmcclk = NULL; in rockchip_emmc_phy_init()
267 struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy); in rockchip_emmc_phy_exit() local
269 clk_put(rk_phy->emmcclk); in rockchip_emmc_phy_exit()
282 struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy); in rockchip_emmc_phy_power_on() local
285 regmap_write(rk_phy->reg_base, in rockchip_emmc_phy_power_on()
286 rk_phy->reg_offset + GRF_EMMCPHY_CON6, in rockchip_emmc_phy_power_on()
292 regmap_write(rk_phy->reg_base, in rockchip_emmc_phy_power_on()
293 rk_phy->reg_offset + GRF_EMMCPHY_CON0, in rockchip_emmc_phy_power_on()
299 regmap_write(rk_phy->reg_base, in rockchip_emmc_phy_power_on()
300 rk_phy->reg_offset + GRF_EMMCPHY_CON0, in rockchip_emmc_phy_power_on()
320 struct rockchip_emmc_phy *rk_phy; in rockchip_emmc_phy_probe() local
335 rk_phy = devm_kzalloc(dev, sizeof(*rk_phy), GFP_KERNEL); in rockchip_emmc_phy_probe()
336 if (!rk_phy) in rockchip_emmc_phy_probe()
345 rk_phy->reg_offset = reg_offset; in rockchip_emmc_phy_probe()
346 rk_phy->reg_base = grf; in rockchip_emmc_phy_probe()
354 phy_set_drvdata(generic_phy, rk_phy); in rockchip_emmc_phy_probe()