aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAshok Reddy Soma2023-06-14 03:30:58 -0600
committerMichal Simek2023-07-21 09:00:38 +0200
commit9a45365ae9cd80e0f060e480c544c17bb9a81e51 (patch)
tree310f52239a8e66b86d111cd385bc861e14754376 /include
parent340760ec0ffbe06c3dc1388ee605e031a11ff042 (diff)
arm64: versal-net: spi: Update boot sequence dynamically
Currently xspi0 is used for all spi boot modes, it means it will use "sf probe 0 0 0" for all spi's irrespective of which node it is wired. Get boot sequence from dev_seq() and update boot command for xspi dynamically. As a result bootcmd for spi is updated as below when two instances of spi are present in DT node. bootcmd_xspi0=devnum_xspi=0; run xspi_boot bootcmd_xspi1=devnum_xspi=1; run xspi_boot xspi_boot=sf probe $devnum_xspi:0 0 0 && sf read $scriptaddr $script_offset_f $script_size_f && echo XSPI: Trying to boot script at ${scriptaddr} && source ${scriptaddr}; echo XSPI: SCRIPT FAILED: continuing...; Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Link: https://lore.kernel.org/r/20230614093058.30438-1-ashok.reddy.soma@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/xilinx_versal_net.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/configs/xilinx_versal_net.h b/include/configs/xilinx_versal_net.h
index 424ead038e3..613cce46f90 100644
--- a/include/configs/xilinx_versal_net.h
+++ b/include/configs/xilinx_versal_net.h
@@ -76,20 +76,24 @@
# define BOOT_TARGET_DEVICES_DHCP(func)
#endif
-#if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL_NET)
-# define BOOT_TARGET_DEVICES_XSPI(func) func(XSPI, xspi, 0)
+#if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL)
+# define BOOT_TARGET_DEVICES_XSPI(func) func(XSPI, xspi, 0) func(XSPI, xspi, 1)
+# define BOOTENV_DEV_SHARED_XSPI \
+ "xspi_boot=sf probe $devnum_xspi:0 0 0 && " \
+ "sf read $scriptaddr $script_offset_f $script_size_f && " \
+ "echo XSPI: Trying to boot script at ${scriptaddr} && " \
+ "source ${scriptaddr}; echo XSPI: SCRIPT FAILED: continuing...;\0"
#else
# define BOOT_TARGET_DEVICES_XSPI(func)
+# define BOOTENV_DEV_SHARED_XSPI
#endif
#define BOOTENV_DEV_XSPI(devtypeu, devtypel, instance) \
- "bootcmd_xspi0=sf probe 0 0 0 && " \
- "sf read $scriptaddr $script_offset_f $script_size_f && " \
- "echo XSPI: Trying to boot script at ${scriptaddr} && " \
- "source ${scriptaddr}; echo XSPI: SCRIPT FAILED: continuing...;\0"
+ "bootcmd_" #devtypel #instance "=" \
+ "devnum_xspi=" #instance "; run " #devtypel "_boot\0" \
#define BOOTENV_DEV_NAME_XSPI(devtypeu, devtypel, instance) \
- "xspi0 "
+ ""
#define BOOT_TARGET_DEVICES_JTAG(func) func(JTAG, jtag, na)
@@ -127,6 +131,7 @@
#define CFG_EXTRA_ENV_SETTINGS \
ENV_MEM_LAYOUT_SETTINGS \
BOOTENV \
+ BOOTENV_DEV_SHARED_XSPI \
DFU_ALT_INFO
#endif