Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X: eMMC boot problem with SD card inserted

Hi, I have a custom AM335X board, with eMMC on AM335X mmc1 port and SD card on AM335X mmc0 port. everything is fine and kernel = 3.2, uboot = 2013.01

Currently I can boot the uboot and the kernel from SD or eMMC separately. But when a SD is inserted, and boot from eMMC, the kernel tries to mount the 2nd partition on SD as rootfs (which is wrong, SD became /dev/mmcblk0) 

The reason being so is because, kernel probes mmc devices in order:

when SD is not present, kernel register eMMC(mmc1) as /dev/mmcblk0
when SD is inserted, kernel register SD as /dev/mmcblk0 and eMMC(mmc1) as /dev/mmcblk1

Therefore when kernel tries to mount / , it will not find the correct partition.

Any solution to fix this problem? Can you change the order or probe, or fix the dev numbering? thanks!

  • Hi,
     
    Have you seen this post? http://e2e.ti.com/support/arm/sitara_arm/f/791/t/275366.aspx. Maybe it's related to your problem.
  • Hi, thanks for your help, this post inspired me. I have fixed my problem by force emmc (mmc1) -> /dev/mmcblk0 and sd card(mmc0) -> /dev/mmcblk1, via some code hack in board-am335x.c

    Therefore regardless of SD insertion, SD will always numbered after eMMC.

    snippet:

    ....

    static struct omap2_hsmmc_info am335x_mmc[] __initdata = {
    {
    /* will be set at runtime */
    },
    {
    .mmc = 1,
    .caps = MMC_CAP_4_BIT_DATA,
    .gpio_cd = GPIO_TO_PIN(0, 6),
    .gpio_wp = GPIO_TO_PIN(3, 18),
    .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* 3V3 */
    },
    {
    .mmc = 0, /* will be set at runtime */
    },
    {} /* Terminator */
    };

    ....

    static void mmc1_emmc_init(int evm_id, int profile){
    setup_pin_mux(mmc1_common_pin_mux);
    setup_pin_mux(mmc1_dat4_7_pin_mux);
    setup_pin_mux(mmc1_rst_pin_mix);
    am335x_mmc[0].mmc = 2;
    am335x_mmc[0].caps = MMC_CAP_8_BIT_DATA;
    am335x_mmc[0].gpio_cd = -EINVAL;
    am335x_mmc[0].gpio_wp = -EINVAL;
    am335x_mmc[0].ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34; /* 3V3 */
    /* mmc will be initialized when mmc0_init is called */
    return;
    }
  • Hi,

    I am facing the same issue in u-boot 2016.05.
    I could not find the functions "mmc0_init" / "mmc1_init".

    Any idea how can I achieve this?

    Regards,
    Chirag
  • HI. I'd like to ask you how to act eMMC/SD in the uboot mode. i did kernel booting(SD/EMMC). but it has not been yet to do eMMC booting in uboot.

    I mean it's okay the uboot.img and MLO from sd card  acts, then ext4 filesystem on eMMC. but every files on eMMC are impossible.

    i saw your writings that you can do uboot confiurations for eMMC/SD.

    could you teach me how to revise files?