emmc的上电流程、上电稳定性 .

来源:互联网 发布:monsta知乎 编辑:程序博客网 时间:2024/06/11 08:09

power on流程:

<4>[    0.688753] (2)[5:kworker/u:0][<c0581df0>] (dump_stack+0x0/0x1c) from [<c03f48b0>] (msdc_emmc_power+0x98/0x160)
<4>[    0.688789] (2)[5:kworker/u:0][<c03f4818>] (msdc_emmc_power+0x0/0x160) from [<c03e92a0>] (msdc_set_power_mode+0xdc/0x210)
<4>[    0.688836] (2)[5:kworker/u:0][<c03e91c4>] (msdc_set_power_mode+0x0/0x210) from [<c03f4c78>] (msdc_ops_set_ios+0x88/0xb8c)
<4>[    0.688895] (2)[5:kworker/u:0][<c03f4bf0>] (msdc_ops_set_ios+0x0/0xb8c) from [<c02df3c0>] (mmc_power_up+0x74/0xa8)
<4>[    0.688940] (2)[5:kworker/u:0][<c02df34c>] (mmc_power_up+0x0/0xa8) from [<c02e057c>] (mmc_rescan+0x234/0x2f4)
<4>[    0.689020] (2)[5:kworker/u:0][<c02e0348>] (mmc_rescan+0x0/0x2f4) from [<c005ee10>] (process_one_work+0x11c/0x3a4)


/mmc/core/core.c  仔细查看power up过程中总共delay 30ms ,delay的时间是怎么确定的呢?

static void mmc_power_up(struct mmc_host *host)
{
int bit;


mmc_host_clk_hold(host);
/* If ocr is set, we use it */
if (host->ocr)
bit = ffs(host->ocr) - 1;
else
bit = fls(host->ocr_avail) - 1;
host->ios.vdd = bit;
if (mmc_host_is_spi(host))
host->ios.chip_select = MMC_CS_HIGH;
else
host->ios.chip_select = MMC_CS_DONTCARE;
host->ios.bus_mode = MMC_BUSMODE_PUSHPULL;
host->ios.power_mode = MMC_POWER_UP;
host->ios.bus_width = MMC_BUS_WIDTH_1;
host->ios.timing = MMC_TIMING_LEGACY;
mmc_set_ios(host);    // emmc driver 上电,mtk添加delay 10ms
/*
* This delay should be sufficient to allow the power supply
* to reach the minimum voltage.
*/
mmc_delay(10);    //delay 10ms
host->ios.clock = host->f_init;
host->ios.power_mode = MMC_POWER_ON;
mmc_set_ios(host);
/*
* This delay must be at least 74 clock sizes, or 1 ms, or the
* time required to reach a stable voltage.
*/
mmc_delay(10);   //delay 10ms


mmc_host_clk_release(host);
}


mtk emmc resume流程:

<4>[   38.631520] 1)[<c03f4818>] (msdc_emmc_power+0x0/0x160) from [<c03eceac>] (msdc_pm+0x3f0/0x6b4)
<4>[   38.631549] 1)[<c03ecabc>] (msdc_pm+0x0/0x6b4) from [<c03ed1c0>] (msdc_drv_resume+0x50/0x74)
<4>[   38.631582] 1)[<c03ed170>] (msdc_drv_resume+0x0/0x74) from [<c023fba8>] (platform_pm_resume+0x34/0x58)
<4>[   38.631602] 1)[<c023fb74>] (platform_pm_resume+0x0/0x58) from [<c0243d34>] (dpm_run_callback.isra.13+0x34/0x6c)
<4>[   38.631656] 1)[<c0244278>] (device_resume+0x0/0x404) from [<c0244c54>] (dpm_resume+0x104/0x21c)

标准emmc resume流程应该是emmc driver resume 调用emmc core driver 的resume函数:mmc_resume_bus 。

不知道mtk为什么要这么搞


mmc_delay(10);


 

http://blog.csdn.net/fybon/article/details/17223879

0 0
原创粉丝点击