]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: lsxl: use CONFIG_DEFAULT_FDT_FILE
authorMichael Walle <michael@walle.cc>
Wed, 17 Aug 2022 19:37:59 +0000 (21:37 +0200)
committerStefan Roese <sr@denx.de>
Tue, 23 Aug 2022 10:39:41 +0000 (12:39 +0200)
Drop our own CONFIG_FDTFILE handling in favor of the generic
CONFIG_DEFAULT_FDT_FILE one.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
configs/lschlv2_defconfig
configs/lsxhl_defconfig
include/configs/lsxl.h

index 081a2448fc32d195c342212cbc0955d32cfac6db..d5cd0d557512826c097b6e096a6047649334a1a4 100644 (file)
@@ -25,6 +25,7 @@ CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sda2"
 CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
+CONFIG_DEFAULT_FDT_FILE="kirkwood-lschlv2.dtb"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
index 33bec601474fe5518a43c8b328a84f3815140c0e..8f0672b1899fa96772038f3faf48ad9a960bf7e5 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/sda2"
 CONFIG_BOOTCOMMAND="run bootcmd_${bootsource}"
+CONFIG_DEFAULT_FDT_FILE="kirkwood-lsxhl.dtb"
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
index db5f7a93f92422cf6a4227b7fb238026c13500a8..fb9a8c5032faeec71206adb1f5f927b645a153f3 100644 (file)
 /*
  * Default environment variables
  */
-
-#if defined(CONFIG_LSXHL)
-#define CONFIG_FDTFILE "kirkwood-lsxhl.dtb"
-#elif defined(CONFIG_LSCHLV2)
-#define CONFIG_FDTFILE "kirkwood-lschlv2.dtb"
-#else
-#error "Unsupported board"
-#endif
-
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        "bootsource=legacy\0"                                           \
        "hdpart=0:1\0"                                                  \
        "kernel_addr=0x00800000\0"                                      \
        "ramdisk_addr=0x01000000\0"                                     \
        "fdt_addr=0x00ff0000\0"                                         \
+       "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"                         \
        "bootcmd_legacy=sata init "                                     \
                "&& load sata ${hdpart} ${kernel_addr} /uImage.buffalo "\
                "&& load sata ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
@@ -44,7 +36,7 @@
        "bootcmd_net=bootp ${kernel_addr} vmlinuz "                     \
                "&& tftpboot ${ramdisk_addr} initrd.img "               \
                "&& setenv ramdisk_len ${filesize} "                    \
-               "&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " "           \
+               "&& tftpboot ${fdt_addr} ${fdtfile} "                   \
                "&& bootz ${kernel_addr} "                              \
                        "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"  \
        "bootcmd_hdd=sata init "                                        \
@@ -58,7 +50,7 @@
                "&& load usb 0:1 ${kernel_addr} /vmlinuz "              \
                "&& load usb 0:1 ${ramdisk_addr} /initrd.img "          \
                "&& setenv ramdisk_len ${filesize} "                    \
-               "&& load usb 0:1 ${fdt_addr} " CONFIG_FDTFILE " "       \
+               "&& load usb 0:1 ${fdt_addr} ${fdtfile} "               \
                "&& bootz ${kernel_addr} "                              \
                        "${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0"  \
        "bootcmd_rescue=run config_nc_dhcp; run nc\0"                   \