Lines Matching refs:host

29 static void dw_mci_rockchip_prepare_command(struct dw_mci *host, u32 *cmdr)  in dw_mci_rockchip_prepare_command()  argument
34 static int dw_mci_rk3288_setup_clock(struct dw_mci *host) in dw_mci_rk3288_setup_clock() argument
36 host->bus_hz /= RK3288_CLKGEN_DIV; in dw_mci_rk3288_setup_clock()
41 static void dw_mci_rk3288_set_ios(struct dw_mci *host, struct mmc_ios *ios) in dw_mci_rk3288_set_ios() argument
43 struct dw_mci_rockchip_priv_data *priv = host->priv; in dw_mci_rk3288_set_ios()
67 ret = clk_set_rate(host->ciu_clk, cclkin); in dw_mci_rk3288_set_ios()
69 dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock); in dw_mci_rk3288_set_ios()
71 bus_hz = clk_get_rate(host->ciu_clk) / RK3288_CLKGEN_DIV; in dw_mci_rk3288_set_ios()
72 if (bus_hz != host->bus_hz) { in dw_mci_rk3288_set_ios()
73 host->bus_hz = bus_hz; in dw_mci_rk3288_set_ios()
75 host->current_speed = 0; in dw_mci_rk3288_set_ios()
88 struct dw_mci *host = slot->host; in dw_mci_rk3288_execute_tuning() local
89 struct dw_mci_rockchip_priv_data *priv = host->priv; in dw_mci_rk3288_execute_tuning()
105 dev_err(host->dev, "Tuning clock (sample_clk) not defined.\n"); in dw_mci_rk3288_execute_tuning()
149 dev_warn(host->dev, "All phases bad!"); in dw_mci_rk3288_execute_tuning()
162 dev_info(host->dev, "All phases work, using default phase %d.", in dw_mci_rk3288_execute_tuning()
179 dev_dbg(host->dev, "Good phase range %d-%d (%d len)\n", in dw_mci_rk3288_execute_tuning()
186 dev_dbg(host->dev, "Best phase range %d-%d (%d len)\n", in dw_mci_rk3288_execute_tuning()
194 dev_info(host->dev, "Successfully tuned phase to %d\n", in dw_mci_rk3288_execute_tuning()
205 static int dw_mci_rk3288_parse_dt(struct dw_mci *host) in dw_mci_rk3288_parse_dt() argument
207 struct device_node *np = host->dev->of_node; in dw_mci_rk3288_parse_dt()
210 priv = devm_kzalloc(host->dev, sizeof(*priv), GFP_KERNEL); in dw_mci_rk3288_parse_dt()
218 priv->drv_clk = devm_clk_get(host->dev, "ciu-drive"); in dw_mci_rk3288_parse_dt()
220 dev_dbg(host->dev, "ciu_drv not available\n"); in dw_mci_rk3288_parse_dt()
222 priv->sample_clk = devm_clk_get(host->dev, "ciu-sample"); in dw_mci_rk3288_parse_dt()
224 dev_dbg(host->dev, "ciu_sample not available\n"); in dw_mci_rk3288_parse_dt()
226 host->priv = priv; in dw_mci_rk3288_parse_dt()
231 static int dw_mci_rockchip_init(struct dw_mci *host) in dw_mci_rockchip_init() argument
234 host->sdio_id0 = 8; in dw_mci_rockchip_init()
237 host->pdata->quirks |= DW_MCI_QUIRK_BROKEN_DTO; in dw_mci_rockchip_init()
290 struct dw_mci *host = dev_get_drvdata(dev); in dw_mci_rockchip_suspend() local
292 return dw_mci_suspend(host); in dw_mci_rockchip_suspend()
297 struct dw_mci *host = dev_get_drvdata(dev); in dw_mci_rockchip_resume() local
299 return dw_mci_resume(host); in dw_mci_rockchip_resume()