Lines Matching refs:mmc

232 	struct mmc_host *mmc;  member
994 static void sh_mmcif_request(struct mmc_host *mmc, struct mmc_request *mrq) in sh_mmcif_request() argument
996 struct sh_mmcif_host *host = mmc_priv(mmc); in sh_mmcif_request()
1006 mmc_request_done(mmc, mrq); in sh_mmcif_request()
1023 mmc_request_done(mmc, mrq); in sh_mmcif_request()
1038 if (host->mmc->f_max) { in sh_mmcif_clk_setup()
1041 f_max = host->mmc->f_max; in sh_mmcif_clk_setup()
1054 host->mmc->f_max = f_max / (1 << ffs(host->clkdiv_map)); in sh_mmcif_clk_setup()
1055 host->mmc->f_min = f_min / (1 << fls(host->clkdiv_map)); in sh_mmcif_clk_setup()
1059 host->mmc->f_max = clk / 2; in sh_mmcif_clk_setup()
1060 host->mmc->f_min = clk / 512; in sh_mmcif_clk_setup()
1064 host->mmc->f_max, host->mmc->f_min); in sh_mmcif_clk_setup()
1069 struct mmc_host *mmc = host->mmc; in sh_mmcif_set_power() local
1071 if (!IS_ERR(mmc->supply.vmmc)) in sh_mmcif_set_power()
1073 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, in sh_mmcif_set_power()
1077 static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in sh_mmcif_set_ios() argument
1079 struct sh_mmcif_host *host = mmc_priv(mmc); in sh_mmcif_set_ios()
1137 static int sh_mmcif_get_cd(struct mmc_host *mmc) in sh_mmcif_get_cd() argument
1139 struct sh_mmcif_host *host = mmc_priv(mmc); in sh_mmcif_get_cd()
1142 int ret = mmc_gpio_get_cd(mmc); in sh_mmcif_get_cd()
1225 dev_err(host->mmc->parent, in sh_mmcif_end_cmd()
1230 dev_err(host->mmc->parent, "DMA timeout!\n"); in sh_mmcif_end_cmd()
1233 dev_err(host->mmc->parent, in sh_mmcif_end_cmd()
1353 mmc_request_done(host->mmc, mrq); in sh_mmcif_irqt()
1446 mmc_request_done(host->mmc, mrq); in sh_mmcif_timeout_work()
1453 struct mmc_host *mmc = host->mmc; in sh_mmcif_init_ocr() local
1455 mmc_regulator_get_supply(mmc); in sh_mmcif_init_ocr()
1460 if (!mmc->ocr_avail) in sh_mmcif_init_ocr()
1461 mmc->ocr_avail = pd->ocr; in sh_mmcif_init_ocr()
1463 dev_warn(mmc_dev(mmc), "Platform OCR mask is ignored\n"); in sh_mmcif_init_ocr()
1469 struct mmc_host *mmc; in sh_mmcif_probe() local
1489 mmc = mmc_alloc_host(sizeof(struct sh_mmcif_host), dev); in sh_mmcif_probe()
1490 if (!mmc) in sh_mmcif_probe()
1493 ret = mmc_of_parse(mmc); in sh_mmcif_probe()
1497 host = mmc_priv(mmc); in sh_mmcif_probe()
1498 host->mmc = mmc; in sh_mmcif_probe()
1508 mmc->ops = &sh_mmcif_ops; in sh_mmcif_probe()
1511 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_WAIT_WHILE_BUSY; in sh_mmcif_probe()
1513 mmc->caps |= pd->caps; in sh_mmcif_probe()
1514 mmc->max_segs = 32; in sh_mmcif_probe()
1515 mmc->max_blk_size = 512; in sh_mmcif_probe()
1516 mmc->max_req_size = PAGE_CACHE_SIZE * mmc->max_segs; in sh_mmcif_probe()
1517 mmc->max_blk_count = mmc->max_req_size / mmc->max_blk_size; in sh_mmcif_probe()
1518 mmc->max_seg_size = mmc->max_req_size; in sh_mmcif_probe()
1565 ret = mmc_gpio_request_cd(mmc, pd->cd_gpio, 0); in sh_mmcif_probe()
1572 ret = mmc_add_host(mmc); in sh_mmcif_probe()
1590 mmc_free_host(mmc); in sh_mmcif_probe()
1604 mmc_remove_host(host->mmc); in sh_mmcif_remove()
1615 mmc_free_host(host->mmc); in sh_mmcif_remove()