ARM: uniphier: make update commands more flexible for ATF
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 27 Jan 2017 21:53:54 +0000 (06:53 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 29 Jan 2017 11:59:08 +0000 (20:59 +0900)
Currently, SPL (u-boot-spl.bin) and U-Boot (u-boot.bin) are stored
in non-volatile devices, and some environments are defined to update
the images easily.

When ARM Trusted Firmware is fully used, SPL is not used.  U-Boot
proper is contained as BL33 into FIP (Firmware Image Package), which
is standard container used by ATF.  Allow to use it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
include/configs/uniphier.h

index 49309c967b1706166dcd033f145d6d7c506f9c8b..62c3daff14b31ba68b86524dcda8b575e0d8dc57 100644 (file)
 
 #define CONFIG_CMDLINE_EDITING         /* add command line history     */
 
+#if defined(CONFIG_ARM64) && !defined(CONFIG_ARMV8_MULTIENTRY)
+/* ARM Trusted Firmware */
+#define BOOT_IMAGES \
+       "second_image=bl1.bin\0" \
+       "third_image=fip.bin\0"
+#else
+#define BOOT_IMAGES \
+       "second_image=u-boot-spl.bin\0" \
+       "third_image=u-boot.bin\0"
+#endif
+
 #define CONFIG_BOOTCOMMAND             "run $bootmode"
 
 #define CONFIG_ROOTPATH                        "/nfs/root/path"
        "initrd_high=0xffffffffffffffff\0"                      \
        "nor_base=0x42000000\0"                                 \
        "sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&"    \
-               "tftpboot $tmp_addr u-boot-spl.bin &&"          \
+               "tftpboot $tmp_addr $second_image && " \
                "setexpr tmp_addr $nor_base + 0x70000 && " \
-               "tftpboot $tmp_addr u-boot.bin\0"               \
+               "tftpboot $tmp_addr $third_image\0" \
        "emmcupdate=mmcsetn &&"                                 \
                "mmc partconf $mmc_first_dev 0 1 1 &&"          \
-               "tftpboot u-boot-spl.bin &&"                    \
+               "tftpboot $second_image && " \
                "mmc write $loadaddr 0 100 && " \
-               "tftpboot u-boot.bin &&"                        \
+               "tftpboot $third_image && " \
                "mmc write $loadaddr 100 700\0" \
        "nandupdate=nand erase 0 0x00100000 &&"                 \
-               "tftpboot u-boot-spl.bin &&"                    \
+               "tftpboot $second_image && " \
                "nand write $loadaddr 0 0x00020000 && " \
-               "tftpboot u-boot.bin &&"                        \
+               "tftpboot $third_image && " \
                "nand write $loadaddr 0x00020000 0x000e0000\0" \
+       BOOT_IMAGES \
        LINUXBOOT_ENV_SETTINGS
 
 #define CONFIG_SYS_BOOTMAPSZ                   0x20000000