From: Andreas Dannenberg <dannenberg@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/7] arm: K3: sysfw-loader: Allow loading SYSFW via Y-Modem
Date: Thu, 15 Aug 2019 15:55:29 -0500 [thread overview]
Message-ID: <20190815205532.16545-5-dannenberg@ti.com> (raw)
In-Reply-To: <20190815205532.16545-1-dannenberg@ti.com>
In order to allow booting TI K3 family SoCs via Y-Modem add support for
loading System Firmware by tapping into the associated SPL core loader
function.
In this context also make sure a console is available and if not go
ahead and activate the early console feature which allows bringing up
an alternate full console before the main console is activated. Such
an alternate console is typically setup in a way that the associated
UART can be fully initialized prior to SYSFW services being available.
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
---
arch/arm/mach-k3/sysfw-loader.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c
index 7a482bdc8a..5903bbe12a 100644
--- a/arch/arm/mach-k3/sysfw-loader.c
+++ b/arch/arm/mach-k3/sysfw-loader.c
@@ -12,6 +12,9 @@
#include <remoteproc.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <asm/arch/sys_proto.h>
+#include "common.h"
+
+DECLARE_GLOBAL_DATA_PTR;
/* Name of the FIT image nodes for SYSFW and its config data */
#define SYSFW_FIRMWARE "sysfw.bin"
@@ -214,6 +217,24 @@ void k3_sysfw_loader(void (*config_pm_done_callback)(void))
0);
#endif
break;
+#endif
+#if CONFIG_IS_ENABLED(YMODEM_SUPPORT)
+ case BOOT_DEVICE_UART:
+#ifdef CONFIG_K3_EARLY_CONS
+ /*
+ * Establish a serial console if not yet available as required
+ * for UART-based boot. For this use the early console feature
+ * that allows setting up a UART for use before SYSFW has been
+ * brought up. Note that the associated UART module's clocks
+ * must have gotten enabled by the ROM bootcode which will be
+ * the case when continuing to boot serially from the same
+ * UART that the ROM loaded the initial bootloader from.
+ */
+ if (!gd->have_console)
+ early_console_init();
+#endif
+ ret = spl_ymodem_load_image(&spl_image, &bootdev);
+ break;
#endif
default:
panic("Loading SYSFW image from device %u not supported!\n",
--
2.17.1
next prev parent reply other threads:[~2019-08-15 20:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-15 20:55 [U-Boot] [PATCH 0/7] Implement UART-based boot of TI K3 AM65x SoCs Andreas Dannenberg
2019-08-15 20:55 ` [U-Boot] [PATCH 1/7] spl: ymodem: Fix FIT loading termination handling Andreas Dannenberg
2019-10-12 20:23 ` Tom Rini
2019-08-15 20:55 ` [U-Boot] [PATCH 2/7] spl: ymodem: Make SPL Y-Modem loader framework accessible Andreas Dannenberg
2019-10-12 20:23 ` Tom Rini
2019-08-15 20:55 ` [U-Boot] [PATCH 3/7] arm: K3: common: Allow for early console functionality Andreas Dannenberg
2019-10-12 20:23 ` Tom Rini
2019-08-15 20:55 ` Andreas Dannenberg [this message]
2019-10-12 20:23 ` [U-Boot] [PATCH 4/7] arm: K3: sysfw-loader: Allow loading SYSFW via Y-Modem Tom Rini
2019-08-15 20:55 ` [U-Boot] [PATCH 5/7] armv7R: dts: k3: am654: Add MCU_UART0 related definitions Andreas Dannenberg
2019-10-12 20:24 ` Tom Rini
2019-08-15 20:55 ` [U-Boot] [PATCH 6/7] configs: am65x_evm_r5: Activate early console functionality Andreas Dannenberg
2019-10-12 20:24 ` Tom Rini
2019-08-15 20:55 ` [U-Boot] [PATCH 7/7] board: ti: am65x: Add UART boot procedure in README Andreas Dannenberg
2019-10-12 20:24 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190815205532.16545-5-dannenberg@ti.com \
--to=dannenberg@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox