From: Markus Schneider-Pargmann <msp@baylibre.com>
To: "Kumar, Udit" <u-kumar1@ti.com>,
Richard GENOUD <richard.genoud@bootlin.com>,
Markus Schneider-Pargmann <msp@baylibre.com>
Cc: Tom Rini <trini@konsulko.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Daniel Schultz <d.schultz@phytec.de>,
Anshul Dalal <anshuld@ti.com>,
Aristo Chen <aristo.chen@canonical.com>,
u-boot@lists.u-boot-project.org
Subject: [PATCH 1/3] arm: mach-k3: common: add helper to wait for TIFS initialization
Date: Thu, 22 Oct 2026 12:15:56 +0200 [thread overview]
Message-ID: <20261022101558.2474326-1-msp@baylibre.com> (raw)
In-Reply-To: <51c23f5b-9ca2-4ebe-8f3e-72d22e404617@ti.com>
Add a helper to wait for TIFS initialization to be finished. Effectively
this is just a call to get_ti_sci_handle() but I think a separate
function makes the purpose of this call better visible.
get_ti_sci_handle() internally leads to fetching the TIFS version with a
message and response. TIFS only responds once initialization finished.
If a response is not received get_ti_sci_handle() returns after a
timeout.
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
---
arch/arm/mach-k3/common.c | 10 ++++++++++
arch/arm/mach-k3/common.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index 6e382efdb3be..480c90cfa65f 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3/common.c
@@ -54,6 +54,16 @@ struct ti_sci_handle *get_ti_sci_handle(void)
return (struct ti_sci_handle *)ti_sci_get_handle_from_sysfw(dev);
}
+void k3_sysfw_wait_ready(void)
+{
+ /*
+ * Wait for TIFS initialization to finish. This helper is used to make
+ * sure TIFS removed the firewall before U-Boot tries to unlock CTRL_MMR
+ * registers and continues the boot.
+ */
+ get_ti_sci_handle();
+}
+
void k3_sysfw_print_ver(void)
{
struct ti_sci_handle *ti_sci = get_ti_sci_handle();
diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
index 37ff98d89924..146b986febc6 100644
--- a/arch/arm/mach-k3/common.h
+++ b/arch/arm/mach-k3/common.h
@@ -38,6 +38,7 @@ void disable_linefill_optimization(void);
int remove_fwl_region(struct fwl_data *fwl);
void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size);
int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
+void k3_sysfw_wait_ready(void);
void k3_sysfw_print_ver(void);
void k3_dm_print_ver(void);
void spl_enable_cache(void);
--
2.56.0
next prev parent reply other threads:[~2026-10-22 10:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 9:05 [PATCH v2 0/5] K3: wait for TIFS init before CTRL_MMR unlock Markus Schneider-Pargmann
2026-10-16 9:05 ` [PATCH v2 1/5] arm: mach-k3: common: add helper to wait for TIFS initialization Markus Schneider-Pargmann
2026-10-17 2:44 ` Kumar, Udit
2026-10-16 9:05 ` [PATCH v2 2/5] arm: mach-k3: am625: Wait " Markus Schneider-Pargmann
2026-10-16 9:05 ` [PATCH v2 3/5] arm: mach-k3: am62a7: " Markus Schneider-Pargmann
2026-10-16 9:05 ` [PATCH v2 4/5] arm: mach-k3: am62p5: " Markus Schneider-Pargmann
2026-10-16 9:05 ` [PATCH v2 5/5] arm: mach-k3: j722s: " Markus Schneider-Pargmann
2026-10-17 2:40 ` Kumar, Udit
2026-10-19 12:16 ` Richard GENOUD
2026-10-19 13:34 ` Kumar, Udit
2026-10-22 10:15 ` Markus Schneider-Pargmann [this message]
2026-10-22 10:15 ` [PATCH 2/3] dm: core: Add SPL_DM_EVENT Markus Schneider-Pargmann
2026-10-22 10:15 ` [PATCH 3/3] WIP: arm: mach-k3: j722s: Wait for TIFS initialization Markus Schneider-Pargmann
2026-10-22 10:18 ` Markus Schneider-Pargmann
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=20261022101558.2474326-1-msp@baylibre.com \
--to=msp@baylibre.com \
--cc=anshuld@ti.com \
--cc=aristo.chen@canonical.com \
--cc=d.schultz@phytec.de \
--cc=ilias.apalodimas@linaro.org \
--cc=richard.genoud@bootlin.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=u-kumar1@ti.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.