• Home
  • Raw
  • Download

Lines Matching refs:mmc

128 static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)  in tmio_mmc_enable_sdio_irq()  argument
130 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_enable_sdio_irq()
149 for (clock = host->mmc->f_min, clk = 0x80000080; in tmio_mmc_set_clock()
253 mmc_request_done(host->mmc, mrq); in tmio_mmc_reset_work()
282 mmc_request_done(host->mmc, mrq); in tmio_mmc_finish_request()
571 struct mmc_host *mmc = host->mmc; in __tmio_mmc_card_detect_irq() local
577 if ((((ireg & TMIO_STAT_CARD_REMOVE) && mmc->card) || in __tmio_mmc_card_detect_irq()
578 ((ireg & TMIO_STAT_CARD_INSERT) && !mmc->card)) && in __tmio_mmc_card_detect_irq()
579 !work_pending(&mmc->detect.work)) in __tmio_mmc_card_detect_irq()
580 mmc_detect_change(host->mmc, msecs_to_jiffies(100)); in __tmio_mmc_card_detect_irq()
643 struct mmc_host *mmc = host->mmc; in tmio_mmc_sdio_irq() local
655 if (mmc->caps & MMC_CAP_SDIO_IRQ && ireg & TMIO_SDIO_STAT_IOIRQ) in tmio_mmc_sdio_irq()
656 mmc_signal_sdio_irq(mmc); in tmio_mmc_sdio_irq()
690 if (host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) { in tmio_mmc_start_data()
695 mmc_hostname(host->mmc), data->blksz); in tmio_mmc_start_data()
713 static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) in tmio_mmc_request() argument
715 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_request()
726 mmc_request_done(mmc, mrq); in tmio_mmc_request()
754 mmc_request_done(mmc, mrq); in tmio_mmc_request()
757 static int tmio_mmc_clk_update(struct mmc_host *mmc) in tmio_mmc_clk_update() argument
759 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_clk_update()
766 ret = pdata->clk_enable(host->pdev, &mmc->f_max); in tmio_mmc_clk_update()
768 mmc->f_min = mmc->f_max / 512; in tmio_mmc_clk_update()
775 struct mmc_host *mmc = host->mmc; in tmio_mmc_power_on() local
783 if (!IS_ERR(mmc->supply.vmmc)) { in tmio_mmc_power_on()
784 ret = mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, vdd); in tmio_mmc_power_on()
797 if (!IS_ERR(mmc->supply.vqmmc) && !ret) { in tmio_mmc_power_on()
798 regulator_enable(mmc->supply.vqmmc); in tmio_mmc_power_on()
805 struct mmc_host *mmc = host->mmc; in tmio_mmc_power_off() local
807 if (!IS_ERR(mmc->supply.vqmmc)) in tmio_mmc_power_off()
808 regulator_disable(mmc->supply.vqmmc); in tmio_mmc_power_off()
810 if (!IS_ERR(mmc->supply.vmmc)) in tmio_mmc_power_off()
811 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); in tmio_mmc_power_off()
823 static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in tmio_mmc_set_ios() argument
825 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_set_ios()
863 tmio_mmc_clk_update(mmc); in tmio_mmc_set_ios()
910 static int tmio_mmc_get_ro(struct mmc_host *mmc) in tmio_mmc_get_ro() argument
912 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_get_ro()
914 int ret = mmc_gpio_get_ro(mmc); in tmio_mmc_get_ro()
922 static int tmio_mmc_get_cd(struct mmc_host *mmc) in tmio_mmc_get_cd() argument
924 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_get_cd()
926 int ret = mmc_gpio_get_cd(mmc); in tmio_mmc_get_cd()
947 struct mmc_host *mmc = host->mmc; in tmio_mmc_init_ocr() local
949 mmc_regulator_get_supply(mmc); in tmio_mmc_init_ocr()
951 if (!mmc->ocr_avail) in tmio_mmc_init_ocr()
952 mmc->ocr_avail = pdata->ocr_mask ? : MMC_VDD_32_33 | MMC_VDD_33_34; in tmio_mmc_init_ocr()
954 dev_warn(mmc_dev(mmc), "Platform OCR mask is ignored\n"); in tmio_mmc_init_ocr()
973 struct mmc_host *mmc; in tmio_mmc_host_probe() local
987 mmc = mmc_alloc_host(sizeof(struct tmio_mmc_host), &pdev->dev); in tmio_mmc_host_probe()
988 if (!mmc) in tmio_mmc_host_probe()
991 mmc_of_parse(mmc); in tmio_mmc_host_probe()
994 _host = mmc_priv(mmc); in tmio_mmc_host_probe()
996 _host->mmc = mmc; in tmio_mmc_host_probe()
998 platform_set_drvdata(pdev, mmc); in tmio_mmc_host_probe()
1012 mmc->ops = &tmio_mmc_ops; in tmio_mmc_host_probe()
1013 mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities; in tmio_mmc_host_probe()
1014 mmc->caps2 = pdata->capabilities2; in tmio_mmc_host_probe()
1015 mmc->max_segs = 32; in tmio_mmc_host_probe()
1016 mmc->max_blk_size = 512; in tmio_mmc_host_probe()
1017 mmc->max_blk_count = (PAGE_CACHE_SIZE / mmc->max_blk_size) * in tmio_mmc_host_probe()
1018 mmc->max_segs; in tmio_mmc_host_probe()
1019 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; in tmio_mmc_host_probe()
1020 mmc->max_seg_size = mmc->max_req_size; in tmio_mmc_host_probe()
1024 mmc->caps & MMC_CAP_NEEDS_POLL || in tmio_mmc_host_probe()
1025 mmc->caps & MMC_CAP_NONREMOVABLE || in tmio_mmc_host_probe()
1026 mmc->slot.cd_irq >= 0); in tmio_mmc_host_probe()
1034 if (tmio_mmc_clk_update(mmc) < 0) { in tmio_mmc_host_probe()
1035 mmc->f_max = pdata->hclk; in tmio_mmc_host_probe()
1036 mmc->f_min = mmc->f_max / 512; in tmio_mmc_host_probe()
1071 tmio_mmc_enable_sdio_irq(mmc, 0); in tmio_mmc_host_probe()
1083 ret = mmc_add_host(mmc); in tmio_mmc_host_probe()
1094 ret = mmc_gpio_request_cd(mmc, pdata->cd_gpio); in tmio_mmc_host_probe()
1109 mmc_free_host(mmc); in tmio_mmc_host_probe()
1118 struct mmc_host *mmc = host->mmc; in tmio_mmc_host_remove() local
1125 mmc_remove_host(mmc); in tmio_mmc_host_remove()
1134 mmc_free_host(mmc); in tmio_mmc_host_remove()
1141 struct mmc_host *mmc = dev_get_drvdata(dev); in tmio_mmc_host_suspend() local
1142 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_host_suspend()
1143 int ret = mmc_suspend_host(mmc); in tmio_mmc_host_suspend()
1154 struct mmc_host *mmc = dev_get_drvdata(dev); in tmio_mmc_host_resume() local
1155 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_host_resume()
1161 return mmc_resume_host(mmc); in tmio_mmc_host_resume()
1175 struct mmc_host *mmc = dev_get_drvdata(dev); in tmio_mmc_host_runtime_resume() local
1176 struct tmio_mmc_host *host = mmc_priv(mmc); in tmio_mmc_host_runtime_resume()