summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-03-23 00:16:05 +0300
committerTom Rini <trini@konsulko.com>2022-04-01 23:56:44 +0300
commit93c3d329707e0d8dc98e5f86938bbedbe15b5349 (patch)
tree74fb19fa68429b864cbbd379c5feaacb499d98e9 /board
parenteeb54e81ca9226aa2a664af7d1e5bc2e44d790e3 (diff)
downloadu-boot-93c3d329707e0d8dc98e5f86938bbedbe15b5349.tar.xz
ls1046ardb: Add support for JTAG boot
This adds support for booting entirely from JTAG while using a hard-coded RCW. With these steps, it is not necessary to program a "good" RCW using CodeWarrior. The method here can be performed with any JTAG adapter supported by OpenOCD, including the on-board CMSIS-DAP (albeit very slowly). These steps require LS1046A support in OpenOCD, which was added in [1]. [1] https://sourceforge.net/p/openocd/code/ci/5b70c1f679755677c925b4e6dd2c3d8be4715717/ Signed-off-by: Sean Anderson <sean.anderson@seco.com> [trini: Add reference to doc/board/nxp/ls1046ardb.rst]
Diffstat (limited to 'board')
-rw-r--r--board/freescale/ls1046ardb/ls1046ardb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/freescale/ls1046ardb/ls1046ardb.c b/board/freescale/ls1046ardb/ls1046ardb.c
index d0abfe8869..9af7cf763b 100644
--- a/board/freescale/ls1046ardb/ls1046ardb.c
+++ b/board/freescale/ls1046ardb/ls1046ardb.c
@@ -7,6 +7,8 @@
#include <i2c.h>
#include <fdt_support.h>
#include <init.h>
+#include <semihosting.h>
+#include <serial.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/arch/clock.h>
@@ -27,6 +29,14 @@
DECLARE_GLOBAL_DATA_PTR;
+struct serial_device *default_serial_console(void)
+{
+#if IS_ENABLED(CONFIG_SEMIHOSTING_SERIAL)
+ return &serial_smh_device;
+#endif
+ return &eserial1_device;
+}
+
int board_early_init_f(void)
{
fsl_lsch2_early_init_f();