diff options
author | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2019-01-24 11:32:04 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2019-02-14 14:31:09 +0100 |
commit | ad78d2641f03b08c7d7f18d5fe1c5acd19b828ec (patch) | |
tree | a22cb8dd0cd83562bf7d14dff1644c39b587322c /include/configs | |
parent | d13f92b7420a7383cefe33bb1ffc1ae56f0d2f1e (diff) |
arm64: zynqmp: Define distro boot commnads for qspi and nand
This patch adds distro boot commands for qspi and nand. The
distro boot commands now reads the script from flash offset
of 63.5MB and executes it.
Setup default location via script_offset_f to 63.5MB to match the most
xilinx reference boards. 512kB 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')
-rw-r--r-- | include/configs/xilinx_zynqmp.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index 7a9b06ec4c..d83c1100b8 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -134,6 +134,8 @@ "kernel_addr_r=0x18000000\0" \ "scriptaddr=0x02000000\0" \ "ramdisk_addr_r=0x02100000\0" \ + "script_offset_f=0x3e80000\0" \ + "script_size_f=0x80000\0" \ #if defined(CONFIG_MMC_SDHCI_ZYNQ) # define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) @@ -165,8 +167,38 @@ # define BOOT_TARGET_DEVICES_DHCP(func) #endif +#if defined(CONFIG_ZYNQMP_GQSPI) +# define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, 0) +#else +# define BOOT_TARGET_DEVICES_QSPI(func) +#endif + +#if defined(CONFIG_NAND_ARASAN) +# define BOOT_TARGET_DEVICES_NAND(func) func(NAND, nand, 0) +#else +# define BOOT_TARGET_DEVICES_NAND(func) +#endif + +#define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel #instance "=sf probe " #instance " 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) \ + #devtypel #instance " " + +#define BOOTENV_DEV_NAND(devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel #instance "= 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) \ + #devtypel #instance " " + #define BOOT_TARGET_DEVICES(func) \ BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_QSPI(func) \ + BOOT_TARGET_DEVICES_NAND(func) \ BOOT_TARGET_DEVICES_USB(func) \ BOOT_TARGET_DEVICES_SCSI(func) \ BOOT_TARGET_DEVICES_PXE(func) \ |