Commit 378284402ac6ae5ae68364eacd523cc4285c6111

Authored by Eric Lee
1 parent 409a2e9a80
Exists in v2015.07-smarct4x

Bug fixed for eMMC boot

Showing 2 changed files with 6 additions and 8 deletions Side-by-side Diff

board/embedian/smarct437x/board.c
... ... @@ -840,8 +840,6 @@
840 840 setenv("board_rev", safe_string);
841 841 #endif
842 842  
843   - return 0;
844   -
845 843 /* Turn on LCD Backlight */
846 844 #define GPIO_LCD_BKLT_EN 68
847 845 #define GPIO_LCD_PWM_EN 138
... ... @@ -856,7 +854,7 @@
856 854 hang();
857 855 } else if ((gpio_get_value(168) == 0)&&(gpio_get_value(169) == 1)&&(gpio_get_value(170) == 0)) {
858 856 puts("BOOT_SEL Detected: OFF ON OFF, Load zImage from Carrier SDMMC...\n");
859   - setenv_ulong("mmcdev", 2);
  857 + setenv_ulong("mmcdev", 2);
860 858 setenv("bootcmd", "run findfdt; run mmcboot;");
861 859 } else if ((gpio_get_value(168) == 1)&&(gpio_get_value(169) == 0)&&(gpio_get_value(170) == 0)) {
862 860 puts("BOOT_SEL Detected: ON OFF OFF, Load zImage from Carrier SD Card...\n");
... ... @@ -864,8 +862,8 @@
864 862 setenv("bootcmd", "run findfdt; run mmcboot;");
865 863 } else if ((gpio_get_value(168) == 0)&&(gpio_get_value(169) == 1)&&(gpio_get_value(170) == 1)) {
866 864 puts("BOOT_SEL Detected: OFF ON ON, Load zImage from Module eMMC Flash...\n");
867   - setenv_ulong("mmcdev", 1);
868   - setenv("bootcmd", "run findfdt; run mmcboot;");
  865 + setenv_ulong("mmcdev", 1);
  866 + setenv("bootcmd", "mmc rescan; run findfdt; run mmcboot;");
869 867 } else if ((gpio_get_value(168) == 1)&&(gpio_get_value(169) == 0)&&(gpio_get_value(170) == 1)) {
870 868 puts("BOOT_SEL Detected: ON OFF ON, Load zImage from GBE...\n");
871 869 setenv("bootcmd", "dhcp;");
include/configs/smarct437x_evm.h
... ... @@ -269,7 +269,7 @@
269 269 "bootdir=\0" \
270 270 "fdtdir=/dtbs\0" \
271 271 "bootfile=zImage\0" \
272   - "fdtfile=undefined\0" \" \
  272 + "fdtfile=am437x-smarct437x.dtb\0" \" \
273 273 "console=ttyO0,115200n8\0" \
274 274 "partitions=" \
275 275 "uuid_disk=${uuid_gpt_disk};" \
... ... @@ -304,8 +304,8 @@
304 304 "root=${ramroot} " \
305 305 "rootfstype=${ramrootfstype}\0" \
306 306 "loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz\0" \
307   - "loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
308   - "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
  307 + "loadimage=load ${devtype} ${mmcdev}:1 ${loadaddr} ${bootdir}/${bootfile}\0" \
  308 + "loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${mmcdev}:1 ${fdtaddr} ${fdtdir}/${fdtfile}\0" \
309 309 "mmcboot=mmc dev ${mmcdev}; " \
310 310 "setenv devnum ${mmcdev}; " \
311 311 "setenv bootpart ${mmcdev}:1; "\