Lines Matching refs:mmc
251 struct mmc_host *mmc; member
476 struct mmc_host *mmc = slot->mmc; in atmci_init_debugfs() local
481 root = mmc->debugfs_root; in atmci_init_debugfs()
513 dev_err(&mmc->class_dev, "failed to initialize debugfs for slot\n"); in atmci_init_debugfs()
654 dev_vdbg(&slot->mmc->class_dev, "setting timeout to %u cycles\n", in atmci_set_timeout()
662 static u32 atmci_prepare_command(struct mmc_host *mmc, in atmci_prepare_command() argument
686 if (mmc->ios.bus_mode == MMC_BUSMODE_OPENDRAIN) in atmci_prepare_command()
1170 dev_dbg(&slot->mmc->class_dev, "WARNING: IMR=0x%08x\n", in atmci_start_request()
1187 dev_vdbg(&slot->mmc->class_dev, "BLKR=0x%08x\n", in atmci_start_request()
1195 cmdflags = atmci_prepare_command(slot->mmc, cmd); in atmci_start_request()
1213 host->stop_cmdr = atmci_prepare_command(slot->mmc, mrq->stop); in atmci_start_request()
1237 dev_vdbg(&slot->mmc->class_dev, "queue request: state=%d\n", in atmci_queue_request()
1252 static void atmci_request(struct mmc_host *mmc, struct mmc_request *mrq) in atmci_request() argument
1254 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_request()
1273 mmc_request_done(mmc, mrq); in atmci_request()
1281 mmc_request_done(mmc, mrq); in atmci_request()
1287 static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in atmci_set_ios() argument
1289 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_set_ios()
1332 dev_warn(&mmc->class_dev, in atmci_set_ios()
1337 dev_warn(&mmc->class_dev, in atmci_set_ios()
1347 dev_warn(&mmc->class_dev, in atmci_set_ios()
1403 if (!IS_ERR(mmc->supply.vmmc)) in atmci_set_ios()
1404 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); in atmci_set_ios()
1408 if (!IS_ERR(mmc->supply.vmmc)) in atmci_set_ios()
1409 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); in atmci_set_ios()
1431 static int atmci_get_ro(struct mmc_host *mmc) in atmci_get_ro() argument
1434 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_get_ro()
1438 dev_dbg(&mmc->class_dev, "card is %s\n", in atmci_get_ro()
1445 static int atmci_get_cd(struct mmc_host *mmc) in atmci_get_cd() argument
1448 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_get_cd()
1453 dev_dbg(&mmc->class_dev, "card is %spresent\n", in atmci_get_cd()
1460 static void atmci_enable_sdio_irq(struct mmc_host *mmc, int enable) in atmci_enable_sdio_irq() argument
1462 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_enable_sdio_irq()
1485 struct mmc_host *prev_mmc = host->cur_slot->mmc; in atmci_request_end()
1507 mmc_hostname(slot->mmc)); in atmci_request_end()
1572 dev_vdbg(&slot->mmc->class_dev, "detect change: %d (was %d)\n", in atmci_detect_change()
1579 dev_dbg(&slot->mmc->class_dev, "card %s\n", in atmci_detect_change()
1638 mmc_request_done(slot->mmc, mrq); in atmci_detect_change()
1644 mmc_detect_change(slot->mmc, 0); in atmci_detect_change()
1999 mmc_signal_sdio_irq(slot->mmc); in atmci_sdio_interrupt()
2152 struct mmc_host *mmc; in atmci_init_slot() local
2155 mmc = mmc_alloc_host(sizeof(struct atmel_mci_slot), &host->pdev->dev); in atmci_init_slot()
2156 if (!mmc) in atmci_init_slot()
2159 slot = mmc_priv(mmc); in atmci_init_slot()
2160 slot->mmc = mmc; in atmci_init_slot()
2168 dev_dbg(&mmc->class_dev, in atmci_init_slot()
2175 mmc->ops = &atmci_ops; in atmci_init_slot()
2176 mmc->f_min = DIV_ROUND_UP(host->bus_hz, 512); in atmci_init_slot()
2177 mmc->f_max = host->bus_hz / 2; in atmci_init_slot()
2178 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; in atmci_init_slot()
2180 mmc->caps |= MMC_CAP_SDIO_IRQ; in atmci_init_slot()
2182 mmc->caps |= MMC_CAP_SD_HIGHSPEED; in atmci_init_slot()
2189 mmc->caps |= MMC_CAP_4_BIT_DATA; in atmci_init_slot()
2192 mmc->max_segs = 256; in atmci_init_slot()
2193 mmc->max_blk_size = 4095; in atmci_init_slot()
2194 mmc->max_blk_count = 256; in atmci_init_slot()
2195 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; in atmci_init_slot()
2196 mmc->max_seg_size = mmc->max_blk_size * mmc->max_segs; in atmci_init_slot()
2198 mmc->max_segs = 64; in atmci_init_slot()
2199 mmc->max_req_size = 32768 * 512; in atmci_init_slot()
2200 mmc->max_blk_size = 32768; in atmci_init_slot()
2201 mmc->max_blk_count = 512; in atmci_init_slot()
2209 dev_dbg(&mmc->class_dev, "no detect pin available\n"); in atmci_init_slot()
2219 mmc->caps |= MMC_CAP_NONREMOVABLE; in atmci_init_slot()
2221 mmc->caps |= MMC_CAP_NEEDS_POLL; in atmci_init_slot()
2227 dev_dbg(&mmc->class_dev, "no WP pin available\n"); in atmci_init_slot()
2233 mmc_regulator_get_supply(mmc); in atmci_init_slot()
2234 mmc_add_host(mmc); in atmci_init_slot()
2247 dev_dbg(&mmc->class_dev, in atmci_init_slot()
2267 mmc_remove_host(slot->mmc); in atmci_cleanup_slot()
2277 mmc_free_host(slot->mmc); in atmci_cleanup_slot()
2469 host->buf_size = host->slot[0]->mmc->max_req_size; in atmci_probe()
2477 if (host->slot[1]->mmc->max_req_size > host->buf_size) in atmci_probe()
2479 host->slot[1]->mmc->max_req_size; in atmci_probe()