Lines Matching refs:host
38 #define host_to_priv(host) container_of((host)->pdata, struct sh_mobile_sdhi, mmc_data) argument
91 static void sh_mobile_sdhi_sdbuf_width(struct tmio_mmc_host *host, int width) in sh_mobile_sdhi_sdbuf_width() argument
99 switch (sd_ctrl_read16(host, CTL_VERSION)) { in sh_mobile_sdhi_sdbuf_width()
111 sd_ctrl_write16(host, EXT_ACC, val); in sh_mobile_sdhi_sdbuf_width()
117 struct tmio_mmc_host *host = mmc_priv(mmc); in sh_mobile_sdhi_clk_enable() local
118 struct sh_mobile_sdhi *priv = host_to_priv(host); in sh_mobile_sdhi_clk_enable()
126 sh_mobile_sdhi_sdbuf_width(host, 16); in sh_mobile_sdhi_clk_enable()
134 struct tmio_mmc_host *host = mmc_priv(mmc); in sh_mobile_sdhi_clk_disable() local
135 struct sh_mobile_sdhi *priv = host_to_priv(host); in sh_mobile_sdhi_clk_disable()
139 static int sh_mobile_sdhi_wait_idle(struct tmio_mmc_host *host) in sh_mobile_sdhi_wait_idle() argument
143 while (--timeout && !(sd_ctrl_read16(host, CTL_STATUS2) & (1 << 13))) in sh_mobile_sdhi_wait_idle()
147 dev_warn(&host->pdev->dev, "timeout waiting for SD bus idle\n"); in sh_mobile_sdhi_wait_idle()
154 static int sh_mobile_sdhi_write16_hook(struct tmio_mmc_host *host, int addr) in sh_mobile_sdhi_write16_hook() argument
166 return sh_mobile_sdhi_wait_idle(host); in sh_mobile_sdhi_write16_hook()
190 static void sh_mobile_sdhi_enable_dma(struct tmio_mmc_host *host, bool enable) in sh_mobile_sdhi_enable_dma() argument
192 sd_ctrl_write16(host, CTL_DMA_ENABLE, enable ? 2 : 0); in sh_mobile_sdhi_enable_dma()
195 sh_mobile_sdhi_sdbuf_width(host, enable ? 32 : 16); in sh_mobile_sdhi_enable_dma()
205 struct tmio_mmc_host *host; in sh_mobile_sdhi_probe() local
231 host = tmio_mmc_host_alloc(pdev); in sh_mobile_sdhi_probe()
232 if (!host) { in sh_mobile_sdhi_probe()
237 host->dma = dma_priv; in sh_mobile_sdhi_probe()
238 host->write16_hook = sh_mobile_sdhi_write16_hook; in sh_mobile_sdhi_probe()
239 host->clk_enable = sh_mobile_sdhi_clk_enable; in sh_mobile_sdhi_probe()
240 host->clk_disable = sh_mobile_sdhi_clk_disable; in sh_mobile_sdhi_probe()
241 host->multi_io_quirk = sh_mobile_sdhi_multi_io_quirk; in sh_mobile_sdhi_probe()
244 host->bus_shift = 1; in sh_mobile_sdhi_probe()
246 host->bus_shift = 0; in sh_mobile_sdhi_probe()
287 ret = tmio_mmc_host_probe(host, mmc_data); in sh_mobile_sdhi_probe()
300 dev_name(&pdev->dev), host); in sh_mobile_sdhi_probe()
309 dev_name(&pdev->dev), host); in sh_mobile_sdhi_probe()
318 dev_name(&pdev->dev), host); in sh_mobile_sdhi_probe()
335 dev_name(&pdev->dev), host); in sh_mobile_sdhi_probe()
348 mmc_hostname(host->mmc), (unsigned long) in sh_mobile_sdhi_probe()
350 host->mmc->f_max / 1000000); in sh_mobile_sdhi_probe()
355 tmio_mmc_host_remove(host); in sh_mobile_sdhi_probe()
357 tmio_mmc_host_free(host); in sh_mobile_sdhi_probe()
365 struct tmio_mmc_host *host = mmc_priv(mmc); in sh_mobile_sdhi_remove() local
367 tmio_mmc_host_remove(host); in sh_mobile_sdhi_remove()