diff mbox

[3/4] ARM: uniphier: add emmcupdate command

Message ID 1455610122-1696-4-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada Feb. 16, 2016, 8:08 a.m. UTC
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>

---

 doc/README.uniphier        | 14 ++++++++++++++
 include/configs/uniphier.h |  7 +++++++
 2 files changed, 21 insertions(+)

-- 
1.9.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/doc/README.uniphier b/doc/README.uniphier
index 7cfff97..47b4d78 100644
--- a/doc/README.uniphier
+++ b/doc/README.uniphier
@@ -78,6 +78,20 @@  directory, and then run the following command at the U-Boot command line:
   => run nandupdate
 
 
+Burn U-Boot images to eMMC
+--------------------------
+
+Write two files to the Boot partition 1 of the eMMC device as follows:
+ - spl/u-boot-spl.bin at the offset address 0x00000000
+ - u-boot.img         at the offset address 0x00010000
+
+If a TFTP server is available, the images can be easily updated.
+Just copy the u-boot-spl-dtb.bin and u-boot-dtb.img to the TFTP public
+directory, and then run the following command at the U-Boot command line:
+
+  => run emmcupdate
+
+
 UniPhier specific commands
 --------------------------
 
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 19dbfbb..1b28cdc 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -233,6 +233,13 @@ 
 	"netdev=eth0\0"						\
 	"verify=n\0"						\
 	"nor_base=0x42000000\0"					\
+	"emmcupdate=mmcsetn &&"					\
+		"mmc partconf $mmc_first_dev 0 1 1 &&"		\
+		"mmc erase 0 800 &&"				\
+		"tftpboot u-boot-spl.bin &&"			\
+		"mmc write $loadaddr 0 80 &&"			\
+		"tftpboot u-boot.img &&"			\
+		"mmc write $loadaddr 80 780\0"			\
 	"nandupdate=nand erase 0 0x00100000 &&"			\
 		"tftpboot u-boot-spl.bin &&"			\
 		"nand write $loadaddr 0 0x00010000 &&"		\