* [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup
@ 2019-09-11 11:28 Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 1/5] ARM: zynq: Specify MMC controller number for boot sequence Michal Simek
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Michal Simek @ 2019-09-11 11:28 UTC (permalink / raw)
To: u-boot
Hi,
for quite a long time Xilinx was using private boot method. Pretty long time
ago we have enabled distribution boot method and provided time to do
transition to it. Right now it is good time to remove old methods and move
to distro boot fully.
It is also the part of unification between Xilinx Zynq/ZynqMP and Versal
SoCs to use the same boot methods.
This series convert Zynq.
Variable modeboot is still setup because Topic boards and Syzygy are using it.
Thanks,
Michal
Michal Simek (5):
ARM: zynq: Specify MMC controller number for boot sequence
ARM: zynq: Enable USB1 as secondary boot device
ARM: zynq: Fix NOR boot mode
ARM: zynq: Use {} around variables for qspi and nand boot cmds
ARM: zynq: Remove all Xilinx private commands
board/xilinx/zynq/board.c | 2 +-
include/configs/zynq-common.h | 66 +++++------------------------------
2 files changed, 10 insertions(+), 58 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/5] ARM: zynq: Specify MMC controller number for boot sequence
2019-09-11 11:28 [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
@ 2019-09-11 11:28 ` Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 2/5] ARM: zynq: Enable USB1 as secondary boot device Michal Simek
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2019-09-11 11:28 UTC (permalink / raw)
To: u-boot
Xilinx Zynq SoC has two sdhci controllers but boot is only possible from
the first one. That's why there is a need to specify controller number.
mmc1 is supposed to be secondary boot device and should be also listed in
distribution boot.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
board/xilinx/zynq/board.c | 2 +-
include/configs/zynq-common.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 35191b2f813b..7cfe69db6935 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -52,7 +52,7 @@ int board_late_init(void)
env_set("modeboot", "norboot");
break;
case ZYNQ_BM_SD:
- mode = "mmc";
+ mode = "mmc0";
env_set("modeboot", "sdboot");
break;
case ZYNQ_BM_JTAG:
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 283a78494116..824efa9c004b 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -111,7 +111,7 @@
#else
#ifdef CONFIG_CMD_MMC
-#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0)
+#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
#else
#define BOOT_TARGET_DEVICES_MMC(func)
#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/5] ARM: zynq: Enable USB1 as secondary boot device
2019-09-11 11:28 [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 1/5] ARM: zynq: Specify MMC controller number for boot sequence Michal Simek
@ 2019-09-11 11:28 ` Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 3/5] ARM: zynq: Fix NOR boot mode Michal Simek
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2019-09-11 11:28 UTC (permalink / raw)
To: u-boot
Xilinx Zynq SoC has two usb controllers and both could be used as secondary
boot method.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
include/configs/zynq-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 824efa9c004b..de6c06ba3ce7 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -117,7 +117,7 @@
#endif
#ifdef CONFIG_CMD_USB
-#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0)
+#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) func(USB, usb, 1)
#else
#define BOOT_TARGET_DEVICES_USB(func)
#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/5] ARM: zynq: Fix NOR boot mode
2019-09-11 11:28 [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 1/5] ARM: zynq: Specify MMC controller number for boot sequence Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 2/5] ARM: zynq: Enable USB1 as secondary boot device Michal Simek
@ 2019-09-11 11:28 ` Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 4/5] ARM: zynq: Use {} around variables for qspi and nand boot cmds Michal Simek
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2019-09-11 11:28 UTC (permalink / raw)
To: u-boot
There are two typos in this command that's why it couldn't work properly.
This bootmode is almost unused from the beggining on this SoC.
Fixes: 90e97ab31e02 ("arm: zynq: Define distro boot commnads for qspi, nand and nor")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
include/configs/zynq-common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index de6c06ba3ce7..09eada39023c 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -175,7 +175,8 @@
"nand "
#define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \
- "bootcmd_nor=cp.b $scropt_offset_nor $scriptaddr $script_size_f && " \
+ "script_offset_nor=0xE2FC0000\0" \
+ "bootcmd_nor=cp.b ${script_offset_nor} ${scriptaddr} ${script_size_f} && " \
"source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0"
#define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \
@@ -205,7 +206,6 @@
"fdt_high=0x20000000\0" \
"initrd_high=0x20000000\0" \
"scriptaddr=0x20000\0" \
- "script_offser_nor=0xE2FC0000\0" \
"script_offset_f=0xFC0000\0" \
"script_size_f=0x40000\0" \
"loadbootenv_addr=0x2000000\0" \
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 4/5] ARM: zynq: Use {} around variables for qspi and nand boot cmds
2019-09-11 11:28 [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
` (2 preceding siblings ...)
2019-09-11 11:28 ` [U-Boot] [PATCH 3/5] ARM: zynq: Fix NOR boot mode Michal Simek
@ 2019-09-11 11:28 ` Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 5/5] ARM: zynq: Remove all Xilinx private commands Michal Simek
2019-10-08 7:47 ` [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
5 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2019-09-11 11:28 UTC (permalink / raw)
To: u-boot
Follow conventions and used {} around variables.
Fixes: 90e97ab31e02 ("arm: zynq: Define distro boot commnads for qspi, nand and nor")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
include/configs/zynq-common.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 09eada39023c..4b12be30c8aa 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -160,7 +160,7 @@
#define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
"bootcmd_qspi=sf probe 0 0 0 && " \
- "sf read $scriptaddr $script_offset_f $script_size_f && " \
+ "sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
"source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0"
#define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \
@@ -168,7 +168,7 @@
#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \
"bootcmd_nand=nand info && " \
- "nand read $scriptaddr $script_offset_f $script_size_f && " \
+ "nand read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
"source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0"
#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 5/5] ARM: zynq: Remove all Xilinx private commands
2019-09-11 11:28 [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
` (3 preceding siblings ...)
2019-09-11 11:28 ` [U-Boot] [PATCH 4/5] ARM: zynq: Use {} around variables for qspi and nand boot cmds Michal Simek
@ 2019-09-11 11:28 ` Michal Simek
2019-10-08 7:47 ` [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
5 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2019-09-11 11:28 UTC (permalink / raw)
To: u-boot
All platforms have been moved to distro boot that's why remove the rest of
configurations to have unified boot flow.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
include/configs/zynq-common.h | 54 ++---------------------------------
1 file changed, 3 insertions(+), 51 deletions(-)
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 4b12be30c8aa..b6c9f2c8dd5b 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -152,12 +152,6 @@
# define BOOT_TARGET_DEVICES_NOR(func)
#endif
-#define BOOTENV_DEV_XILINX(devtypeu, devtypel, instance) \
- "bootcmd_xilinx=run $modeboot\0"
-
-#define BOOTENV_DEV_NAME_XILINX(devtypeu, devtypel, instance) \
- "xilinx "
-
#define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \
"bootcmd_qspi=sf probe 0 0 0 && " \
"sf read ${scriptaddr} ${script_offset_f} ${script_size_f} && " \
@@ -189,8 +183,7 @@
BOOT_TARGET_DEVICES_NOR(func) \
BOOT_TARGET_DEVICES_USB(func) \
BOOT_TARGET_DEVICES_PXE(func) \
- BOOT_TARGET_DEVICES_DHCP(func) \
- func(XILINX, xilinx, na)
+ BOOT_TARGET_DEVICES_DHCP(func)
#include <config_distro_bootcmd.h>
#endif /* CONFIG_SPL_BUILD */
@@ -198,59 +191,18 @@
/* Default environment */
#ifndef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
- "fit_image=fit.itb\0" \
- "load_addr=0x2000000\0" \
- "fit_size=0x800000\0" \
- "flash_off=0x100000\0" \
- "nor_flash_off=0xE2100000\0" \
"fdt_high=0x20000000\0" \
"initrd_high=0x20000000\0" \
"scriptaddr=0x20000\0" \
"script_offset_f=0xFC0000\0" \
"script_size_f=0x40000\0" \
- "loadbootenv_addr=0x2000000\0" \
"fdt_addr_r=0x1f00000\0" \
"pxefile_addr_r=0x2000000\0" \
"kernel_addr_r=0x2000000\0" \
"scriptaddr=0x3000000\0" \
"ramdisk_addr_r=0x3100000\0" \
- "bootenv=uEnv.txt\0" \
- "bootenv_dev=mmc\0" \
- "loadbootenv=load ${bootenv_dev} 0 ${loadbootenv_addr} ${bootenv}\0" \
- "importbootenv=echo Importing environment from ${bootenv_dev} ...; " \
- "env import -t ${loadbootenv_addr} $filesize\0" \
- "bootenv_existence_test=test -e ${bootenv_dev} 0 /${bootenv}\0" \
- "setbootenv=if env run bootenv_existence_test; then " \
- "if env run loadbootenv; then " \
- "env run importbootenv; " \
- "fi; " \
- "fi; \0" \
- "sd_loadbootenv=setenv bootenv_dev mmc && " \
- "run setbootenv \0" \
- "usb_loadbootenv=setenv bootenv_dev usb && usb start && run setbootenv \0" \
- "preboot=if test $modeboot = sdboot; then " \
- "run sd_loadbootenv; " \
- "echo Checking if uenvcmd is set ...; " \
- "if test -n $uenvcmd; then " \
- "echo Running uenvcmd ...; " \
- "run uenvcmd; " \
- "fi; " \
- "fi; \0" \
- "norboot=echo Copying FIT from NOR flash to RAM... && " \
- "cp.b ${nor_flash_off} ${load_addr} ${fit_size} && " \
- "bootm ${load_addr}\0" \
- "sdboot=echo Copying FIT from SD to RAM... && " \
- "load mmc 0 ${load_addr} ${fit_image} && " \
- "bootm ${load_addr}\0" \
- "jtagboot=echo TFTPing FIT to RAM... && " \
- "tftpboot ${load_addr} ${fit_image} && " \
- "bootm ${load_addr}\0" \
- "usbboot=if usb start; then " \
- "echo Copying FIT from USB to RAM... && " \
- "load usb 0 ${load_addr} ${fit_image} && " \
- "bootm ${load_addr}; fi\0" \
- DFU_ALT_INFO \
- BOOTENV
+ DFU_ALT_INFO \
+ BOOTENV
#endif
/* Miscellaneous configurable options */
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup
2019-09-11 11:28 [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
` (4 preceding siblings ...)
2019-09-11 11:28 ` [U-Boot] [PATCH 5/5] ARM: zynq: Remove all Xilinx private commands Michal Simek
@ 2019-10-08 7:47 ` Michal Simek
5 siblings, 0 replies; 7+ messages in thread
From: Michal Simek @ 2019-10-08 7:47 UTC (permalink / raw)
To: u-boot
st 11. 9. 2019 v 13:28 odesÃlatel Michal Simek <michal.simek@xilinx.com> napsal:
>
> Hi,
>
> for quite a long time Xilinx was using private boot method. Pretty long time
> ago we have enabled distribution boot method and provided time to do
> transition to it. Right now it is good time to remove old methods and move
> to distro boot fully.
> It is also the part of unification between Xilinx Zynq/ZynqMP and Versal
> SoCs to use the same boot methods.
> This series convert Zynq.
>
> Variable modeboot is still setup because Topic boards and Syzygy are using it.
>
> Thanks,
> Michal
>
>
> Michal Simek (5):
> ARM: zynq: Specify MMC controller number for boot sequence
> ARM: zynq: Enable USB1 as secondary boot device
> ARM: zynq: Fix NOR boot mode
> ARM: zynq: Use {} around variables for qspi and nand boot cmds
> ARM: zynq: Remove all Xilinx private commands
>
> board/xilinx/zynq/board.c | 2 +-
> include/configs/zynq-common.h | 66 +++++------------------------------
> 2 files changed, 10 insertions(+), 58 deletions(-)
>
> --
> 2.17.1
>
Applied all.
M
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-10-08 7:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-11 11:28 [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 1/5] ARM: zynq: Specify MMC controller number for boot sequence Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 2/5] ARM: zynq: Enable USB1 as secondary boot device Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 3/5] ARM: zynq: Fix NOR boot mode Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 4/5] ARM: zynq: Use {} around variables for qspi and nand boot cmds Michal Simek
2019-09-11 11:28 ` [U-Boot] [PATCH 5/5] ARM: zynq: Remove all Xilinx private commands Michal Simek
2019-10-08 7:47 ` [U-Boot] [PATCH 0/5] ARM: zynq: Boot variables cleanup Michal Simek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox