Lines Matching refs:mmc
51 struct mmc_host *mmc; member
79 struct mmc_host *mmc = host->mmc; in pxamci_init_ocr() local
82 ret = mmc_regulator_get_supply(mmc); in pxamci_init_ocr()
86 if (IS_ERR(mmc->supply.vmmc)) { in pxamci_init_ocr()
88 mmc->ocr_avail = host->pdata ? in pxamci_init_ocr()
100 struct mmc_host *mmc = host->mmc; in pxamci_set_power() local
101 struct regulator *supply = mmc->supply.vmmc; in pxamci_set_power()
104 return mmc_regulator_set_ocr(mmc, supply, vdd); in pxamci_set_power()
112 return host->pdata->setpower(mmc_dev(host->mmc), vdd); in pxamci_set_power()
133 dev_err(mmc_dev(host->mmc), "unable to stop clock\n"); in pxamci_stop_clock()
202 dev_err(mmc_dev(host->mmc), "dma slave config failed\n"); in pxamci_setup_data()
212 dev_err(mmc_dev(host->mmc), "prep_slave_sg() failed\n"); in pxamci_setup_data()
272 mmc_request_done(host->mmc, mrq); in pxamci_finish_request()
392 mmc_signal_sdio_irq(host->mmc); in pxamci_irq()
400 static void pxamci_request(struct mmc_host *mmc, struct mmc_request *mrq) in pxamci_request() argument
402 struct pxamci_host *host = mmc_priv(mmc); in pxamci_request()
426 static int pxamci_get_ro(struct mmc_host *mmc) in pxamci_get_ro() argument
428 struct pxamci_host *host = mmc_priv(mmc); in pxamci_get_ro()
431 return mmc_gpio_get_ro(mmc); in pxamci_get_ro()
433 return !!host->pdata->get_ro(mmc_dev(mmc)); in pxamci_get_ro()
441 static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in pxamci_set_ios() argument
443 struct pxamci_host *host = mmc_priv(mmc); in pxamci_set_ios()
488 dev_err(mmc_dev(mmc), "unable to set power\n"); in pxamci_set_ios()
507 dev_dbg(mmc_dev(mmc), "PXAMCI: clkrt = %x cmdat = %x\n", in pxamci_set_ios()
552 pr_err("%s: DMA error on %s channel\n", mmc_hostname(host->mmc), in pxamci_dma_irq()
579 struct mmc_host *mmc) in pxamci_of_init() argument
582 struct pxamci_host *host = mmc_priv(mmc); in pxamci_of_init()
593 ret = mmc_of_parse(mmc); in pxamci_of_init()
601 struct mmc_host *mmc) in pxamci_of_init() argument
609 struct mmc_host *mmc; in pxamci_probe() local
620 mmc = mmc_alloc_host(sizeof(struct pxamci_host), dev); in pxamci_probe()
621 if (!mmc) { in pxamci_probe()
626 mmc->ops = &pxamci_ops; in pxamci_probe()
632 mmc->max_segs = NR_SG; in pxamci_probe()
637 mmc->max_seg_size = PAGE_SIZE; in pxamci_probe()
642 mmc->max_blk_size = cpu_is_pxa25x() ? 1023 : 2048; in pxamci_probe()
647 mmc->max_blk_count = 65535; in pxamci_probe()
649 ret = pxamci_of_init(pdev, mmc); in pxamci_probe()
653 host = mmc_priv(mmc); in pxamci_probe()
654 host->mmc = mmc; in pxamci_probe()
670 mmc->f_min = (host->clkrate + 63) / 64; in pxamci_probe()
671 mmc->f_max = (mmc_has_26MHz()) ? 26000000 : host->clkrate; in pxamci_probe()
677 mmc->caps = 0; in pxamci_probe()
680 mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; in pxamci_probe()
683 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | in pxamci_probe()
711 platform_set_drvdata(pdev, mmc); in pxamci_probe()
740 ret = mmc_gpiod_request_cd(mmc, "cd", 0, false, 0); in pxamci_probe()
747 mmc->caps2 |= MMC_CAP2_RO_ACTIVE_HIGH; in pxamci_probe()
749 ret = mmc_gpiod_request_ro(mmc, "wp", 0, 0); in pxamci_probe()
758 host->pdata->init(dev, pxamci_detect_irq, mmc); in pxamci_probe()
766 ret = mmc_add_host(mmc); in pxamci_probe()
769 host->pdata->exit(dev, mmc); in pxamci_probe()
782 if (mmc) in pxamci_probe()
783 mmc_free_host(mmc); in pxamci_probe()
789 struct mmc_host *mmc = platform_get_drvdata(pdev); in pxamci_remove() local
791 if (mmc) { in pxamci_remove()
792 struct pxamci_host *host = mmc_priv(mmc); in pxamci_remove()
794 mmc_remove_host(mmc); in pxamci_remove()
797 host->pdata->exit(&pdev->dev, mmc); in pxamci_remove()
809 mmc_free_host(mmc); in pxamci_remove()