Lines Matching refs:mmc
54 struct mmc_host *mmc; member
86 host->vcc = regulator_get(mmc_dev(host->mmc), "vmmc"); in pxamci_init_ocr()
91 host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc); in pxamci_init_ocr()
93 dev_warn(mmc_dev(host->mmc), in pxamci_init_ocr()
99 host->mmc->ocr_avail = host->pdata ? in pxamci_init_ocr()
115 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd); in pxamci_set_power()
119 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, 0); in pxamci_set_power()
131 host->pdata->setpower(mmc_dev(host->mmc), vdd); in pxamci_set_power()
152 dev_err(mmc_dev(host->mmc), "unable to stop clock\n"); in pxamci_stop_clock()
212 host->dma_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, in pxamci_setup_data()
296 mmc_request_done(host->mmc, mrq); in pxamci_finish_request()
362 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, in pxamci_data_done()
412 mmc_signal_sdio_irq(host->mmc); in pxamci_irq()
420 static void pxamci_request(struct mmc_host *mmc, struct mmc_request *mrq) in pxamci_request() argument
422 struct pxamci_host *host = mmc_priv(mmc); in pxamci_request()
449 static int pxamci_get_ro(struct mmc_host *mmc) in pxamci_get_ro() argument
451 struct pxamci_host *host = mmc_priv(mmc); in pxamci_get_ro()
460 return !!host->pdata->get_ro(mmc_dev(mmc)); in pxamci_get_ro()
468 static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in pxamci_set_ios() argument
470 struct pxamci_host *host = mmc_priv(mmc); in pxamci_set_ios()
515 dev_err(mmc_dev(mmc), "unable to set power\n"); in pxamci_set_ios()
534 dev_dbg(mmc_dev(mmc), "PXAMCI: clkrt = %x cmdat = %x\n", in pxamci_set_ios()
565 mmc_hostname(host->mmc), dma, dcsr); in pxamci_dma_irq()
625 struct mmc_host *mmc; in pxamci_probe() local
643 mmc = mmc_alloc_host(sizeof(struct pxamci_host), &pdev->dev); in pxamci_probe()
644 if (!mmc) { in pxamci_probe()
649 mmc->ops = &pxamci_ops; in pxamci_probe()
655 mmc->max_segs = NR_SG; in pxamci_probe()
660 mmc->max_seg_size = PAGE_SIZE; in pxamci_probe()
665 mmc->max_blk_size = cpu_is_pxa25x() ? 1023 : 2048; in pxamci_probe()
670 mmc->max_blk_count = 65535; in pxamci_probe()
672 host = mmc_priv(mmc); in pxamci_probe()
673 host->mmc = mmc; in pxamci_probe()
690 mmc->f_min = (host->clkrate + 63) / 64; in pxamci_probe()
691 mmc->f_max = (mmc_has_26MHz()) ? 26000000 : host->clkrate; in pxamci_probe()
695 mmc->caps = 0; in pxamci_probe()
698 mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; in pxamci_probe()
701 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | in pxamci_probe()
742 platform_set_drvdata(pdev, mmc); in pxamci_probe()
790 "mmc card detect", mmc); in pxamci_probe()
798 host->pdata->init(&pdev->dev, pxamci_detect_irq, mmc); in pxamci_probe()
805 mmc_add_host(mmc); in pxamci_probe()
826 if (mmc) in pxamci_probe()
827 mmc_free_host(mmc); in pxamci_probe()
834 struct mmc_host *mmc = platform_get_drvdata(pdev); in pxamci_remove() local
839 if (mmc) { in pxamci_remove()
840 struct pxamci_host *host = mmc_priv(mmc); in pxamci_remove()
842 mmc_remove_host(mmc); in pxamci_remove()
850 free_irq(gpio_to_irq(gpio_cd), mmc); in pxamci_remove()
861 host->pdata->exit(&pdev->dev, mmc); in pxamci_remove()
880 mmc_free_host(mmc); in pxamci_remove()
888 struct mmc_host *mmc = dev_get_drvdata(dev); in pxamci_suspend() local
891 if (mmc) in pxamci_suspend()
892 ret = mmc_suspend_host(mmc); in pxamci_suspend()
899 struct mmc_host *mmc = dev_get_drvdata(dev); in pxamci_resume() local
902 if (mmc) in pxamci_resume()
903 ret = mmc_resume_host(mmc); in pxamci_resume()