davinci: omapl138_lcdk: use environment variables for memory addresses
authorSekhar Nori <nsekhar@ti.com>
Thu, 6 Apr 2017 09:22:55 +0000 (14:52 +0530)
committerTom Rini <trini@konsulko.com>
Sun, 9 Apr 2017 01:32:50 +0000 (21:32 -0400)
Use environment variables for various memory addresses
used on OMAP-L138 LCDK board. This makes it easy to
customize the boot process.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
include/configs/omapl138_lcdk.h

index eab80e3063872f76c90e3cd77213a26f046f8320..36bb27f2f5f8e2ce0539f42fca944a9a1b612858 100644 (file)
        "if mmc rescan; then " \
                "run mmcboot; "
        "fi"
-#define CONFIG_EXTRA_ENV_SETTINGS \
+
+#define DEFAULT_LINUX_BOOT_ENV \
+       "loadaddr=0xc0700000\0" \
        "fdtaddr=0xc0600000\0" \
+       "scriptaddr=0xc0600000\0"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       DEFAULT_LINUX_BOOT_ENV \
        "fdtfile=da850-lcdk.dtb\0" \
-       "fdtboot=bootz 0xc0700000 - ${fdtaddr};\0" \
+       "fdtboot=bootz ${loadaddr} - ${fdtaddr};\0" \
        "mmcboot=" \
-               "if fatload mmc 0 0xc0600000 boot.scr; then " \
-                       "source 0xc0600000; " \
+               "if fatload mmc 0 ${scriptaddr} boot.scr; then " \
+                       "source ${scriptaddr}; " \
                "else " \
-                       "fatload mmc 0 0xc0700000 " \
+                       "fatload mmc 0 ${loadaddr} " \
                                __stringify(CONFIG_BOOTFILE) "; " \
                        "fatload mmc 0 ${fdtaddr} ${fdtfile}; " \
                        "run fdtboot; " \