Commit c231c4367ace6574e27ff0d1844d163fc471287b

Authored by Masahiro Yamada
1 parent 569e4be172

ARM: uniphier: add emmcupdate command

The Boot ROM expects the boot image (SPL) in the Boot Partition 1.
So, updating images involves the hardware partition switch.  It might
be a bit advanced for some users.

To be user-friendly, this commit adds a useful command to update the
images; just put SPL and U-Boot proper into the public directory of
the TFTP server and execute "run emmcupdate" from the command line.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Showing 2 changed files with 21 additions and 0 deletions Side-by-side Diff

... ... @@ -78,6 +78,20 @@
78 78 => run nandupdate
79 79  
80 80  
  81 +Burn U-Boot images to eMMC
  82 +--------------------------
  83 +
  84 +Write two files to the Boot partition 1 of the eMMC device as follows:
  85 + - spl/u-boot-spl.bin at the offset address 0x00000000
  86 + - u-boot.img at the offset address 0x00010000
  87 +
  88 +If a TFTP server is available, the images can be easily updated.
  89 +Just copy the u-boot-spl-dtb.bin and u-boot-dtb.img to the TFTP public
  90 +directory, and then run the following command at the U-Boot command line:
  91 +
  92 + => run emmcupdate
  93 +
  94 +
81 95 UniPhier specific commands
82 96 --------------------------
83 97  
include/configs/uniphier.h
... ... @@ -233,6 +233,13 @@
233 233 "netdev=eth0\0" \
234 234 "verify=n\0" \
235 235 "nor_base=0x42000000\0" \
  236 + "emmcupdate=mmcsetn &&" \
  237 + "mmc partconf $mmc_first_dev 0 1 1 &&" \
  238 + "mmc erase 0 800 &&" \
  239 + "tftpboot u-boot-spl.bin &&" \
  240 + "mmc write $loadaddr 0 80 &&" \
  241 + "tftpboot u-boot.img &&" \
  242 + "mmc write $loadaddr 80 780\0" \
236 243 "nandupdate=nand erase 0 0x00100000 &&" \
237 244 "tftpboot u-boot-spl.bin &&" \
238 245 "nand write $loadaddr 0 0x00010000 &&" \