> > if (!(host->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD)) > > wake_up_process(host->sdio_irq_thread); > > diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c > > index 931e6226c0b3..9f54a259a1b3 100644 > > --- a/drivers/mmc/core/sdio_irq.c > >...
#define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17) #define MMC_CAP2_NO_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */ +#define MMC_CAP2_NO_SDIO (1 << 19) /* Do not send SDIO commands during initialization */ mmc_pm_flag_t ...
Linux kernel把mmc,sd以及sdio三者的驱动代码整合在一起,称mmc子系统。源码位于drivers/mmc下。 其下有三个子目录,分别是:card,core,host。 card:构建一个块设备作为上层与mmc子系统沟通的桥梁; core:抽象了mmc,sd,sdio三者的操作。核心层封装了 MMC/SD 卡的命令,例如存储卡的识别,设置,读写。例如不管什么卡...
host->caps |= MMC_CAP_UHS_DDR50; if (device_property_read_bool(dev, "cap-power-off-card")) host->caps |= MMC_CAP_POWER_OFF_CARD; if (device_property_read_bool(dev, "cap-mmc-hw-reset")) host->caps |= MMC_CAP_HW_RESET; if (device_property_read_bool(dev, "cap-sdio-...
.get_ro = mmc_gpio_get_ro,//获取写状态.get_cd = mxs_mmc_get_cd,//卡是否存在.set_ios = mxs_mmc_set_ios,//设置参数.enable_sdio_irq = mxs_mmc_enable_sdio_irq, }; 所以最终是调用mxs_mmc_request,来向设备发送命令的。 如果是成功的话,那么接下来就是调用mmc_sd_init_card进行初始化了...
structtask_struct*sdio_irq_thread;//中断处理线程 structdelayed_worksdio_irq_work; boolsdio_irq_pending; atomic_tsdio_irq_thread_abort; mmc_pm_flag_tpm_flags;/* requested pm features */ structled_trigger*led;/* activity led */ #ifdef CONFIG_REGULATOR ...
207 #define MMC_CAP_SDIO_IRQ (1 << 3) /* Can signal pending SDIO IRQs */ 208 #define MMC_CAP_SPI (1 << 4) /* Talks only SPI protocols */ 209 #define MMC_CAP_NEEDS_POLL (1 << 5) /* Needs polling for card-detection */ ...
This is the name of the raw disk or SDIO device. For disks it provides the prefix used for the separate disk device strings which are passed to themountcall. For example, a setting of/dev/mmcsd0/would allow the first partition on the card to be accessed as/dev/mmcsd0/1, the second...
它的功能就是通过device_add函数将设备注册进linux设备模型,最终的结果就是在sys/bus/platform/devices目录下能见到s3c.sdhci.1,s3c.sdhci.2等设备节点。 intmmc_add_host(structmmc_host*host){interr;WARN_ON((host->caps&MMC_CAP_SDIO_IRQ)&&!host->ops->enable_sdio_irq);err=device_add(&host->class...
(host->mmc->caps2 & MMC_CAP2_SDIO_IRQ_NOTHREAD) { sdhci_enable_sdio_irq_nolock(host, false); host->thread_isr |= SDHCI_INT_CARD_INT; result = IRQ_WAKE_THREAD; } else { cardint = 1; } } intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE | SDHCI_INT_CMD_MASK ...