]> git.sur5r.net Git - u-boot/commitdiff
arm: omap: Add check for fdtfile in the findfdt macro
authorDan Murphy <dmurphy@ti.com>
Thu, 6 Jun 2013 18:27:06 +0000 (13:27 -0500)
committerTom Rini <trini@ti.com>
Tue, 18 Jun 2013 14:43:29 +0000 (10:43 -0400)
In the omap4, omap5 and am335x common files add a check to ensure that the fdtfile is
defined after the findfdt macro has run.  If the file is not defined then warn the user that the
dtb file is not defined.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
include/configs/am335x_evm.h
include/configs/omap4_common.h
include/configs/omap5_common.h

index b286ffc8d4fb2a729581964d184a1c4614747f5b..7cc3ef24acc30717e2252cb442dd5bd3e755ccb1 100644 (file)
@@ -60,7 +60,7 @@
        "rdaddr=0x81000000\0" \
        "bootdir=/boot\0" \
        "bootfile=uImage\0" \
-       "fdtfile=\0" \
+       "fdtfile=undefined\0" \
        "console=ttyO0,115200n8\0" \
        "optargs=\0" \
        "mtdids=" MTDIDS_DEFAULT "\0" \
                "if test $board_name = A33515BB; then " \
                        "setenv fdtfile am335x-evm.dtb; fi; " \
                "if test $board_name = A335X_SK; then " \
-                       "setenv fdtfile am335x-evmsk.dtb; fi\0" \
-
+                       "setenv fdtfile am335x-evmsk.dtb; fi " \
+               "if test $fdtfile = undefined; then " \
+                       "echo WARNING: Could not determine device tree to use; fi; \0"
 #endif
 
 #define CONFIG_BOOTCOMMAND \
index 3e5d36b21e0d552b031df9dd8ad1906d6036eeba..f47d52e2d08c4087a703b7fdb892cd3ff85deb20 100644 (file)
        "console=ttyO2,115200n8\0" \
        "fdt_high=0xffffffff\0" \
        "fdtaddr=0x80f80000\0" \
+       "fdtfile=undefined\0" \
        "bootpart=0:2\0" \
        "bootdir=/boot\0" \
        "bootfile=zImage\0" \
                "if test $board_name = panda; then " \
                        "setenv fdtfile omap4-panda.dtb; fi;" \
                "if test $board_name = panda-es; then " \
-                       "setenv fdtfile omap4-panda-es.dtb; fi; \0" \
+                       "setenv fdtfile omap4-panda-es.dtb; fi;" \
+               "if test $fdtfile = undefined; then " \
+                       "echo WARNING: Could not determine device tree to use; fi; \0" \
        "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
 
 #define CONFIG_BOOTCOMMAND \
index ddf2ad4fc2918307fe6489ef8788a36c057abc1d..deecf4ddab7abc558ac36dae7a3debfbecbbd282 100644 (file)
        "console=ttyO2,115200n8\0" \
        "fdt_high=0xffffffff\0" \
        "fdtaddr=0x80f80000\0" \
+       "fdtfile=undefined\0" \
        "bootpart=0:2\0" \
        "bootdir=/boot\0" \
        "bootfile=zImage\0" \
                "bootz ${loadaddr} - ${fdtaddr}\0" \
        "findfdt="\
                "if test $board_name = omap5_uevm; then " \
-                       "setenv fdtfile omap5-uevm.dtb; fi;\0 " \
+                       "setenv fdtfile omap5-uevm.dtb; fi; " \
+               "if test $fdtfile = undefined; then " \
+                       "echo WARNING: Could not determine device tree to use; fi; \0" \
        "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0" \
 
 #define CONFIG_BOOTCOMMAND \