Lines Matching refs:mmc

2  *  linux/drivers/mmc/host/pxa.c - PXA MMCI driver
28 #include <linux/mmc/host.h>
38 #include <mach/mmc.h>
51 struct mmc_host *mmc;
83 host->vcc = regulator_get(mmc_dev(host->mmc), "vmmc");
88 host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc);
90 dev_warn(mmc_dev(host->mmc),
96 host->mmc->ocr_avail = host->pdata ?
112 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd);
116 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, 0);
128 host->pdata->setpower(mmc_dev(host->mmc), vdd);
149 dev_err(mmc_dev(host->mmc), "unable to stop clock\n");
209 host->dma_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
293 mmc_request_done(host->mmc, mrq);
359 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
409 mmc_signal_sdio_irq(host->mmc);
417 static void pxamci_request(struct mmc_host *mmc, struct mmc_request *mrq)
419 struct pxamci_host *host = mmc_priv(mmc);
446 static int pxamci_get_ro(struct mmc_host *mmc)
448 struct pxamci_host *host = mmc_priv(mmc);
457 return !!host->pdata->get_ro(mmc_dev(mmc));
459 * Board doesn't support read only detection; let the mmc core
465 static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
467 struct pxamci_host *host = mmc_priv(mmc);
512 dev_err(mmc_dev(mmc), "unable to set power\n");
531 dev_dbg(mmc_dev(mmc), "PXAMCI: clkrt = %x cmdat = %x\n",
562 mmc_hostname(host->mmc), dma, dcsr);
578 struct mmc_host *mmc;
592 mmc = mmc_alloc_host(sizeof(struct pxamci_host), &pdev->dev);
593 if (!mmc) {
598 mmc->ops = &pxamci_ops;
604 mmc->max_segs = NR_SG;
609 mmc->max_seg_size = PAGE_SIZE;
614 mmc->max_blk_size = cpu_is_pxa25x() ? 1023 : 2048;
619 mmc->max_blk_count = 65535;
621 host = mmc_priv(mmc);
622 host->mmc = mmc;
639 mmc->f_min = (host->clkrate + 63) / 64;
640 mmc->f_max = (mmc_has_26MHz()) ? 26000000 : host->clkrate;
644 mmc->caps = 0;
647 mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
650 mmc->caps |= MMC_CAP_MMC_HIGHSPEED |
691 platform_set_drvdata(pdev, mmc);
713 ret = gpio_request(gpio_power, "mmc card power");
722 ret = gpio_request(gpio_ro, "mmc card read only");
730 ret = gpio_request(gpio_cd, "mmc card detect");
739 "mmc card detect", mmc);
747 host->pdata->init(&pdev->dev, pxamci_detect_irq, mmc);
754 mmc_add_host(mmc);
775 if (mmc)
776 mmc_free_host(mmc);
783 struct mmc_host *mmc = platform_get_drvdata(pdev);
788 if (mmc) {
789 struct pxamci_host *host = mmc_priv(mmc);
791 mmc_remove_host(mmc);
799 free_irq(gpio_to_irq(gpio_cd), mmc);
810 host->pdata->exit(&pdev->dev, mmc);
829 mmc_free_host(mmc);
837 struct mmc_host *mmc = dev_get_drvdata(dev);
840 if (mmc)
841 ret = mmc_suspend_host(mmc);
848 struct mmc_host *mmc = dev_get_drvdata(dev);
851 if (mmc)
852 ret = mmc_resume_host(mmc);