Lines Matching refs:host

150 static void st_mmcss_cconfig(struct device_node *np, struct sdhci_host *host)  in st_mmcss_cconfig()  argument
152 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); in st_mmcss_cconfig()
153 struct mmc_host *mhost = host->mmc; in st_mmcss_cconfig()
165 host->ioaddr + ST_MMC_CCONFIG_REG_1); in st_mmcss_cconfig()
184 writel_relaxed(cconf2, host->ioaddr + ST_MMC_CCONFIG_REG_2); in st_mmcss_cconfig()
191 host->ioaddr + ST_MMC_GP_OUTPUT); in st_mmcss_cconfig()
217 writel_relaxed(cconf3, host->ioaddr + ST_MMC_CCONFIG_REG_3); in st_mmcss_cconfig()
218 writel_relaxed(cconf4, host->ioaddr + ST_MMC_CCONFIG_REG_4); in st_mmcss_cconfig()
219 writel_relaxed(cconf5, host->ioaddr + ST_MMC_CCONFIG_REG_5); in st_mmcss_cconfig()
250 static int sdhci_st_set_dll_for_clock(struct sdhci_host *host) in sdhci_st_set_dll_for_clock() argument
253 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); in sdhci_st_set_dll_for_clock()
256 if (host->clock > CLK_TO_CHECK_DLL_LOCK) { in sdhci_st_set_dll_for_clock()
258 ret = st_mmcss_lock_dll(host->ioaddr); in sdhci_st_set_dll_for_clock()
264 static void sdhci_st_set_uhs_signaling(struct sdhci_host *host, in sdhci_st_set_uhs_signaling() argument
267 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); in sdhci_st_set_uhs_signaling()
269 u16 ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); in sdhci_st_set_uhs_signaling()
291 ret = sdhci_st_set_dll_for_clock(host); in sdhci_st_set_uhs_signaling()
297 ret = sdhci_st_set_dll_for_clock(host); in sdhci_st_set_uhs_signaling()
307 dev_warn(mmc_dev(host->mmc), "Error setting dll for clock " in sdhci_st_set_uhs_signaling()
310 dev_dbg(mmc_dev(host->mmc), "uhs %d, ctrl_2 %04X\n", uhs, ctrl_2); in sdhci_st_set_uhs_signaling()
312 sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2); in sdhci_st_set_uhs_signaling()
315 static u32 sdhci_st_readl(struct sdhci_host *host, int reg) in sdhci_st_readl() argument
321 ret = readl_relaxed(host->ioaddr + reg); in sdhci_st_readl()
326 ret = readl_relaxed(host->ioaddr + reg); in sdhci_st_readl()
353 struct sdhci_host *host; in sdhci_st_probe() local
377 host = sdhci_pltfm_init(pdev, &sdhci_st_pdata, 0); in sdhci_st_probe()
378 if (IS_ERR(host)) { in sdhci_st_probe()
380 ret = PTR_ERR(host); in sdhci_st_probe()
384 ret = mmc_of_parse(host->mmc); in sdhci_st_probe()
401 pltfm_host = sdhci_priv(host); in sdhci_st_probe()
406 st_mmcss_cconfig(np, host); in sdhci_st_probe()
408 ret = sdhci_add_host(host); in sdhci_st_probe()
414 platform_set_drvdata(pdev, host); in sdhci_st_probe()
416 host_version = readw_relaxed((host->ioaddr + SDHCI_HOST_VERSION)); in sdhci_st_probe()
438 struct sdhci_host *host = platform_get_drvdata(pdev); in sdhci_st_remove() local
439 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); in sdhci_st_remove()
454 struct sdhci_host *host = dev_get_drvdata(dev); in sdhci_st_suspend() local
455 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); in sdhci_st_suspend()
457 int ret = sdhci_suspend_host(host); in sdhci_st_suspend()
472 struct sdhci_host *host = dev_get_drvdata(dev); in sdhci_st_resume() local
473 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); in sdhci_st_resume()
482 st_mmcss_cconfig(np, host); in sdhci_st_resume()
484 return sdhci_resume_host(host); in sdhci_st_resume()