* Skip it if we already know that we do not support SDIO commands*/#ifdef MMC_STANDARD_PROBEif(!(host->caps2 &MMC_CAP2_NO_SDIO)) sdio_reset(host);mmc_go_idle(host);if(!(host->caps2 &MMC_CAP2_NO_SD))mmc_send_if_cond(host, host->ocr_avail);/*Order's important: probe SDIO...
mmc_go_idle(host); mmc_send_if_cond(host, host->ocr_avail); mmc_attach_sdio(host) mmc_send_io_op_cond(host, 0, &ocr);//使用CMD5命令,获取OCR值(slave支持的电压范围) mmc_attach_bus(host, &mmc_sdio_ops);//设置host的bus操作函数是mmc_sdio_ops mmc_select_voltage(host, ocr);//设...
mmc_go_idle; //CMD0 mmc/core/mmc_ops.c mmc_send_op_cond; //CMD1 mmc/core/mmc_ops.c mmc_all_send_cid; //CMD2 mmc/core/mmc_ops.c mmc_set_relative_addr; //CMD3 mmc/core/mmc_ops.c mmc_send_csd; //CMD9 mmc/core/mmc_ops.c mmc_decode_csd(card); // mmc/core/mmc.c mm...
*/err =mmc_send_io_op_cond(host,0, &ocr);if(!err) {if(mmc_attach_sdio(host, ocr)) mmc_power_off(host); extend_wakelock =1;gotoout; }/* * ...then normal SD... */err = mmc_send_app_op_cond(host,0, &ocr);if(!err) {if(mmc_attach_sd(host, ocr)) mmc_power_off(hos...
mmc_send_if_cond->(cmd8)该命令对sdio设备为可选命令,可以不用实现。 3.mmcattachsdio-> 1)mmc_send_io_op_cond->(cmd5)获取配置 2)mmc_sdio_init_card-> response发现sdio设备不支持1.8V,后面不会进行1.8V的切换;同时该sdio设备不支持sd memory,也不需要进行sd memory的相关初始化。
mmc_send_if_cond(host, host->ocr_avail); /* Order's important: probe SDIO, then SD, then MMC */ if (!mmc_attach_sdio(host)) return 0; if (!mmc_attach_sd(host)) return 0; if (!mmc_attach_mmc(host)) return 0; mmc_power_off(host); ...
if (host->bus_ops == NULL) { //检测SD卡 /* * Only we can add a new handler, so it's safe to * release the lock here. */ mmc_bus_put(host); mmc_claim_host(host); mmc_power_up(host); mmc_go_idle(host); mmc_send_if_cond(host, host->ocr_avail); ...
err = mmc_send_app_op_cond(host, ocr,NULL);if(err)gotoerr;/* * Fetch CID from card. */if(mmc_host_is_spi(host)) err = mmc_send_cid(host, cid);elseerr = mmc_all_send_cid(host, cid);if(err)gotoerr;if(oldcard) {if(memcmp(cid, oldcard->raw_cid,sizeof(cid)) !=0) {...
mmc_send_if_cond(host, host->ocr_avail); mmc_attach_sdio(host) mmc_send_io_op_cond(host, 0, &ocr);//使用CMD5命令,获取OCR值(slave支持的电压范围) mmc_attach_bus(host, &mmc_sdio_ops);//设置host的bus操作函数是mmc_sdio_ops
if (host->ops->enable_preset_value) host->ops->enable_preset_value(host, false); err = mmc_send_app_op_cond(host, 0, &ocr); if (err) return err; mmc_sd_attach_bus_ops(host); //重要,bus操作的繫結 if (host->ocr_avail_sd) ...