Lines Matching refs:mmc
28 static void cb710_mmc_select_clock_divider(struct mmc_host *mmc, int hz) in cb710_mmc_select_clock_divider() argument
30 struct cb710_slot *slot = cb710_mmc_to_slot(mmc); in cb710_mmc_select_clock_divider()
444 static int cb710_mmc_command(struct mmc_host *mmc, struct mmc_command *cmd) in cb710_mmc_command() argument
446 struct cb710_slot *slot = cb710_mmc_to_slot(mmc); in cb710_mmc_command()
447 struct cb710_mmc_reader *reader = mmc_priv(mmc); in cb710_mmc_command()
484 static void cb710_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) in cb710_mmc_request() argument
486 struct cb710_slot *slot = cb710_mmc_to_slot(mmc); in cb710_mmc_request()
487 struct cb710_mmc_reader *reader = mmc_priv(mmc); in cb710_mmc_request()
494 if (!cb710_mmc_command(mmc, mrq->cmd) && mrq->stop) in cb710_mmc_request()
495 cb710_mmc_command(mmc, mrq->stop); in cb710_mmc_request()
561 static void cb710_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in cb710_mmc_set_ios() argument
563 struct cb710_slot *slot = cb710_mmc_to_slot(mmc); in cb710_mmc_set_ios()
564 struct cb710_mmc_reader *reader = mmc_priv(mmc); in cb710_mmc_set_ios()
567 cb710_mmc_select_clock_divider(mmc, ios->clock); in cb710_mmc_set_ios()
600 static int cb710_mmc_get_ro(struct mmc_host *mmc) in cb710_mmc_get_ro() argument
602 struct cb710_slot *slot = cb710_mmc_to_slot(mmc); in cb710_mmc_get_ro()
608 static int cb710_mmc_get_cd(struct mmc_host *mmc) in cb710_mmc_get_cd() argument
610 struct cb710_slot *slot = cb710_mmc_to_slot(mmc); in cb710_mmc_get_cd()
618 struct mmc_host *mmc = cb710_slot_to_mmc(slot); in cb710_mmc_irq_handler() local
619 struct cb710_mmc_reader *reader = mmc_priv(mmc); in cb710_mmc_irq_handler()
637 mmc_detect_change(mmc, HZ/5); in cb710_mmc_irq_handler()
650 struct mmc_host *mmc = (void *)data; in cb710_mmc_finish_request_tasklet() local
651 struct cb710_mmc_reader *reader = mmc_priv(mmc); in cb710_mmc_finish_request_tasklet()
655 mmc_request_done(mmc, mrq); in cb710_mmc_finish_request_tasklet()
689 struct mmc_host *mmc; in cb710_mmc_init() local
694 mmc = mmc_alloc_host(sizeof(*reader), cb710_slot_dev(slot)); in cb710_mmc_init()
695 if (!mmc) in cb710_mmc_init()
698 platform_set_drvdata(pdev, mmc); in cb710_mmc_init()
706 mmc->ops = &cb710_mmc_host; in cb710_mmc_init()
707 mmc->f_max = val; in cb710_mmc_init()
708 mmc->f_min = val >> cb710_clock_divider_log2[CB710_MAX_DIVIDER_IDX]; in cb710_mmc_init()
709 mmc->ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34; in cb710_mmc_init()
710 mmc->caps = MMC_CAP_4_BIT_DATA; in cb710_mmc_init()
712 reader = mmc_priv(mmc); in cb710_mmc_init()
715 cb710_mmc_finish_request_tasklet, (unsigned long)mmc); in cb710_mmc_init()
722 err = mmc_add_host(mmc); in cb710_mmc_init()
727 mmc_hostname(mmc)); in cb710_mmc_init()
737 mmc_free_host(mmc); in cb710_mmc_init()
744 struct mmc_host *mmc = cb710_slot_to_mmc(slot); in cb710_mmc_exit() local
745 struct cb710_mmc_reader *reader = mmc_priv(mmc); in cb710_mmc_exit()
749 mmc_remove_host(mmc); in cb710_mmc_exit()
761 mmc_free_host(mmc); in cb710_mmc_exit()