Lines Matching refs:mmc
250 struct mmc_host *mmc; member
475 struct mmc_host *mmc = slot->mmc; in atmci_init_debugfs() local
480 root = mmc->debugfs_root; in atmci_init_debugfs()
512 dev_err(&mmc->class_dev, "failed to initialize debugfs for slot\n"); in atmci_init_debugfs()
653 dev_vdbg(&slot->mmc->class_dev, "setting timeout to %u cycles\n", in atmci_set_timeout()
661 static u32 atmci_prepare_command(struct mmc_host *mmc, in atmci_prepare_command() argument
685 if (mmc->ios.bus_mode == MMC_BUSMODE_OPENDRAIN) in atmci_prepare_command()
1169 dev_dbg(&slot->mmc->class_dev, "WARNING: IMR=0x%08x\n", in atmci_start_request()
1186 dev_vdbg(&slot->mmc->class_dev, "BLKR=0x%08x\n", in atmci_start_request()
1194 cmdflags = atmci_prepare_command(slot->mmc, cmd); in atmci_start_request()
1212 host->stop_cmdr = atmci_prepare_command(slot->mmc, mrq->stop); in atmci_start_request()
1236 dev_vdbg(&slot->mmc->class_dev, "queue request: state=%d\n", in atmci_queue_request()
1251 static void atmci_request(struct mmc_host *mmc, struct mmc_request *mrq) in atmci_request() argument
1253 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_request()
1272 mmc_request_done(mmc, mrq); in atmci_request()
1280 mmc_request_done(mmc, mrq); in atmci_request()
1286 static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in atmci_set_ios() argument
1288 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_set_ios()
1331 dev_warn(&mmc->class_dev, in atmci_set_ios()
1336 dev_warn(&mmc->class_dev, in atmci_set_ios()
1346 dev_warn(&mmc->class_dev, in atmci_set_ios()
1402 if (!IS_ERR(mmc->supply.vmmc)) in atmci_set_ios()
1403 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); in atmci_set_ios()
1407 if (!IS_ERR(mmc->supply.vmmc)) in atmci_set_ios()
1408 mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); in atmci_set_ios()
1430 static int atmci_get_ro(struct mmc_host *mmc) in atmci_get_ro() argument
1433 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_get_ro()
1437 dev_dbg(&mmc->class_dev, "card is %s\n", in atmci_get_ro()
1444 static int atmci_get_cd(struct mmc_host *mmc) in atmci_get_cd() argument
1447 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_get_cd()
1452 dev_dbg(&mmc->class_dev, "card is %spresent\n", in atmci_get_cd()
1459 static void atmci_enable_sdio_irq(struct mmc_host *mmc, int enable) in atmci_enable_sdio_irq() argument
1461 struct atmel_mci_slot *slot = mmc_priv(mmc); in atmci_enable_sdio_irq()
1484 struct mmc_host *prev_mmc = host->cur_slot->mmc; in atmci_request_end()
1506 mmc_hostname(slot->mmc)); in atmci_request_end()
1571 dev_vdbg(&slot->mmc->class_dev, "detect change: %d (was %d)\n", in atmci_detect_change()
1578 dev_dbg(&slot->mmc->class_dev, "card %s\n", in atmci_detect_change()
1637 mmc_request_done(slot->mmc, mrq); in atmci_detect_change()
1643 mmc_detect_change(slot->mmc, 0); in atmci_detect_change()
1998 mmc_signal_sdio_irq(slot->mmc); in atmci_sdio_interrupt()
2151 struct mmc_host *mmc; in atmci_init_slot() local
2154 mmc = mmc_alloc_host(sizeof(struct atmel_mci_slot), &host->pdev->dev); in atmci_init_slot()
2155 if (!mmc) in atmci_init_slot()
2158 slot = mmc_priv(mmc); in atmci_init_slot()
2159 slot->mmc = mmc; in atmci_init_slot()
2167 dev_dbg(&mmc->class_dev, in atmci_init_slot()
2174 mmc->ops = &atmci_ops; in atmci_init_slot()
2175 mmc->f_min = DIV_ROUND_UP(host->bus_hz, 512); in atmci_init_slot()
2176 mmc->f_max = host->bus_hz / 2; in atmci_init_slot()
2177 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; in atmci_init_slot()
2179 mmc->caps |= MMC_CAP_SDIO_IRQ; in atmci_init_slot()
2181 mmc->caps |= MMC_CAP_SD_HIGHSPEED; in atmci_init_slot()
2188 mmc->caps |= MMC_CAP_4_BIT_DATA; in atmci_init_slot()
2191 mmc->max_segs = 256; in atmci_init_slot()
2192 mmc->max_blk_size = 4095; in atmci_init_slot()
2193 mmc->max_blk_count = 256; in atmci_init_slot()
2194 mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; in atmci_init_slot()
2195 mmc->max_seg_size = mmc->max_blk_size * mmc->max_segs; in atmci_init_slot()
2197 mmc->max_segs = 64; in atmci_init_slot()
2198 mmc->max_req_size = 32768 * 512; in atmci_init_slot()
2199 mmc->max_blk_size = 32768; in atmci_init_slot()
2200 mmc->max_blk_count = 512; in atmci_init_slot()
2208 dev_dbg(&mmc->class_dev, "no detect pin available\n"); in atmci_init_slot()
2218 mmc->caps |= MMC_CAP_NONREMOVABLE; in atmci_init_slot()
2220 mmc->caps |= MMC_CAP_NEEDS_POLL; in atmci_init_slot()
2226 dev_dbg(&mmc->class_dev, "no WP pin available\n"); in atmci_init_slot()
2232 mmc_regulator_get_supply(mmc); in atmci_init_slot()
2233 mmc_add_host(mmc); in atmci_init_slot()
2246 dev_dbg(&mmc->class_dev, in atmci_init_slot()
2266 mmc_remove_host(slot->mmc); in atmci_cleanup_slot()
2276 mmc_free_host(slot->mmc); in atmci_cleanup_slot()
2451 host->buf_size = host->slot[0]->mmc->max_req_size; in atmci_probe()
2459 if (host->slot[1]->mmc->max_req_size > host->buf_size) in atmci_probe()
2461 host->slot[1]->mmc->max_req_size; in atmci_probe()