Lines Matching refs:mmc

297 	struct mmc_host *mmc;	/* mmc structure */  member
644 if (mmc_card_mmc(host->mmc->card) && mrq->sbc && in msdc_cmd_prepare_raw_cmd()
737 mmc_request_done(host->mmc, mrq); in msdc_request_done()
880 static void msdc_ops_request(struct mmc_host *mmc, struct mmc_request *mrq) in msdc_ops_request() argument
882 struct msdc_host *host = mmc_priv(mmc); in msdc_ops_request()
897 if (mrq->sbc && (!mmc_card_mmc(mmc->card) || in msdc_ops_request()
904 static void msdc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq, in msdc_pre_req() argument
907 struct msdc_host *host = mmc_priv(mmc); in msdc_pre_req()
917 static void msdc_post_req(struct mmc_host *mmc, struct mmc_request *mrq, in msdc_post_req() argument
920 struct msdc_host *host = mmc_priv(mmc); in msdc_post_req()
1020 static int msdc_ops_switch_volt(struct mmc_host *mmc, struct mmc_ios *ios) in msdc_ops_switch_volt() argument
1022 struct msdc_host *host = mmc_priv(mmc); in msdc_ops_switch_volt()
1026 if (!IS_ERR(mmc->supply.vqmmc)) { in msdc_ops_switch_volt()
1038 ret = regulator_set_voltage(mmc->supply.vqmmc, min_uv, max_uv); in msdc_ops_switch_volt()
1054 static int msdc_card_busy(struct mmc_host *mmc) in msdc_card_busy() argument
1056 struct msdc_host *host = mmc_priv(mmc); in msdc_card_busy()
1205 static void msdc_ops_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in msdc_ops_set_ios() argument
1207 struct msdc_host *host = mmc_priv(mmc); in msdc_ops_set_ios()
1217 if (!IS_ERR(mmc->supply.vmmc)) { in msdc_ops_set_ios()
1219 ret = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, in msdc_ops_set_ios()
1228 if (!IS_ERR(mmc->supply.vqmmc) && !host->vqmmc_enabled) { in msdc_ops_set_ios()
1229 ret = regulator_enable(mmc->supply.vqmmc); in msdc_ops_set_ios()
1237 if (!IS_ERR(mmc->supply.vmmc)) in msdc_ops_set_ios()
1238 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); in msdc_ops_set_ios()
1240 if (!IS_ERR(mmc->supply.vqmmc) && host->vqmmc_enabled) { in msdc_ops_set_ios()
1241 regulator_disable(mmc->supply.vqmmc); in msdc_ops_set_ios()
1312 static int msdc_tune_response(struct mmc_host *mmc, u32 opcode) in msdc_tune_response() argument
1314 struct msdc_host *host = mmc_priv(mmc); in msdc_tune_response()
1325 mmc_send_tuning(mmc, opcode, &cmd_err); in msdc_tune_response()
1334 mmc_send_tuning(mmc, opcode, &cmd_err); in msdc_tune_response()
1358 static int msdc_tune_data(struct mmc_host *mmc, u32 opcode) in msdc_tune_data() argument
1360 struct msdc_host *host = mmc_priv(mmc); in msdc_tune_data()
1371 ret = mmc_send_tuning(mmc, opcode, NULL); in msdc_tune_data()
1381 ret = mmc_send_tuning(mmc, opcode, NULL); in msdc_tune_data()
1412 static int msdc_execute_tuning(struct mmc_host *mmc, u32 opcode) in msdc_execute_tuning() argument
1414 struct msdc_host *host = mmc_priv(mmc); in msdc_execute_tuning()
1418 ret = msdc_tune_response(mmc, opcode); in msdc_execute_tuning()
1423 ret = msdc_tune_data(mmc, opcode); in msdc_execute_tuning()
1433 static int msdc_prepare_hs400_tuning(struct mmc_host *mmc, struct mmc_ios *ios) in msdc_prepare_hs400_tuning() argument
1435 struct msdc_host *host = mmc_priv(mmc); in msdc_prepare_hs400_tuning()
1441 static void msdc_hw_reset(struct mmc_host *mmc) in msdc_hw_reset() argument
1443 struct msdc_host *host = mmc_priv(mmc); in msdc_hw_reset()
1464 struct mmc_host *mmc; in msdc_drv_probe() local
1474 mmc = mmc_alloc_host(sizeof(struct msdc_host), &pdev->dev); in msdc_drv_probe()
1475 if (!mmc) in msdc_drv_probe()
1478 host = mmc_priv(mmc); in msdc_drv_probe()
1479 ret = mmc_of_parse(mmc); in msdc_drv_probe()
1490 ret = mmc_regulator_get_supply(mmc); in msdc_drv_probe()
1539 host->mmc = mmc; in msdc_drv_probe()
1542 mmc->ops = &mt_msdc_ops; in msdc_drv_probe()
1543 mmc->f_min = host->src_clk_freq / (4 * 255); in msdc_drv_probe()
1545 mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23; in msdc_drv_probe()
1546 mmc->caps |= MMC_CAP_RUNTIME_RESUME; in msdc_drv_probe()
1548 mmc->max_segs = MAX_BD_NUM; in msdc_drv_probe()
1549 mmc->max_seg_size = BDMA_DESC_BUFLEN; in msdc_drv_probe()
1550 mmc->max_blk_size = 2048; in msdc_drv_probe()
1551 mmc->max_req_size = 512 * 1024; in msdc_drv_probe()
1552 mmc->max_blk_count = mmc->max_req_size / 512; in msdc_drv_probe()
1554 mmc_dev(mmc)->dma_mask = &host->dma_mask; in msdc_drv_probe()
1571 platform_set_drvdata(pdev, mmc); in msdc_drv_probe()
1584 ret = mmc_add_host(mmc); in msdc_drv_probe()
1606 mmc_free_host(mmc); in msdc_drv_probe()
1613 struct mmc_host *mmc; in msdc_drv_remove() local
1616 mmc = platform_get_drvdata(pdev); in msdc_drv_remove()
1617 host = mmc_priv(mmc); in msdc_drv_remove()
1622 mmc_remove_host(host->mmc); in msdc_drv_remove()
1634 mmc_free_host(host->mmc); in msdc_drv_remove()
1666 struct mmc_host *mmc = dev_get_drvdata(dev); in msdc_runtime_suspend() local
1667 struct msdc_host *host = mmc_priv(mmc); in msdc_runtime_suspend()
1676 struct mmc_host *mmc = dev_get_drvdata(dev); in msdc_runtime_resume() local
1677 struct msdc_host *host = mmc_priv(mmc); in msdc_runtime_resume()