struct mmc_host *mmc_alloc_host(int extra, struct device *dev) 分配一个mmc_host结构体,并对其进行初始化 int mmc_add_host(struct mmc_host *host) 将host device注册进设备驱动模型,并做host硬件的初始化,向PM core 注册notify, 在本函数完成之前,必须能保证host可以使用 void mmc_remove_host(struct ...
3.1 mmc_start_host mmc_start_host-> mmc_detect_change-> mmc_schedule_delayed_work(&host->detect, delay)-> mmc_rescan-> mmc_rescan_try_freq 可参考Linux mmc framework2: 基本组件之host3.1 mmc_add_host部分 TODO
int rescan_disable; /* disable card detection */ // 禁止rescan的标识,禁止搜索card int rescan_entered; /* used with nonremovable devices */ // 是否已经rescan过的标识,对应不可移除的设备只能rescan一次 struct mmc_card *card; /* device attached to this host */ // 和该host绑定在一起的card ...
> void mmc_rescan(struct work_struct *work) > { > static const unsigned freqs[] = { 400000, 300000, 200000, 100000 }; > ... > for (i = 0; i < ARRAY_SIZE(freqs); i++) { > if (!mmc_rescan_try_freq(host, max(freqs[i], host->f_min))) > ... > > So, why would...
> @@ -2297,11 +2297,8 @@ void mmc_rescan(struct work_struct *work) > > mmc_bus_get(host); > > - /* > - * if there is a _removable_ card registered, check whether it is > - * still present > - */ > - if (host->bus_ops && !host->bus_dead && mmc_card_is_removab...
1、struct mmc_host struct mmc_host是mmc core由host controller抽象出来的结构体,用于代表一个mmc host控制器。 数据结构如下: struct mmc_host { struct device *parent; // 对应的host controller的device struct device class_dev; // mmc_host的device结构体,会挂在class/mmc_host下 ...
@@ -2476,15 +2476,20 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq) * sdio_reset sends CMD52 to reset card. Since we do not know * if the card is being re-initialized, just send it. CMD52 * should be ignored by SD/eMMC cards. ...
int rescan_disable; /* disable card detection */ // 禁止rescan的标识,禁止搜索card int rescan_entered; /* used with nonremovable devices */ // 是否已经rescan过的标识,对应不可移除的设备只能rescan一次 struct mmc_card *card; /* device attached to this host */ // 和该host绑定在一起的card...
一、host相关 1、struct mmc_host struct mmc_host是mmc core由host controller抽象出来的结构体,用于代表一个mmc host控制器。 数据结构如下: ocr值各个位代表的电压意义如下: host属性2(mmc_host caps2)支持的属性如