Lines Matching refs:mmc

159 	struct mmc_host *mmc;  member
212 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_write()
219 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_write16()
226 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_read()
234 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_read16()
286 dev_dbg(mmc_dev(host->mmc), in usdhi6_error_code()
290 dev_warn(mmc_dev(host->mmc), in usdhi6_error_code()
298 dev_warn(mmc_dev(host->mmc), "Err sts 0x%x, state %u, CMD%d\n", in usdhi6_error_code()
320 dev_dbg(mmc_dev(host->mmc), "%s(): CMD%u of %u SG: %ux%u @ 0x%x\n", in usdhi6_blk_bounce()
387 dev_dbg(mmc_dev(host->mmc), "Mapped %p (%lx) at %p + %u for CMD%u @ 0x%p\n", in usdhi6_sg_map()
466 dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %zu\n", __func__, in usdhi6_sg_advance()
510 dev_dbg(mmc_dev(host->mmc), "Mapped %p (%lx) at %p for CMD%u @ 0x%p\n", in usdhi6_sg_advance()
556 dev_name(mmc_dev(host->mmc)), mrq)) in usdhi6_dma_complete()
559 dev_dbg(mmc_dev(host->mmc), "%s(): CMD%u DMA completed\n", __func__, in usdhi6_dma_complete()
600 dev_dbg(mmc_dev(host->mmc), "%s(): mapped %d -> %d, cookie %d @ %p\n", in usdhi6_dma_setup()
608 dev_warn(mmc_dev(host->mmc), in usdhi6_dma_setup()
630 dev_dbg(mmc_dev(host->mmc), "%s(): SG of %u: %ux%u\n", in usdhi6_dma_kill()
643 dev_dbg(mmc_dev(host->mmc), "%s(): IO error %d, status 0x%x\n", in usdhi6_dma_check_error()
651 dev_warn(mmc_dev(host->mmc), in usdhi6_dma_check_error()
662 dev_warn(mmc_dev(host->mmc), "Unexpected response received!\n"); in usdhi6_dma_check_error()
681 host->chan_tx = dma_request_chan(mmc_dev(host->mmc), "tx"); in usdhi6_dma_request()
682 dev_dbg(mmc_dev(host->mmc), "%s: TX: got channel %p\n", __func__, in usdhi6_dma_request()
698 host->chan_rx = dma_request_chan(mmc_dev(host->mmc), "rx"); in usdhi6_dma_request()
699 dev_dbg(mmc_dev(host->mmc), "%s: RX: got channel %p\n", __func__, in usdhi6_dma_request()
740 dev_err(mmc_dev(host->mmc), "SD bus busy, clock set aborted\n"); in usdhi6_clk_set()
769 dev_dbg(mmc_dev(host->mmc), "target %lu, div %u, set %lu\n", in usdhi6_clk_set()
796 struct mmc_host *mmc = host->mmc; in usdhi6_set_power() local
798 if (!IS_ERR(mmc->supply.vmmc)) in usdhi6_set_power()
800 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, in usdhi6_set_power()
818 static void usdhi6_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in usdhi6_set_ios() argument
820 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_set_ios()
824 dev_dbg(mmc_dev(mmc), "%uHz, OCR: %u, power %u, bus-width %u, timing %u\n", in usdhi6_set_ios()
839 dev_err(mmc_dev(mmc), "Cannot reset the interface!\n"); in usdhi6_set_ios()
854 dev_err(mmc_dev(mmc), in usdhi6_set_ios()
893 dev_dbg(mmc_dev(host->mmc), "Set %s timeout %lu ticks @ %lu Hz\n", in usdhi6_timeout_set()
917 dev_dbg(mmc_dev(host->mmc), "%s(CMD%d: %ux%u): err %d %d %d\n", in usdhi6_request_done()
929 mmc_request_done(host->mmc, mrq); in usdhi6_request_done()
975 dev_warn(mmc_dev(host->mmc), in usdhi6_cmd_flags()
1003 dev_dbg(mmc_dev(host->mmc), "Command active, request aborted\n"); in usdhi6_rq_start()
1034 dev_warn(mmc_dev(host->mmc), "%s(): %u blocks of %u bytes\n", in usdhi6_rq_start()
1051 dev_dbg(mmc_dev(host->mmc), in usdhi6_rq_start()
1063 dev_dbg(mmc_dev(host->mmc), in usdhi6_rq_start()
1070 dev_dbg(mmc_dev(host->mmc), "%s(): request opcode %u\n", in usdhi6_rq_start()
1091 static void usdhi6_request(struct mmc_host *mmc, struct mmc_request *mrq) in usdhi6_request() argument
1093 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_request()
1109 static int usdhi6_get_cd(struct mmc_host *mmc) in usdhi6_get_cd() argument
1111 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_get_cd()
1122 return !status ^ !(mmc->caps2 & MMC_CAP2_CD_ACTIVE_HIGH); in usdhi6_get_cd()
1125 static int usdhi6_get_ro(struct mmc_host *mmc) in usdhi6_get_ro() argument
1127 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_get_ro()
1138 return !status ^ !(mmc->caps2 & MMC_CAP2_RO_ACTIVE_HIGH); in usdhi6_get_ro()
1141 static void usdhi6_enable_sdio_irq(struct mmc_host *mmc, int enable) in usdhi6_enable_sdio_irq() argument
1143 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_enable_sdio_irq()
1145 dev_dbg(mmc_dev(mmc), "%s(): %sable\n", __func__, enable ? "en" : "dis"); in usdhi6_enable_sdio_irq()
1170 return pinctrl_select_default_state(mmc_dev(host->mmc)); in usdhi6_set_pinstates()
1174 static int usdhi6_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios) in usdhi6_sig_volt_switch() argument
1178 ret = mmc_regulator_set_vqmmc(mmc, ios); in usdhi6_sig_volt_switch()
1182 ret = usdhi6_set_pinstates(mmc_priv(mmc), ios->signal_voltage); in usdhi6_sig_volt_switch()
1184 dev_warn_once(mmc_dev(mmc), in usdhi6_sig_volt_switch()
1189 static int usdhi6_card_busy(struct mmc_host *mmc) in usdhi6_card_busy() argument
1191 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_card_busy()
1240 dev_err(mmc_dev(host->mmc), in usdhi6_resp_read()
1259 dev_dbg(mmc_dev(host->mmc), "Response 0x%x\n", rsp[0]); in usdhi6_resp_read()
1297 dev_dbg(mmc_dev(host->mmc), "%s(): %d\n", __func__, data->error); in usdhi6_blk_read()
1340 dev_dbg(mmc_dev(host->mmc), "%s(): %d\n", __func__, data->error); in usdhi6_blk_write()
1358 dev_err(mmc_dev(host->mmc), in usdhi6_stop_cmd()
1520 dev_warn(mmc_dev(host->mmc), "%s(): %d\n", __func__, ret); in usdhi6_sd_bh()
1529 dev_warn(mmc_dev(host->mmc), "%s(): %d\n", __func__, in usdhi6_sd_bh()
1535 dev_err(mmc_dev(host->mmc), "Invalid state %u\n", host->wait); in usdhi6_sd_bh()
1567 dev_warn(mmc_dev(host->mmc), "%s(): data error %d\n", in usdhi6_sd_bh()
1592 dev_dbg(mmc_dev(host->mmc), in usdhi6_sd()
1621 dev_warn(mmc_dev(host->mmc), in usdhi6_sd()
1625 dev_dbg(mmc_dev(host->mmc), in usdhi6_sd()
1638 dev_dbg(mmc_dev(host->mmc), "%s(): status 0x%x\n", __func__, status); in usdhi6_sdio()
1645 mmc_signal_sdio_irq(host->mmc); in usdhi6_sdio()
1653 struct mmc_host *mmc = host->mmc; in usdhi6_cd() local
1666 if (!work_pending(&mmc->detect.work) && in usdhi6_cd()
1668 !mmc->card) || in usdhi6_cd()
1670 mmc->card))) in usdhi6_cd()
1671 mmc_detect_change(mmc, msecs_to_jiffies(100)); in usdhi6_cd()
1689 dev_warn(mmc_dev(host->mmc), in usdhi6_timeout_work()
1703 dev_err(mmc_dev(host->mmc), "Invalid state %u\n", host->wait); in usdhi6_timeout_work()
1720 dev_dbg(mmc_dev(host->mmc), in usdhi6_timeout_work()
1747 struct mmc_host *mmc; in usdhi6_probe() local
1763 mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev); in usdhi6_probe()
1764 if (!mmc) in usdhi6_probe()
1767 ret = mmc_regulator_get_supply(mmc); in usdhi6_probe()
1771 ret = mmc_of_parse(mmc); in usdhi6_probe()
1775 host = mmc_priv(mmc); in usdhi6_probe()
1776 host->mmc = mmc; in usdhi6_probe()
1783 mmc->max_busy_timeout = USDHI6_REQ_TIMEOUT_MS; in usdhi6_probe()
1830 mmc->caps |= MMC_CAP_NEEDS_POLL; in usdhi6_probe()
1847 mmc->ops = &usdhi6_ops; in usdhi6_probe()
1848 mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | in usdhi6_probe()
1851 mmc->max_segs = 32; in usdhi6_probe()
1852 mmc->max_blk_size = 512; in usdhi6_probe()
1853 mmc->max_req_size = PAGE_SIZE * mmc->max_segs; in usdhi6_probe()
1854 mmc->max_blk_count = mmc->max_req_size / mmc->max_blk_size; in usdhi6_probe()
1863 mmc->max_seg_size = mmc->max_req_size; in usdhi6_probe()
1864 if (!mmc->f_max) in usdhi6_probe()
1865 mmc->f_max = host->imclk; in usdhi6_probe()
1866 mmc->f_min = host->imclk / 512; in usdhi6_probe()
1870 ret = mmc_add_host(mmc); in usdhi6_probe()
1881 mmc_free_host(mmc); in usdhi6_probe()
1890 mmc_remove_host(host->mmc); in usdhi6_remove()
1896 mmc_free_host(host->mmc); in usdhi6_remove()