diff options
author | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2019-01-25 17:06:05 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2019-02-14 14:31:09 +0100 |
commit | 90e97ab31e0208a3f8483872df212a1af8070897 (patch) | |
tree | 0cd949e0a901842bd55b55d9dfe542e00c512abe /include/configs/zynq-common.h | |
parent | f3976cc61f91a7921e1a4d956695a76428b116e4 (diff) | |
download | u-boot-90e97ab31e0208a3f8483872df212a1af8070897.tar.gz u-boot-90e97ab31e0208a3f8483872df212a1af8070897.tar.bz2 u-boot-90e97ab31e0208a3f8483872df212a1af8070897.zip |
arm: zynq: Define distro boot commnads for qspi, nand and nor
This patch adds distro boot commands for qspi, nand and nor.
The distro boot commands now reads the script from flash offset
of 15.75MB and executes it.
Setup default location via script_offset_f to 15.75MB to match the most
xilinx reference boards for qspi, nand and set the same using
script_offset_nor to 0xE2EC0000 for nor.
256kB allocated space for script size (script_size_f) should be more
than enough to cover custom boot logic.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'include/configs/zynq-common.h')
-rw-r--r-- | include/configs/zynq-common.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h index 6193d67268..3d6dbf6ea8 100644 --- a/include/configs/zynq-common.h +++ b/include/configs/zynq-common.h @@ -153,14 +153,58 @@ #define BOOT_TARGET_DEVICES_DHCP(func) #endif +#if defined(CONFIG_ZYNQ_QSPI) +# define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na) +#else +# define BOOT_TARGET_DEVICES_QSPI(func) +#endif + +#if defined(CONFIG_NAND_ZYNQ) +# define BOOT_TARGET_DEVICES_NAND(func) func(NAND, nand, na) +#else +# define BOOT_TARGET_DEVICES_NAND(func) +#endif + +#if defined(CONFIG_MTD_NOR_FLASH) +# define BOOT_TARGET_DEVICES_NOR(func) func(NOR, nor, na) +#else +# 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 && " \ + "source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \ + "qspi " + +#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \ + "bootcmd_nand=nand info && " \ + "nand read $scriptaddr $script_offset_f $script_size_f && " \ + "source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance) \ + "nand " + +#define BOOTENV_DEV_NOR(devtypeu, devtypel, instance) \ + "bootcmd_nor=cp.b $scropt_offset_nor $scriptaddr $script_size_f && " \ + "source ${scriptaddr}; echo SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \ + "nor " + #define BOOT_TARGET_DEVICES(func) \ BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_QSPI(func) \ + BOOT_TARGET_DEVICES_NAND(func) \ + BOOT_TARGET_DEVICES_NOR(func) \ BOOT_TARGET_DEVICES_USB(func) \ BOOT_TARGET_DEVICES_PXE(func) \ BOOT_TARGET_DEVICES_DHCP(func) \ @@ -179,6 +223,10 @@ "nor_flash_off=0xE2100000\0" \ "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" \ "fdt_addr_r=0x1f00000\0" \ "pxefile_addr_r=0x2000000\0" \ |