Lines Matching refs:mmc
149 struct mmc_host *mmc; member
192 struct omap_mmc_platform_data *mmc = host->pdata; in omap_hsmmc_card_detect() local
195 return !gpio_get_value_cansleep(mmc->slots[0].switch_pin); in omap_hsmmc_card_detect()
201 struct omap_mmc_platform_data *mmc = host->pdata; in omap_hsmmc_get_wp() local
204 return gpio_get_value_cansleep(mmc->slots[0].gpio_wp); in omap_hsmmc_get_wp()
210 struct omap_mmc_platform_data *mmc = host->pdata; in omap_hsmmc_get_cover_state() local
213 return !gpio_get_value_cansleep(mmc->slots[0].switch_pin); in omap_hsmmc_get_cover_state()
221 struct omap_mmc_platform_data *mmc = host->pdata; in omap_hsmmc_suspend_cdirq() local
223 disable_irq(mmc->slots[0].card_detect_irq); in omap_hsmmc_suspend_cdirq()
230 struct omap_mmc_platform_data *mmc = host->pdata; in omap_hsmmc_resume_cdirq() local
232 enable_irq(mmc->slots[0].card_detect_irq); in omap_hsmmc_resume_cdirq()
283 ret = mmc_regulator_set_ocr(host->mmc, host->vcc, vdd); in omap_hsmmc_set_power()
288 ret = mmc_regulator_set_ocr(host->mmc, in omap_hsmmc_set_power()
297 ret = mmc_regulator_set_ocr(host->mmc, in omap_hsmmc_set_power()
459 dev_dbg(mmc_dev(host->mmc), "MMC Clock is not stopped\n"); in omap_hsmmc_stop_clock()
504 struct mmc_ios *ios = &host->mmc->ios; in omap_hsmmc_set_clock()
509 dev_vdbg(mmc_dev(host->mmc), "Set clock to %uHz\n", ios->clock); in omap_hsmmc_set_clock()
553 struct mmc_ios *ios = &host->mmc->ios; in omap_hsmmc_set_bus_width()
580 struct mmc_ios *ios = &host->mmc->ios; in omap_hsmmc_set_bus_mode()
598 struct mmc_ios *ios = &host->mmc->ios; in omap_hsmmc_context_restore()
610 dev_dbg(mmc_dev(host->mmc), "context was %slost\n", in omap_hsmmc_context_restore()
659 dev_dbg(mmc_dev(host->mmc), "context is restored\n"); in omap_hsmmc_context_restore()
738 struct mmc_host *mmc = container_of(dev, struct mmc_host, class_dev); in omap_hsmmc_show_cover_switch() local
739 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_show_cover_switch()
751 struct mmc_host *mmc = container_of(dev, struct mmc_host, class_dev); in omap_hsmmc_show_slot_name() local
752 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_show_slot_name()
768 dev_vdbg(mmc_dev(host->mmc), "%s: CMD%d, argument 0x%08x\n", in omap_hsmmc_start_command()
769 mmc_hostname(host->mmc), cmd->opcode, cmd->arg); in omap_hsmmc_start_command()
842 mmc_request_done(host->mmc, mrq); in omap_hsmmc_request_done()
957 dev_vdbg(mmc_dev(host->mmc), "%s\n", res); in omap_hsmmc_dbg_report_irq()
999 dev_err(mmc_dev(host->mmc), in omap_hsmmc_reset_controller_fsm()
1026 dev_vdbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status); in omap_hsmmc_do_irq()
1143 dev_err(mmc_dev(host->mmc), "Unable to switch operating voltage\n"); in omap_hsmmc_switch_opcond()
1158 mmc_hostname(host->mmc)); in omap_hsmmc_protect_card()
1165 mmc_hostname(host->mmc)); in omap_hsmmc_protect_card()
1183 sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch"); in omap_hsmmc_detect()
1193 mmc_detect_change(host->mmc, (HZ * 200) / 1000); in omap_hsmmc_detect()
1195 mmc_detect_change(host->mmc, (HZ * 50) / 1000); in omap_hsmmc_detect()
1228 mmc_request_done(host->mmc, mrq); in omap_hsmmc_dma_callback()
1320 dev_err(mmc_dev(host->mmc), "prep_slave_sg() failed\n"); in omap_hsmmc_start_dma_transfer()
1402 dev_err(mmc_dev(host->mmc), "MMC start dma failure\n"); in omap_hsmmc_prepare_data()
1409 static void omap_hsmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq, in omap_hsmmc_post_req() argument
1412 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_post_req()
1424 static void omap_hsmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq, in omap_hsmmc_pre_req() argument
1427 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_pre_req()
1446 static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) in omap_hsmmc_request() argument
1448 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_request()
1468 mmc_request_done(mmc, req); in omap_hsmmc_request()
1480 mmc_request_done(mmc, req); in omap_hsmmc_request()
1488 static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in omap_hsmmc_set_ios() argument
1490 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_set_ios()
1535 dev_dbg(mmc_dev(host->mmc), in omap_hsmmc_set_ios()
1550 static int omap_hsmmc_get_cd(struct mmc_host *mmc) in omap_hsmmc_get_cd() argument
1552 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_get_cd()
1559 static int omap_hsmmc_get_ro(struct mmc_host *mmc) in omap_hsmmc_get_ro() argument
1561 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_get_ro()
1568 static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card) in omap_hsmmc_init_card() argument
1570 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_init_card()
1599 static int omap_hsmmc_enable_fclk(struct mmc_host *mmc) in omap_hsmmc_enable_fclk() argument
1601 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_enable_fclk()
1608 static int omap_hsmmc_disable_fclk(struct mmc_host *mmc) in omap_hsmmc_disable_fclk() argument
1610 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_disable_fclk()
1635 struct mmc_host *mmc = s->private; in omap_hsmmc_regs_show() local
1636 struct omap_hsmmc_host *host = mmc_priv(mmc); in omap_hsmmc_regs_show()
1643 mmc->index, host->context_loss, context_loss); in omap_hsmmc_regs_show()
1683 static void omap_hsmmc_debugfs(struct mmc_host *mmc) in omap_hsmmc_debugfs() argument
1685 if (mmc->debugfs_root) in omap_hsmmc_debugfs()
1686 debugfs_create_file("regs", S_IRUSR, mmc->debugfs_root, in omap_hsmmc_debugfs()
1687 mmc, &mmc_regs_fops); in omap_hsmmc_debugfs()
1692 static void omap_hsmmc_debugfs(struct mmc_host *mmc) in omap_hsmmc_debugfs() argument
1772 struct mmc_host *mmc; in omap_hsmmc_probe() local
1817 mmc = mmc_alloc_host(sizeof(struct omap_hsmmc_host), &pdev->dev); in omap_hsmmc_probe()
1818 if (!mmc) { in omap_hsmmc_probe()
1823 host = mmc_priv(mmc); in omap_hsmmc_probe()
1824 host->mmc = mmc; in omap_hsmmc_probe()
1838 mmc->ops = &omap_hsmmc_ops; in omap_hsmmc_probe()
1847 mmc->f_min = OMAP_MMC_MIN_CLOCK; in omap_hsmmc_probe()
1850 mmc->f_max = pdata->max_freq; in omap_hsmmc_probe()
1852 mmc->f_max = OMAP_MMC_MAX_CLOCK; in omap_hsmmc_probe()
1865 mmc->caps2 |= MMC_CAP2_NO_MULTI_READ; in omap_hsmmc_probe()
1886 dev_warn(mmc_dev(host->mmc), "Failed to enable debounce clk\n"); in omap_hsmmc_probe()
1893 mmc->max_segs = 1024; in omap_hsmmc_probe()
1895 mmc->max_blk_size = 512; /* Block Length at max can be 1024 */ in omap_hsmmc_probe()
1896 mmc->max_blk_count = 0xFFFF; /* No. of Blocks is 16 bits */ in omap_hsmmc_probe()
1897 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; in omap_hsmmc_probe()
1898 mmc->max_seg_size = mmc->max_req_size; in omap_hsmmc_probe()
1900 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | in omap_hsmmc_probe()
1903 mmc->caps |= mmc_slot(host).caps; in omap_hsmmc_probe()
1904 if (mmc->caps & MMC_CAP_8_BIT_DATA) in omap_hsmmc_probe()
1905 mmc->caps |= MMC_CAP_4_BIT_DATA; in omap_hsmmc_probe()
1908 mmc->caps |= MMC_CAP_NONREMOVABLE; in omap_hsmmc_probe()
1910 mmc->pm_caps = mmc_slot(host).pm_caps; in omap_hsmmc_probe()
1917 dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n"); in omap_hsmmc_probe()
1925 dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n"); in omap_hsmmc_probe()
1940 dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req); in omap_hsmmc_probe()
1950 dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req); in omap_hsmmc_probe()
1957 mmc_hostname(mmc), host); in omap_hsmmc_probe()
1959 dev_err(mmc_dev(host->mmc), "Unable to grab HSMMC IRQ\n"); in omap_hsmmc_probe()
1965 dev_err(mmc_dev(host->mmc), in omap_hsmmc_probe()
1978 mmc->ocr_avail = mmc_slot(host).ocr_mask; in omap_hsmmc_probe()
1986 mmc_hostname(mmc), host); in omap_hsmmc_probe()
1988 dev_err(mmc_dev(host->mmc), in omap_hsmmc_probe()
2005 mmc_add_host(mmc); in omap_hsmmc_probe()
2008 ret = device_create_file(&mmc->class_dev, &dev_attr_slot_name); in omap_hsmmc_probe()
2013 ret = device_create_file(&mmc->class_dev, in omap_hsmmc_probe()
2019 omap_hsmmc_debugfs(mmc); in omap_hsmmc_probe()
2026 mmc_remove_host(mmc); in omap_hsmmc_probe()
2051 mmc_free_host(mmc); in omap_hsmmc_probe()
2067 mmc_remove_host(host->mmc); in omap_hsmmc_remove()
2091 mmc_free_host(host->mmc); in omap_hsmmc_remove()
2134 ret = mmc_suspend_host(host->mmc); in omap_hsmmc_suspend()
2141 if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) { in omap_hsmmc_suspend()
2171 if (!(host->mmc->pm_flags & MMC_PM_KEEP_POWER)) in omap_hsmmc_resume()
2177 ret = mmc_resume_host(host->mmc); in omap_hsmmc_resume()