Commit b7b4303642af1cf3a2c58befaa8e8944b9fbb3c9

Authored by Masahiro Yamada
1 parent c0efc3140e

ARM: uniphier: make update commands more flexible for ATF

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>

Showing 1 changed file with 18 additions and 6 deletions Side-by-side Diff

include/configs/uniphier.h
... ... @@ -146,6 +146,17 @@
146 146  
147 147 #define CONFIG_CMDLINE_EDITING /* add command line history */
148 148  
  149 +#if defined(CONFIG_ARM64) && !defined(CONFIG_ARMV8_MULTIENTRY)
  150 +/* ARM Trusted Firmware */
  151 +#define BOOT_IMAGES \
  152 + "second_image=bl1.bin\0" \
  153 + "third_image=fip.bin\0"
  154 +#else
  155 +#define BOOT_IMAGES \
  156 + "second_image=u-boot-spl.bin\0" \
  157 + "third_image=u-boot.bin\0"
  158 +#endif
  159 +
149 160 #define CONFIG_BOOTCOMMAND "run $bootmode"
150 161  
151 162 #define CONFIG_ROOTPATH "/nfs/root/path"
152 163  
153 164  
154 165  
155 166  
156 167  
157 168  
... ... @@ -229,20 +240,21 @@
229 240 "initrd_high=0xffffffffffffffff\0" \
230 241 "nor_base=0x42000000\0" \
231 242 "sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&" \
232   - "tftpboot $tmp_addr u-boot-spl.bin &&" \
  243 + "tftpboot $tmp_addr $second_image && " \
233 244 "setexpr tmp_addr $nor_base + 0x70000 && " \
234   - "tftpboot $tmp_addr u-boot.bin\0" \
  245 + "tftpboot $tmp_addr $third_image\0" \
235 246 "emmcupdate=mmcsetn &&" \
236 247 "mmc partconf $mmc_first_dev 0 1 1 &&" \
237   - "tftpboot u-boot-spl.bin &&" \
  248 + "tftpboot $second_image && " \
238 249 "mmc write $loadaddr 0 100 && " \
239   - "tftpboot u-boot.bin &&" \
  250 + "tftpboot $third_image && " \
240 251 "mmc write $loadaddr 100 700\0" \
241 252 "nandupdate=nand erase 0 0x00100000 &&" \
242   - "tftpboot u-boot-spl.bin &&" \
  253 + "tftpboot $second_image && " \
243 254 "nand write $loadaddr 0 0x00020000 && " \
244   - "tftpboot u-boot.bin &&" \
  255 + "tftpboot $third_image && " \
245 256 "nand write $loadaddr 0x00020000 0x000e0000\0" \
  257 + BOOT_IMAGES \
246 258 LINUXBOOT_ENV_SETTINGS
247 259  
248 260 #define CONFIG_SYS_BOOTMAPSZ 0x20000000