aboutsummaryrefslogtreecommitdiff
path: root/include/configs/xilinx_versal.h
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2019-01-31 17:28:13 +0530
committerMichal Simek <michal.simek@xilinx.com>2019-02-14 14:31:10 +0100
commita318b9392952d305a1e7db6e2d5f5da0cd0d7648 (patch)
tree61c6c8dd91a2b8f0ead70cbc8c64181d20cbc4f3 /include/configs/xilinx_versal.h
parentfed6b06480bcda4ba10250d659030c9ef05580ee (diff)
downloadu-boot-a318b9392952d305a1e7db6e2d5f5da0cd0d7648.zip
u-boot-a318b9392952d305a1e7db6e2d5f5da0cd0d7648.tar.gz
u-boot-a318b9392952d305a1e7db6e2d5f5da0cd0d7648.tar.bz2
arm64: versal: Define distro boot commnads for qspi ospi and mmc
This patch adds distro boot commands for qspi, ospi and mmc. The distro boot commands now reads the script from flash offset of 63.5MB for qspi and ospi and executes it. For mmc its same as generic distro boot command. As either one of the qspi or ospi can exist on hardware, defined a single distroboot command as xspi that works for both. Setup default location via script_offset_f to 63.5MB to match the most xilinx reference boards for qspi, ospi for now. 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/xilinx_versal.h')
-rw-r--r--include/configs/xilinx_versal.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index bfe4c43..2cc36e7 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -73,9 +73,33 @@
"pxefile_addr_r=0x10000000\0" \
"kernel_addr_r=0x18000000\0" \
"scriptaddr=0x02000000\0" \
- "ramdisk_addr_r=0x02100000\0"
+ "ramdisk_addr_r=0x02100000\0" \
+ "script_offset_f=0x3f80000\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)
+#else
+# define BOOT_TARGET_DEVICES_MMC(func)
+#endif
+
+#if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL)
+# define BOOT_TARGET_DEVICES_XSPI(func) func(XSPI, xspi, 0)
+#else
+# define BOOT_TARGET_DEVICES_XSPI(func)
+#endif
+
+#define BOOTENV_DEV_XSPI(devtypeu, devtypel, instance) \
+ "bootcmd_xspi0=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_XSPI(devtypeu, devtypel, instance) \
+ "xspi "
#define BOOT_TARGET_DEVICES(func) \
+ BOOT_TARGET_DEVICES_MMC(func) \
+ BOOT_TARGET_DEVICES_XSPI(func) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)