From 90a6e929881caf4a74015c8e8f2279ee0a7b3804 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 21 Jan 2016 14:56:06 +0900 Subject: ARM: uniphier: fix NOR boot command Commit 89835b3557fe ("ARM: uniphier: allow to run zImage rather than uImage") changed the kernel boot commands. Unlike "bootm", "bootz" does not relocate the kernel image. When the boot device is a NOR flash, the zImage should be copied from the NOR onto the DRAM before it is passed to the "bootz" command. Signed-off-by: Masahiro Yamada --- include/configs/uniphier.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/configs') diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index bf89a0e..ec4fd67 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -203,9 +203,10 @@ "ramdisk_file=rootfs.cpio.uboot\0" \ "norboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ "setexpr kernel_addr $nor_base + $kernel_addr &&" \ + "cp.b $kernel_addr $kernel_addr_r $kernel_size &&" \ "setexpr ramdisk_addr $nor_base + $ramdisk_addr &&" \ "setexpr fdt_addr $nor_base + $fdt_addr &&" \ - "bootz $kernel_addr $ramdisk_addr $fdt_addr\0" \ + "bootz $kernel_addr_r $ramdisk_addr $fdt_addr\0" \ "nandboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ "nand read $kernel_addr_r $kernel_addr $kernel_size &&" \ "nand read $ramdisk_addr_r $ramdisk_addr $ramdisk_size &&" \ @@ -221,7 +222,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ "verify=n\0" \ - "norbase=0x42000000\0" \ + "nor_base=0x42000000\0" \ "nandupdate=nand erase 0 0x00100000 &&" \ "tftpboot u-boot-spl-dtb.bin &&" \ "nand write $loadaddr 0 0x00010000 &&" \ -- cgit v1.1 From a304143925df7fd509a110a5b4069e4e85d39192 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 21 Jan 2016 14:56:07 +0900 Subject: ARM: uniphier: add default bootm_low to fix FIT boot Commit 25d4eb8091f4 ("ARM: uniphier: add bootm_low environment") missed to add "bootm_low" for FIT boot. Set "bootm_low" to the DRAM base address. Signed-off-by: Masahiro Yamada --- include/configs/uniphier.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs') diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index ec4fd67..00c27f1 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -223,6 +223,7 @@ "netdev=eth0\0" \ "verify=n\0" \ "nor_base=0x42000000\0" \ + "bootm_low=0x80000000\0" \ "nandupdate=nand erase 0 0x00100000 &&" \ "tftpboot u-boot-spl-dtb.bin &&" \ "nand write $loadaddr 0 0x00010000 &&" \ -- cgit v1.1 From cd5d95653c34723f99c2c712e7a9455687d36e9f Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 21 Jan 2016 14:56:08 +0900 Subject: ARM: uniphier: factor out common part of boot commands The environment "bootm_low" is updated before the "bootz" command. This is common for all the boot modes (NOR, NAND, TFTP, etc.), so can be factored out. Signed-off-by: Masahiro Yamada --- include/configs/uniphier.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'include/configs') diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index 00c27f1..f8bb197 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -201,22 +201,21 @@ "ramdisk_addr_r=0x84a00000\0" \ "ramdisk_size=0x00600000\0" \ "ramdisk_file=rootfs.cpio.uboot\0" \ - "norboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ - "setexpr kernel_addr $nor_base + $kernel_addr &&" \ + "boot_common=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ + "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \ + "norboot=setexpr kernel_addr $nor_base + $kernel_addr &&" \ "cp.b $kernel_addr $kernel_addr_r $kernel_size &&" \ - "setexpr ramdisk_addr $nor_base + $ramdisk_addr &&" \ - "setexpr fdt_addr $nor_base + $fdt_addr &&" \ - "bootz $kernel_addr_r $ramdisk_addr $fdt_addr\0" \ - "nandboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ - "nand read $kernel_addr_r $kernel_addr $kernel_size &&" \ + "setexpr ramdisk_addr_r $nor_base + $ramdisk_addr &&" \ + "setexpr fdt_addr_r $nor_base + $fdt_addr &&" \ + "run boot_common\0" \ + "nandboot=nand read $kernel_addr_r $kernel_addr $kernel_size &&" \ "nand read $ramdisk_addr_r $ramdisk_addr $ramdisk_size &&" \ "nand read $fdt_addr_r $fdt_addr $fdt_size &&" \ - "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \ - "tftpboot=setexpr bootm_low $kernel_addr_r '&' fe000000 &&" \ - "tftpboot $kernel_addr_r $bootfile &&" \ + "run boot_common\0" \ + "tftpboot=tftpboot $kernel_addr_r $bootfile &&" \ "tftpboot $ramdisk_addr_r $ramdisk_file &&" \ "tftpboot $fdt_addr_r $fdt_file &&" \ - "bootz $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" + "run boot_common\0" #endif #define CONFIG_EXTRA_ENV_SETTINGS \ -- cgit v1.1 From d566f754256e71aadd40a0a031997be42fce3d08 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 21 Jan 2016 14:56:09 +0900 Subject: ARM: uniphier: fix nfsboot command This is no longer working, so needs reworking. Signed-off-by: Masahiro Yamada --- include/configs/uniphier.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/configs') diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index f8bb197..b340f63 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -173,7 +173,7 @@ "setenv bootargs $bootargs root=/dev/nfs rw " \ "nfsroot=$serverip:$rootpath " \ "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off;" \ - "tftpboot; bootm;" + "run __nfsboot" #ifdef CONFIG_FIT #define CONFIG_BOOTFILE "fitImage" @@ -186,7 +186,8 @@ "nandboot=nand read $fit_addr_r $fit_addr $fit_size &&" \ "bootm $fit_addr_r\0" \ "tftpboot=tftpboot $fit_addr_r $bootfile &&" \ - "bootm $fit_addr_r\0" + "bootm $fit_addr_r\0" \ + "__nfsboot=run tftpboot\0" #else #define CONFIG_CMD_BOOTZ #define CONFIG_BOOTFILE "zImage" @@ -215,6 +216,11 @@ "tftpboot=tftpboot $kernel_addr_r $bootfile &&" \ "tftpboot $ramdisk_addr_r $ramdisk_file &&" \ "tftpboot $fdt_addr_r $fdt_file &&" \ + "run boot_common\0" \ + "__nfsboot=tftpboot $kernel_addr_r $bootfile &&" \ + "tftpboot $fdt_addr_r $fdt_file &&" \ + "tftpboot $fdt_addr_r $fdt_file &&" \ + "setenv ramdisk_addr_r - &&" \ "run boot_common\0" #endif -- cgit v1.1 From 3cb9abc9c512ca733d2de4cca20c5d7feca829c7 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 2 Feb 2016 12:53:31 +0900 Subject: ARM: uniphier: update U-Boot file names in workflow Since commit ad1ecd2063da ("fdt: Build a U-Boot binary without device tree") and commit 03c25bcd263a ("fdt: Build an SPL binary without device tree"), we can use shorter file names for the output images. The default configuration for UniPhier SoCs enables CONFIG_OF_SEPARATE and CONFIG_SPL_OF_CONTROL. In this case, spl/u-boot-spl.bin is the same as spl/u-boot-spl-dtb.bin. Likewise, u-boot.img is the same as as u-boot-dtb.img. So, this change of the flow has no impact. Signed-off-by: Masahiro Yamada Reviewed-by: Simon Glass --- include/configs/uniphier.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/configs') diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index b340f63..6f91ee6 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -230,9 +230,9 @@ "nor_base=0x42000000\0" \ "bootm_low=0x80000000\0" \ "nandupdate=nand erase 0 0x00100000 &&" \ - "tftpboot u-boot-spl-dtb.bin &&" \ + "tftpboot u-boot-spl.bin &&" \ "nand write $loadaddr 0 0x00010000 &&" \ - "tftpboot u-boot-dtb.img &&" \ + "tftpboot u-boot.img &&" \ "nand write $loadaddr 0x00010000 0x000f0000\0" \ LINUXBOOT_ENV_SETTINGS -- cgit v1.1 From 755c7d9a6179ffb15829da34cbc818d7fb4de558 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 2 Feb 2016 21:11:28 +0900 Subject: ARM: uniphier: change stack pointer address for SPL No special reason for the current stack address 0x0ff08000. Change it to 0x00100000 to simplify the init_page_table. There are two types of SoCs in terms of the load address of SPL. [1] PH1-sLD3, PH1-LD4, PH1-sLD8 SPL is loaded at 0x00040000-0x0004ffff [2] PH1-Pro4, PH1-Pro5, ProXstream2, PH1-LD6b SPL is loaded at 0x00100000-0x0010ffff The new stack area (0x000f8000-0x00100000) should be safe for all the cases. Signed-off-by: Masahiro Yamada --- include/configs/uniphier.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index 6f91ee6..43fe946 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -252,7 +252,7 @@ #define CONFIG_SPL_TEXT_BASE 0x00100000 #endif -#define CONFIG_SPL_STACK (0x0ff08000) +#define CONFIG_SPL_STACK (0x00100000) #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE) #define CONFIG_PANIC_HANG -- cgit v1.1 From 768cade1aa6cf1ab5c06025bf13356536f1a04a5 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 9 Feb 2016 18:59:52 +0900 Subject: ARM: uniphier: drop unnecessary "bootm_low" environment define This environment define has been here to work around the LMB allocation error introduced by commit 9c11135ce053 ("image: fix getenv_bootm_size() function"). It is no longer needed because the root cause was fixed by commit 0cb389dd1a38 ("image: fix getenv_bootm_size() function again"). Signed-off-by: Masahiro Yamada --- include/configs/uniphier.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index 43fe946..fcec0c0 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -228,7 +228,6 @@ "netdev=eth0\0" \ "verify=n\0" \ "nor_base=0x42000000\0" \ - "bootm_low=0x80000000\0" \ "nandupdate=nand erase 0 0x00100000 &&" \ "tftpboot u-boot-spl.bin &&" \ "nand write $loadaddr 0 0x00010000 &&" \ -- cgit v1.1