Lines Matching refs:mmc
159 struct mmc_host *mmc; member
208 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_write()
215 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_write16()
222 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_read()
230 dev_vdbg(mmc_dev(host->mmc), "%s(0x%p + 0x%x) = 0x%x\n", __func__, in usdhi6_read16()
282 dev_dbg(mmc_dev(host->mmc), in usdhi6_error_code()
286 dev_warn(mmc_dev(host->mmc), in usdhi6_error_code()
294 dev_warn(mmc_dev(host->mmc), "Err sts 0x%x, state %u, CMD%d\n", in usdhi6_error_code()
316 dev_dbg(mmc_dev(host->mmc), "%s(): CMD%u of %u SG: %ux%u @ 0x%x\n", in usdhi6_blk_bounce()
383 dev_dbg(mmc_dev(host->mmc), "Mapped %p (%lx) at %p + %u for CMD%u @ 0x%p\n", in usdhi6_sg_map()
462 dev_dbg(mmc_dev(host->mmc), "%s(): %zu of %zu @ %zu\n", __func__, in usdhi6_sg_advance()
506 dev_dbg(mmc_dev(host->mmc), "Mapped %p (%lx) at %p for CMD%u @ 0x%p\n", in usdhi6_sg_advance()
552 dev_name(mmc_dev(host->mmc)), mrq)) in usdhi6_dma_complete()
555 dev_dbg(mmc_dev(host->mmc), "%s(): CMD%u DMA completed\n", __func__, in usdhi6_dma_complete()
596 dev_dbg(mmc_dev(host->mmc), "%s(): mapped %d -> %d, cookie %d @ %p\n", in usdhi6_dma_setup()
604 dev_warn(mmc_dev(host->mmc), in usdhi6_dma_setup()
626 dev_dbg(mmc_dev(host->mmc), "%s(): SG of %u: %ux%u\n", in usdhi6_dma_kill()
639 dev_dbg(mmc_dev(host->mmc), "%s(): IO error %d, status 0x%x\n", in usdhi6_dma_check_error()
647 dev_warn(mmc_dev(host->mmc), in usdhi6_dma_check_error()
658 dev_warn(mmc_dev(host->mmc), "Unexpected response received!\n"); in usdhi6_dma_check_error()
677 host->chan_tx = dma_request_slave_channel(mmc_dev(host->mmc), "tx"); in usdhi6_dma_request()
678 dev_dbg(mmc_dev(host->mmc), "%s: TX: got channel %p\n", __func__, in usdhi6_dma_request()
692 host->chan_rx = dma_request_slave_channel(mmc_dev(host->mmc), "rx"); in usdhi6_dma_request()
693 dev_dbg(mmc_dev(host->mmc), "%s: RX: got channel %p\n", __func__, in usdhi6_dma_request()
732 dev_err(mmc_dev(host->mmc), "SD bus busy, clock set aborted\n"); in usdhi6_clk_set()
761 dev_dbg(mmc_dev(host->mmc), "target %lu, div %u, set %lu\n", in usdhi6_clk_set()
788 struct mmc_host *mmc = host->mmc; in usdhi6_set_power() local
790 if (!IS_ERR(mmc->supply.vmmc)) in usdhi6_set_power()
792 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, in usdhi6_set_power()
810 static void usdhi6_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in usdhi6_set_ios() argument
812 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_set_ios()
816 dev_dbg(mmc_dev(mmc), "%uHz, OCR: %u, power %u, bus-width %u, timing %u\n", in usdhi6_set_ios()
831 dev_err(mmc_dev(mmc), "Cannot reset the interface!\n"); in usdhi6_set_ios()
846 dev_err(mmc_dev(mmc), in usdhi6_set_ios()
885 dev_dbg(mmc_dev(host->mmc), "Set %s timeout %lu ticks @ %lu Hz\n", in usdhi6_timeout_set()
909 dev_dbg(mmc_dev(host->mmc), "%s(CMD%d: %ux%u): err %d %d %d\n", in usdhi6_request_done()
921 mmc_request_done(host->mmc, mrq); in usdhi6_request_done()
967 dev_warn(mmc_dev(host->mmc), in usdhi6_cmd_flags()
995 dev_dbg(mmc_dev(host->mmc), "Command active, request aborted\n"); in usdhi6_rq_start()
1026 dev_warn(mmc_dev(host->mmc), "%s(): %u blocks of %u bytes\n", in usdhi6_rq_start()
1043 dev_dbg(mmc_dev(host->mmc), in usdhi6_rq_start()
1055 dev_dbg(mmc_dev(host->mmc), in usdhi6_rq_start()
1062 dev_dbg(mmc_dev(host->mmc), "%s(): request opcode %u\n", in usdhi6_rq_start()
1083 static void usdhi6_request(struct mmc_host *mmc, struct mmc_request *mrq) in usdhi6_request() argument
1085 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_request()
1101 static int usdhi6_get_cd(struct mmc_host *mmc) in usdhi6_get_cd() argument
1103 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_get_cd()
1114 return !status ^ !(mmc->caps2 & MMC_CAP2_CD_ACTIVE_HIGH); in usdhi6_get_cd()
1117 static int usdhi6_get_ro(struct mmc_host *mmc) in usdhi6_get_ro() argument
1119 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_get_ro()
1130 return !status ^ !(mmc->caps2 & MMC_CAP2_RO_ACTIVE_HIGH); in usdhi6_get_ro()
1133 static void usdhi6_enable_sdio_irq(struct mmc_host *mmc, int enable) in usdhi6_enable_sdio_irq() argument
1135 struct usdhi6_host *host = mmc_priv(mmc); in usdhi6_enable_sdio_irq()
1137 dev_dbg(mmc_dev(mmc), "%s(): %sable\n", __func__, enable ? "en" : "dis"); in usdhi6_enable_sdio_irq()
1190 dev_err(mmc_dev(host->mmc), in usdhi6_resp_read()
1209 dev_dbg(mmc_dev(host->mmc), "Response 0x%x\n", rsp[0]); in usdhi6_resp_read()
1247 dev_dbg(mmc_dev(host->mmc), "%s(): %d\n", __func__, data->error); in usdhi6_blk_read()
1290 dev_dbg(mmc_dev(host->mmc), "%s(): %d\n", __func__, data->error); in usdhi6_blk_write()
1308 dev_err(mmc_dev(host->mmc), in usdhi6_stop_cmd()
1470 dev_warn(mmc_dev(host->mmc), "%s(): %d\n", __func__, ret); in usdhi6_sd_bh()
1479 dev_warn(mmc_dev(host->mmc), "%s(): %d\n", __func__, in usdhi6_sd_bh()
1485 dev_err(mmc_dev(host->mmc), "Invalid state %u\n", host->wait); in usdhi6_sd_bh()
1517 dev_warn(mmc_dev(host->mmc), "%s(): data error %d\n", in usdhi6_sd_bh()
1542 dev_dbg(mmc_dev(host->mmc), in usdhi6_sd()
1571 dev_warn(mmc_dev(host->mmc), in usdhi6_sd()
1575 dev_dbg(mmc_dev(host->mmc), in usdhi6_sd()
1588 dev_dbg(mmc_dev(host->mmc), "%s(): status 0x%x\n", __func__, status); in usdhi6_sdio()
1595 mmc_signal_sdio_irq(host->mmc); in usdhi6_sdio()
1603 struct mmc_host *mmc = host->mmc; in usdhi6_cd() local
1616 if (!work_pending(&mmc->detect.work) && in usdhi6_cd()
1618 !mmc->card) || in usdhi6_cd()
1620 mmc->card))) in usdhi6_cd()
1621 mmc_detect_change(mmc, msecs_to_jiffies(100)); in usdhi6_cd()
1639 dev_warn(mmc_dev(host->mmc), in usdhi6_timeout_work()
1653 dev_err(mmc_dev(host->mmc), "Invalid state %u\n", host->wait); in usdhi6_timeout_work()
1670 dev_dbg(mmc_dev(host->mmc), in usdhi6_timeout_work()
1700 struct mmc_host *mmc; in usdhi6_probe() local
1716 mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev); in usdhi6_probe()
1717 if (!mmc) in usdhi6_probe()
1720 ret = mmc_regulator_get_supply(mmc); in usdhi6_probe()
1724 ret = mmc_of_parse(mmc); in usdhi6_probe()
1728 host = mmc_priv(mmc); in usdhi6_probe()
1729 host->mmc = mmc; in usdhi6_probe()
1769 mmc->caps |= MMC_CAP_NEEDS_POLL; in usdhi6_probe()
1786 mmc->ops = &usdhi6_ops; in usdhi6_probe()
1787 mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | in usdhi6_probe()
1790 mmc->max_segs = 32; in usdhi6_probe()
1791 mmc->max_blk_size = 512; in usdhi6_probe()
1792 mmc->max_req_size = PAGE_CACHE_SIZE * mmc->max_segs; in usdhi6_probe()
1793 mmc->max_blk_count = mmc->max_req_size / mmc->max_blk_size; in usdhi6_probe()
1802 mmc->max_seg_size = mmc->max_req_size; in usdhi6_probe()
1803 if (!mmc->f_max) in usdhi6_probe()
1804 mmc->f_max = host->imclk; in usdhi6_probe()
1805 mmc->f_min = host->imclk / 512; in usdhi6_probe()
1809 ret = mmc_add_host(mmc); in usdhi6_probe()
1818 mmc_free_host(mmc); in usdhi6_probe()
1827 mmc_remove_host(host->mmc); in usdhi6_remove()
1833 mmc_free_host(host->mmc); in usdhi6_remove()