ARM: zynq: Add jtag distro boot support
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>
Thu, 14 Nov 2019 04:13:44 +0000 (21:13 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 14 Jan 2020 08:05:54 +0000 (09:05 +0100)
This patch adds new jtag distro boot command to look for bootscript
file in DDR and execute it first incase of jtag bootmode.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
board/xilinx/zynq/board.c
include/configs/zynq-common.h

index 390d9482a70cfc0b80c47f94135f9bc46f83312c..420a5ca663111a04099e093e8483e3f93417e9da 100644 (file)
@@ -50,7 +50,7 @@ int board_late_init(void)
                env_set("modeboot", "sdboot");
                break;
        case ZYNQ_BM_JTAG:
-               mode = "pxe dhcp";
+               mode = "jtag pxe dhcp";
                env_set("modeboot", "jtagboot");
                break;
        default:
index 22486c0e4cfdcb9368fa384e8d2c7af82202bdad..2d53237df4330bb50eb75e1e77b7a845aa716b29 100644 (file)
 #define BOOTENV_DEV_NAME_NOR(devtypeu, devtypel, instance) \
        "nor "
 
+#define BOOT_TARGET_DEVICES_JTAG(func)  func(JTAG, jtag, na)
+
+#define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \
+       "bootcmd_jtag=source $scriptaddr; echo SCRIPT FAILED: continuing...;\0"
+
+#define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \
+       "jtag "
+
 #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) \