Lines Matching refs:mmc

56 	struct mmc_host		*mmc;  member
89 host->vcc = regulator_get_optional(mmc_dev(host->mmc), "vmmc"); in pxamci_init_ocr()
94 host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc); in pxamci_init_ocr()
96 dev_warn(mmc_dev(host->mmc), in pxamci_init_ocr()
102 host->mmc->ocr_avail = host->pdata ? in pxamci_init_ocr()
118 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd); in pxamci_set_power()
122 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, 0); in pxamci_set_power()
134 return host->pdata->setpower(mmc_dev(host->mmc), vdd); in pxamci_set_power()
155 dev_err(mmc_dev(host->mmc), "unable to stop clock\n"); in pxamci_stop_clock()
227 dev_err(mmc_dev(host->mmc), "dma slave config failed\n"); in pxamci_setup_data()
237 dev_err(mmc_dev(host->mmc), "prep_slave_sg() failed\n"); in pxamci_setup_data()
297 mmc_request_done(host->mmc, mrq); in pxamci_finish_request()
417 mmc_signal_sdio_irq(host->mmc); in pxamci_irq()
425 static void pxamci_request(struct mmc_host *mmc, struct mmc_request *mrq) in pxamci_request() argument
427 struct pxamci_host *host = mmc_priv(mmc); in pxamci_request()
454 static int pxamci_get_ro(struct mmc_host *mmc) in pxamci_get_ro() argument
456 struct pxamci_host *host = mmc_priv(mmc); in pxamci_get_ro()
459 return mmc_gpio_get_ro(mmc); in pxamci_get_ro()
461 return !!host->pdata->get_ro(mmc_dev(mmc)); in pxamci_get_ro()
469 static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in pxamci_set_ios() argument
471 struct pxamci_host *host = mmc_priv(mmc); in pxamci_set_ios()
516 dev_err(mmc_dev(mmc), "unable to set power\n"); in pxamci_set_ios()
535 dev_dbg(mmc_dev(mmc), "PXAMCI: clkrt = %x cmdat = %x\n", in pxamci_set_ios()
580 pr_err("%s: DMA error on %s channel\n", mmc_hostname(host->mmc), in pxamci_dma_irq()
644 struct mmc_host *mmc; in pxamci_probe() local
664 mmc = mmc_alloc_host(sizeof(struct pxamci_host), &pdev->dev); in pxamci_probe()
665 if (!mmc) { in pxamci_probe()
670 mmc->ops = &pxamci_ops; in pxamci_probe()
676 mmc->max_segs = NR_SG; in pxamci_probe()
681 mmc->max_seg_size = PAGE_SIZE; in pxamci_probe()
686 mmc->max_blk_size = cpu_is_pxa25x() ? 1023 : 2048; in pxamci_probe()
691 mmc->max_blk_count = 65535; in pxamci_probe()
693 host = mmc_priv(mmc); in pxamci_probe()
694 host->mmc = mmc; in pxamci_probe()
710 mmc->f_min = (host->clkrate + 63) / 64; in pxamci_probe()
711 mmc->f_max = (mmc_has_26MHz()) ? 26000000 : host->clkrate; in pxamci_probe()
715 mmc->caps = 0; in pxamci_probe()
718 mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; in pxamci_probe()
721 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | in pxamci_probe()
749 platform_set_drvdata(pdev, mmc); in pxamci_probe()
802 ret = mmc_gpio_request_ro(mmc, gpio_ro); in pxamci_probe()
807 mmc->caps2 |= host->pdata->gpio_card_ro_invert ? in pxamci_probe()
812 ret = mmc_gpio_request_cd(mmc, gpio_cd, 0); in pxamci_probe()
819 host->pdata->init(&pdev->dev, pxamci_detect_irq, mmc); in pxamci_probe()
826 mmc_add_host(mmc); in pxamci_probe()
841 if (mmc) in pxamci_probe()
842 mmc_free_host(mmc); in pxamci_probe()
849 struct mmc_host *mmc = platform_get_drvdata(pdev); in pxamci_remove() local
852 if (mmc) { in pxamci_remove()
853 struct pxamci_host *host = mmc_priv(mmc); in pxamci_remove()
855 mmc_remove_host(mmc); in pxamci_remove()
866 host->pdata->exit(&pdev->dev, mmc); in pxamci_remove()
884 mmc_free_host(mmc); in pxamci_remove()