Lines Matching refs:mmc
126 struct mmc_host *mmc; member
243 if (!IS_ERR(host->mmc->supply.vmmc)) { in mxcmci_set_power()
245 mmc_regulator_set_ocr(host->mmc, in mxcmci_set_power()
246 host->mmc->supply.vmmc, vdd); in mxcmci_set_power()
248 mmc_regulator_set_ocr(host->mmc, in mxcmci_set_power()
249 host->mmc->supply.vmmc, 0); in mxcmci_set_power()
253 host->pdata->setpower(mmc_dev(host->mmc), vdd); in mxcmci_set_power()
265 dev_dbg(mmc_dev(host->mmc), "mxcmci_softreset\n"); in mxcmci_softreset()
377 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); in mxcmci_dma_callback()
405 dev_err(mmc_dev(host->mmc), "unhandled response type 0x%x\n", in mxcmci_start_cmd()
451 mmc_request_done(host->mmc, req); in mxcmci_finish_request()
466 dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n", in mxcmci_finish_data()
469 dev_err(mmc_dev(host->mmc), "%s: -EILSEQ\n", __func__); in mxcmci_finish_data()
474 dev_err(mmc_dev(host->mmc), in mxcmci_finish_data()
478 dev_err(mmc_dev(host->mmc), in mxcmci_finish_data()
483 dev_err(mmc_dev(host->mmc), in mxcmci_finish_data()
487 dev_err(mmc_dev(host->mmc), "%s: -EIO\n", __func__); in mxcmci_finish_data()
511 dev_dbg(mmc_dev(host->mmc), "CMD TIMEOUT\n"); in mxcmci_read_response()
514 dev_dbg(mmc_dev(host->mmc), "cmd crc error\n"); in mxcmci_read_response()
732 dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); in mxcmci_irq()
743 mmc_signal_sdio_irq(host->mmc); in mxcmci_irq()
756 mmc_detect_change(host->mmc, msecs_to_jiffies(200)); in mxcmci_irq()
761 static void mxcmci_request(struct mmc_host *mmc, struct mmc_request *req) in mxcmci_request() argument
763 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_request()
825 dev_dbg(mmc_dev(host->mmc), "scaler: %d divider: %d in: %d out: %d\n", in mxcmci_set_clk_rate()
829 static int mxcmci_setup_dma(struct mmc_host *mmc) in mxcmci_setup_dma() argument
831 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_setup_dma()
845 static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in mxcmci_set_ios() argument
847 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_set_ios()
861 ret = mxcmci_setup_dma(mmc); in mxcmci_set_ios()
863 dev_err(mmc_dev(host->mmc), in mxcmci_set_ios()
896 struct mmc_host *mmc = data; in mxcmci_detect_irq() local
898 dev_dbg(mmc_dev(mmc), "%s\n", __func__); in mxcmci_detect_irq()
900 mmc_detect_change(mmc, msecs_to_jiffies(250)); in mxcmci_detect_irq()
904 static int mxcmci_get_ro(struct mmc_host *mmc) in mxcmci_get_ro() argument
906 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_get_ro()
909 return !!host->pdata->get_ro(mmc_dev(mmc)); in mxcmci_get_ro()
915 return mmc_gpio_get_ro(mmc); in mxcmci_get_ro()
918 static void mxcmci_enable_sdio_irq(struct mmc_host *mmc, int enable) in mxcmci_enable_sdio_irq() argument
920 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_enable_sdio_irq()
968 struct mmc_host *mmc = (struct mmc_host *)data; in mxcmci_watchdog() local
969 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_watchdog()
975 dev_err(mmc_dev(host->mmc), in mxcmci_watchdog()
979 dev_err(mmc_dev(host->mmc), in mxcmci_watchdog()
992 mmc_request_done(host->mmc, req); in mxcmci_watchdog()
1005 struct mmc_host *mmc; in mxcmci_probe() local
1023 mmc = mmc_alloc_host(sizeof(*host), &pdev->dev); in mxcmci_probe()
1024 if (!mmc) in mxcmci_probe()
1027 host = mmc_priv(mmc); in mxcmci_probe()
1037 ret = mmc_of_parse(mmc); in mxcmci_probe()
1040 mmc->ops = &mxcmci_ops; in mxcmci_probe()
1044 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; in mxcmci_probe()
1046 mmc->caps |= MMC_CAP_SDIO_IRQ; in mxcmci_probe()
1049 mmc->max_blk_size = 2048; in mxcmci_probe()
1050 mmc->max_blk_count = 65535; in mxcmci_probe()
1051 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; in mxcmci_probe()
1052 mmc->max_seg_size = mmc->max_req_size; in mxcmci_probe()
1063 mmc->max_segs = 64; in mxcmci_probe()
1065 host->mmc = mmc; in mxcmci_probe()
1071 else if (!(mmc->caps & MMC_CAP_NONREMOVABLE) in mxcmci_probe()
1075 ret = mmc_regulator_get_supply(mmc); in mxcmci_probe()
1079 if (!mmc->ocr_avail) { in mxcmci_probe()
1081 mmc->ocr_avail = pdata->ocr_avail; in mxcmci_probe()
1083 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; in mxcmci_probe()
1112 dev_err(mmc_dev(host->mmc), "wrong rev.no. 0x%08x. aborting.\n", in mxcmci_probe()
1117 mmc->f_min = clk_get_rate(host->clk_per) >> 16; in mxcmci_probe()
1118 mmc->f_max = clk_get_rate(host->clk_per) >> 1; in mxcmci_probe()
1140 mmc->max_seg_size = dma_get_max_seg_size( in mxcmci_probe()
1143 dev_info(mmc_dev(host->mmc), "dma not available. Using PIO\n"); in mxcmci_probe()
1152 platform_set_drvdata(pdev, mmc); in mxcmci_probe()
1156 host->mmc); in mxcmci_probe()
1163 host->watchdog.data = (unsigned long)mmc; in mxcmci_probe()
1165 mmc_add_host(mmc); in mxcmci_probe()
1178 mmc_free_host(mmc); in mxcmci_probe()
1185 struct mmc_host *mmc = platform_get_drvdata(pdev); in mxcmci_remove() local
1186 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_remove()
1188 mmc_remove_host(mmc); in mxcmci_remove()
1191 host->pdata->exit(&pdev->dev, mmc); in mxcmci_remove()
1199 mmc_free_host(mmc); in mxcmci_remove()
1206 struct mmc_host *mmc = dev_get_drvdata(dev); in mxcmci_suspend() local
1207 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_suspend()
1216 struct mmc_host *mmc = dev_get_drvdata(dev); in mxcmci_resume() local
1217 struct mxcmci_host *host = mmc_priv(mmc); in mxcmci_resume()