[RFC PATCH 03/19] global: k3: use gd to store the resume state
Prasanth Babu Mantena
p-mantena at ti.com
Fri Mar 13 14:58:44 CET 2026
From: Richard Genoud <richard.genoud at bootlin.com>
As stated by the README, in board_init_f(), the BSS is not available, so
we cannot use global/static variables, only stack variables and
global_data.
Thus, we use gd to store the resume state of the board.
Signed-off-by: Richard Genoud <richard.genoud at bootlin.com>
Signed-off-by: Prasanth Babu Mantena <p-mantena at ti.com>
---
arch/arm/include/asm/global_data.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index b2ec450f900..3a4210fbfc6 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -108,8 +108,19 @@ struct arch_global_data {
#ifdef CONFIG_SMBIOS
ulong smbios_start; /* Start address of SMBIOS table */
#endif
+#if (IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_ARCH_K3))
+ int k3_resuming;
+#endif
};
+#if (IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_ARCH_K3))
+#define gd_k3_resuming() gd->arch.k3_resuming
+#define gd_set_k3_resuming(state) gd->arch.k3_resuming = (state)
+#else
+#define gd_k3_resuming() 0
+#define gd_set_k3_resuming(state)
+#endif
+
#include <asm-generic/global_data.h>
#if defined(__clang__) || defined(LTO_ENABLE)
--
2.34.1
More information about the U-Boot
mailing list