[U-Boot] [PATCH 0/3] ARM: uniphier: more patches for bulk updates for v2016.05-rc1

Masahiro Yamada (3): ARM: uniphier: fix README instruction for updating U-Boot via TFTP ARM: uniphier: add NOR boot support ARM: uniphier: switch to raw U-Boot image
arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c | 2 +- arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c | 2 +- doc/README.uniphier | 26 ++++++++++++++++------- include/configs/uniphier.h | 10 +++++++-- 4 files changed, 28 insertions(+), 12 deletions(-)

Commit 3cb9abc9c512 ("ARM: uniphier: update U-Boot file names in workflow") missed to update these two sentences. Fix them now.
Replace u-boot-spl-dtb.bin and u-boot-dtb.img with u-boot-spl.bin and u-boot.img, respectively.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
doc/README.uniphier | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/doc/README.uniphier b/doc/README.uniphier index 8d043be..47863a4 100644 --- a/doc/README.uniphier +++ b/doc/README.uniphier @@ -80,8 +80,8 @@ Write two files to the NAND device as follows: - 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: +Just copy the u-boot-spl.bin and u-boot.img to the TFTP public directory, +and then run the following command at the U-Boot command line:
=> run nandupdate
@@ -94,8 +94,8 @@ Write two files to the Boot partition 1 of the eMMC device as follows: - 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: +Just copy the u-boot-spl.bin and u-boot.img to the TFTP public directory, +and then run the following command at the U-Boot command line:
=> run emmcupdate

This allows to boot from NOR flash (or SRAM) with help of an external loader (NOR-loader).
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c | 2 +- arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c | 2 +- include/configs/uniphier.h | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c b/arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c index 8334373..ef52d69 100644 --- a/arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c +++ b/arch/arm/mach-uniphier/boot-mode/boot-mode-ld4.c @@ -43,7 +43,7 @@ struct boot_device_info boot_device_table[] = { {BOOT_DEVICE_NONE, "Reserved"}, {BOOT_DEVICE_NONE, "Reserved"}, {BOOT_DEVICE_NONE, "Reserved"}, - {BOOT_DEVICE_NONE, "Reserved"}, + {BOOT_DEVICE_NOR, "NOR Boot"}, };
static int get_boot_mode_sel(void) diff --git a/arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c b/arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c index b0f3f9a..0258fae 100644 --- a/arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c +++ b/arch/arm/mach-uniphier/boot-mode/boot-mode-sld3.c @@ -12,7 +12,7 @@ #include "boot-device.h"
static struct boot_device_info boot_device_table[] = { - {BOOT_DEVICE_NONE, "Reserved"}, + {BOOT_DEVICE_NOR, "NOR boot"}, {BOOT_DEVICE_NONE, "External Master"}, {BOOT_DEVICE_NONE, "Reserved"}, {BOOT_DEVICE_NONE, "Reserved"}, diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index 076c733..dd7b352 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -261,6 +261,7 @@
#define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_NOR_SUPPORT #define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_MMC_SUPPORT
@@ -270,6 +271,8 @@ #define CONFIG_SPL_BOARD_INIT
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x10000 + +#define CONFIG_SYS_UBOOT_BASE 0x60000 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80
#define CONFIG_SPL_MAX_FOOTPRINT 0x10000

Now everything is done to load a raw U-Boot proper image instead of an mkimage-processed one (as far as I tested on NAND, eMMC, NOR).
The SPL already knows the load address of the U-Boot proper without parsing its uImage header because the load address is defined by CONFIG_SYS_TEXT_BASE, assuming that the two images are generated from the same build.
My main motivation of this switch is to use u-boot-with-spl.bin, a concatenation of u-boot-spl.bin and u-boot.bin. (I wish there were a concatenation of u-boot-spl.bin and u-boot.img...) Anyway, this commit would be useful for one-shot image burn.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
doc/README.uniphier | 22 ++++++++++++++++------ include/configs/uniphier.h | 9 ++++++--- 2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/doc/README.uniphier b/doc/README.uniphier index 47863a4..49045a0 100644 --- a/doc/README.uniphier +++ b/doc/README.uniphier @@ -75,12 +75,17 @@ to use your favorite compiler. Burn U-Boot images to NAND --------------------------
-Write two files to the NAND device as follows: +Write the following to the NAND device: + - spl/u-boot-spl.bin at the offset address 0x00000000 - - u-boot.img at the offset address 0x00010000 + - u-boot.bin at the offset address 0x00010000 + +or + + - u-boot-with-spl.bin at the offset address 0x00000000
If a TFTP server is available, the images can be easily updated. -Just copy the u-boot-spl.bin and u-boot.img to the TFTP public directory, +Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory, and then run the following command at the U-Boot command line:
=> run nandupdate @@ -89,12 +94,17 @@ and then run the following command at the U-Boot command line: Burn U-Boot images to eMMC --------------------------
-Write two files to the Boot partition 1 of the eMMC device as follows: +Write the following to the Boot partition 1 of the eMMC device: + - spl/u-boot-spl.bin at the offset address 0x00000000 - - u-boot.img at the offset address 0x00010000 + - u-boot.bin at the offset address 0x00010000 + +or + + - u-boot-with-spl.bin at the offset address 0x00000000
If a TFTP server is available, the images can be easily updated. -Just copy the u-boot-spl.bin and u-boot.img to the TFTP public directory, +Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory, and then run the following command at the U-Boot command line:
=> run emmcupdate diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index dd7b352..5f3d6b8 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -61,6 +61,7 @@
#define CONFIG_SYS_MAX_FLASH_SECT 256 #define CONFIG_SYS_MONITOR_BASE 0 +#define CONFIG_SYS_MONITOR_LEN 0x00080000 /* 512KB */ #define CONFIG_SYS_FLASH_BASE 0
/* @@ -233,12 +234,12 @@ "mmc erase 0 800 &&" \ "tftpboot u-boot-spl.bin &&" \ "mmc write $loadaddr 0 80 &&" \ - "tftpboot u-boot.img &&" \ + "tftpboot u-boot.bin &&" \ "mmc write $loadaddr 80 780\0" \ "nandupdate=nand erase 0 0x00100000 &&" \ "tftpboot u-boot-spl.bin &&" \ "nand write $loadaddr 0 0x00010000 &&" \ - "tftpboot u-boot.img &&" \ + "tftpboot u-boot.bin &&" \ "nand write $loadaddr 0x00010000 0x000f0000\0" \ LINUXBOOT_ENV_SETTINGS
@@ -272,9 +273,11 @@
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x10000
-#define CONFIG_SYS_UBOOT_BASE 0x60000 +/* subtract sizeof(struct image_header) */ +#define CONFIG_SYS_UBOOT_BASE (0x60000 - 0x40) #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80
+#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" #define CONFIG_SPL_MAX_FOOTPRINT 0x10000
#endif /* __CONFIG_UNIPHIER_COMMON_H__ */

2016-03-23 1:40 GMT+09:00 Masahiro Yamada yamada.masahiro@socionext.com:
Masahiro Yamada (3): ARM: uniphier: fix README instruction for updating U-Boot via TFTP ARM: uniphier: add NOR boot support ARM: uniphier: switch to raw U-Boot image
Series, Applied to u-boot-uniphier/master.
participants (1)
-
Masahiro Yamada