summaryrefslogtreecommitdiff
path: root/include/configs/xilinx_zynqmp.h
diff options
context:
space:
mode:
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>2021-03-25 08:37:57 +0300
committerMichal Simek <michal.simek@xilinx.com>2021-04-23 09:45:55 +0300
commitef1be3e3647e2c48610bfea5049d5e2b5c9bb813 (patch)
tree02c1ae6faac0756af1eba8827751231fa8dec93f /include/configs/xilinx_zynqmp.h
parent74fe3f2ef3d66d1eaf4564467c9a34bfe3561d30 (diff)
downloadu-boot-ef1be3e3647e2c48610bfea5049d5e2b5c9bb813.tar.xz
xilinx: zynqmp: Add usb dfu/thor distro boot support
In usb boot mode distro boot should select usb device as primary boot device instead of usb host. So make usb dfu as primary boot device. But do not list it in boot_targets as fallback option because it is not classic mode for booting. Using 60s timeout by default should be enough time for dfu-utils to start transaction. In case none needs this please change timeout value in the command or disable CONFIG_DFU_TIMEOUT. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'include/configs/xilinx_zynqmp.h')
-rw-r--r--include/configs/xilinx_zynqmp.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 15ad4198a6..87704ff630 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -179,11 +179,41 @@
#define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \
"jtag "
+#define BOOT_TARGET_DEVICES_USB_DFU(func) \
+ func(USB_DFU, usb_dfu, 0) func(USB_DFU, usb_dfu, 1)
+
+#define BOOTENV_DEV_USB_DFU(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=setenv dfu_alt_info boot.scr ram " \
+ "$scriptaddr $script_size_f && " \
+ "dfu " #instance " ram " #instance " 60 && " \
+ "echo DFU" #instance ": Trying to boot script at ${scriptaddr} && " \
+ "source ${scriptaddr}; " \
+ "echo DFU" #instance ": SCRIPT FAILED: continuing...;\0"
+
+#define BOOTENV_DEV_NAME_USB_DFU(devtypeu, devtypel, instance) \
+ ""
+
+#define BOOT_TARGET_DEVICES_USB_THOR(func) \
+ func(USB_THOR, usb_thor, 0) func(USB_THOR, usb_thor, 1)
+
+#define BOOTENV_DEV_USB_THOR(devtypeu, devtypel, instance) \
+ "bootcmd_" #devtypel #instance "=setenv dfu_alt_info boot.scr ram " \
+ "$scriptaddr $script_size_f && " \
+ "thordown " #instance " ram " #instance " && " \
+ "echo THOR" #instance ": Trying to boot script at ${scriptaddr} && " \
+ "source ${scriptaddr}; " \
+ "echo THOR" #instance ": SCRIPT FAILED: continuing...;\0"
+
+#define BOOTENV_DEV_NAME_USB_THOR(devtypeu, devtypel, instance) \
+ ""
+
#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_DEVICES_JTAG(func) \
BOOT_TARGET_DEVICES_MMC(func) \
BOOT_TARGET_DEVICES_QSPI(func) \
BOOT_TARGET_DEVICES_NAND(func) \
+ BOOT_TARGET_DEVICES_USB_DFU(func) \
+ BOOT_TARGET_DEVICES_USB_THOR(func) \
BOOT_TARGET_DEVICES_USB(func) \
BOOT_TARGET_DEVICES_SCSI(func) \
BOOT_TARGET_DEVICES_PXE(func) \