]> git.sur5r.net Git - u-boot/commitdiff
ARM:Panda:Fix device tree loading for the panda-es
authorDan Murphy <dmurphy@ti.com>
Thu, 18 Apr 2013 06:29:53 +0000 (06:29 +0000)
committerTom Rini <trini@ti.com>
Fri, 10 May 2013 12:25:55 +0000 (08:25 -0400)
Fix the device tree loading for panda(4430) and panda-es(4460)

Modify the board name if a 4460 panda or panda-es is detected
at run time.
In the findfdt add a check for the panda-es board name and load
the panda-es device tree blob.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
board/ti/panda/panda.c
include/configs/omap4_common.h

index cab059863d34459326bfc2bbbeaf135dc0a8d373..2bbe392d8113fd0b5dd459f988a24e84afd6fa3a 100644 (file)
@@ -82,6 +82,12 @@ int misc_init_r(void)
        if (omap_revision() == OMAP4430_ES1_0)
                return 0;
 
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+       if (omap_revision() >= OMAP4460_ES1_0 ||
+               omap_revision() <= OMAP4460_ES1_1)
+               setenv("board_name", strcat(CONFIG_SYS_BOARD, "-es"));
+#endif
+
        gpio_direction_input(PANDA_ULPI_PHY_TYPE_GPIO);
        phy_type = gpio_get_value(PANDA_ULPI_PHY_TYPE_GPIO);
 
index 1fd3097d757d7c271ca5cd526e23d090058cbedc..68faecacecf8a907297e003c7cb6ffd71ebbb646 100644 (file)
                "if test $board_name = sdp4430; then " \
                        "setenv fdtfile omap4-sdp.dtb; fi; " \
                "if test $board_name = panda; then " \
-                       "setenv fdtfile omap4-panda-es.dtb; fi\0" \
+                       "setenv fdtfile omap4-panda.dtb; fi;" \
+               "if test $board_name = panda-es; then " \
+                       "setenv fdtfile omap4-panda-es.dtb; fi; \0" \
        "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
 
 #define CONFIG_BOOTCOMMAND \