TI中文支持网
TI专业的中文技术问题搜集分享网站

eMMC无法识别的问题

我的系统 在SD卡上执行的很好,但是复制到emmc后 执行到Waiting for root device /dev/mmcblk0p2…这个地方就停止了。我现在怀疑emmc移植的问题,

但是我不知道哪里错了,高手能不能帮我分析下。

[ 2.827819] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 2.835998] ThumbEE CPU extension supported.
[ 2.840637] mux: Failed to setup hwmod io irq -22
[ 2.847045] Power Management for AM33XX family
[ 2.852172] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 2.859100] Copied the M3 firmware to UMEM
[ 2.863647] Cortex M3 Firmware Version = 0x181
[ 2.868743][ 2.868743] The clk freq is 50000000
[ 2.874481] period_ticks is 2500
[ 2.878051] period_ticks is 2500
[ 2.881561] Prescaler value is 1
[ 2.885131] Prescaler value is 1
[ 2.888641] duty ticks is 2000
[ 2.899261] clock: disabling unused clocks to save power
[ 2.907867] Detected MACID=c4:ed:ba:88:7c:3c
[ 2.914916] #start __rtc_read_time
[ 2.918518] #__rtc_read_time
[ 2.921569] ##pcf8563_rtc_read_time
[ 2.926269] tm is secs=46, mins=58, hours=8,mday=14, mon=5, year=116, wday=2
[ 2.933807] #rtc_read_time
[ 2.936737] rtc-pcf8563 2-0051: setting system clock to 2016-06-14 08:58:46 UTC (1465894726)
[ 2.946777] Waiting for root device /dev/mmcblk0p2…

Steven Liu1:

大于等于4G的emmc要接在MMC1上,不能接在MMC0上的。先确认这点有没有违背。

如果OK的话,查一下,你的kernel中是否有正常配置了emmc在emmc1上,可以参考beagleboneblack的配置,因为BBB板子就是emmc启动的。你发的log中,有用信息不多。你之前烧录写入的时候是一切正常的吗?

zhiqiang wang5:

回复 Steven Liu1:

是的,我们的EMMC是接在了emmc1上,而且原来我用的是bbblack的内核下载到我的emmc上,硬件电路应该是没问题的,

配置我也查了下,和bbblack的配置视一样的。

附件是我们的硬件电路

代码如下,与emmc的相关代码我就添加了如下

/* Module pin mux for mmc1 */static struct pinmux_config mmc1_common_pin_mux[] = { {"gpmc_ad3.mmc1_dat3", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_ad2.mmc1_dat2", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_ad1.mmc1_dat1", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_ad0.mmc1_dat0", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_csn1.mmc1_clk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_csn2.mmc1_cmd", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLUP}, {NULL, 0},};

static struct pinmux_config mmc1_dat4_7_pin_mux[] = { {"gpmc_ad7.mmc1_dat7", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_ad6.mmc1_dat6", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_ad5.mmc1_dat5", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, {"gpmc_ad4.mmc1_dat4", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP}, {NULL, 0},};

static void mmc1_init(int evm_id, int profile){ setup_pin_mux(mmc1_common_pin_mux); setup_pin_mux(mmc1_dat4_7_pin_mux);

am335x_mmc[1].mmc = 2; am335x_mmc[1].caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; am335x_mmc[1].nonremovable = true; am335x_mmc[1].gpio_cd = -EINVAL; am335x_mmc[1].gpio_wp = -EINVAL; am335x_mmc[1].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */ /* mmc will be initialized when mmc0_init is called */ return;}

static struct evm_dev_cfg a807_am335x_dev_cfg[] = { {am335x_rtc_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {clkout2_enable, DEV_ON_BASEBOARD, PROFILE_ALL}, {tps65217_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {mii1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {i2c1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {i2c2_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {usb0_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {usb1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {mcasp0_init,DEV_ON_BASEBOARD, PROFILE_ALL}, {mmc1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {mmc0_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {uart2_init,DEV_ON_BASEBOARD, PROFILE_ALL}, {sgx_init, DEV_ON_BASEBOARD, PROFILE_ALL}, {NULL, 0, 0},};

zhiqiang wang5:

回复 zhiqiang wang5:

mmc1的初始化要放到前面,并且与mmc0的初始化间隔开,如下:我这样就通过了。

{mmc1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, 

{mcasp0_init,DEV_ON_BASEBOARD, PROFILE_ALL},

{mmc0_init, DEV_ON_BASEBOARD, PROFILE_ALL}, 

zhiqiang wang5:

回复 zhiqiang wang5:

mmc1_init的初始化放到前面,并且与mmc0的初始化隔开,如下

{mmc1_init, DEV_ON_BASEBOARD, PROFILE_ALL}, 

{mcasp0_init,DEV_ON_BASEBOARD, PROFILE_ALL},

{mmc0_init, DEV_ON_BASEBOARD, PROFILE_ALL}, 

guangyun wang:

你的问题解决了吗?

你是不是把sd卡里的所有镜像都复制到了emmc中了,然后从emmc启动的。而这个时候sd里没有任何镜像文件,但是sd还是插在板子上的啊?

如果是这样的话,那么/dev/mmcblk0p2默认就是sd卡的。你把sd卡拔掉,系统应该就可以正常从emmc启动啦

guangyun wang:

回复 zhiqiang wang5:

那如果是设备树的话,应该怎么修改啊?下面是我遇到的问题,看到的话,帮我分析一下呗!

http://www.deyisupport.com/question_answer/dsp_arm/sitara_arm/f/25/t/131904.aspx

赞(0)
未经允许不得转载:TI中文支持网 » eMMC无法识别的问题
分享到: 更多 (0)