[RFC PATCH 05/19] ram: k3-ddrss: Add functionality to identify resume
Prasanth Babu Mantena
p-mantena at ti.com
Fri Mar 13 14:58:46 CET 2026
While returning back from suspend, this is the way the driver
knows that it is not a normal boot but a lpm resume sequence.
In this case, it doesn't need to perform the bootup activities.
Add a weak function board_is_resuming(void), which notifies the type
of flow, whether a normal boot or lpm resume flow.
Individual devices need to override this function and implement
the mechanism to identify the lpm resume flow.
Signed-off-by: Prasanth Babu Mantena <p-mantena at ti.com>
---
arch/arm/mach-k3/include/mach/k3-ddr.h | 2 ++
drivers/ram/k3-ddrss/k3-ddrss.c | 10 +++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-k3/include/mach/k3-ddr.h b/arch/arm/mach-k3/include/mach/k3-ddr.h
index 5dd4025bdbb..76fbf254829 100644
--- a/arch/arm/mach-k3/include/mach/k3-ddr.h
+++ b/arch/arm/mach-k3/include/mach/k3-ddr.h
@@ -35,6 +35,8 @@ int dram_init_banksize(void);
void fixup_ddr_driver_for_ecc(struct spl_image_info *spl_image);
void fixup_memory_node(struct spl_image_info *spl_image);
+int board_is_resuming(void);
+
/* LPDDR4 power management functions */
void k3_ddrss_lpddr4_exit_retention(struct udevice *dev, struct k3_ddrss_regs *regs);
void k3_ddrss_lpddr4_change_freq(struct udevice *dev);
diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
index 140bd7678bb..276bb5c8e4f 100644
--- a/drivers/ram/k3-ddrss/k3-ddrss.c
+++ b/drivers/ram/k3-ddrss/k3-ddrss.c
@@ -442,6 +442,11 @@ static int k3_ddrss_ofdata_to_priv(struct udevice *dev)
#if defined(CONFIG_K3_J721E_DDRSS)
+int __weak board_is_resuming(void)
+{
+ return 0;
+}
+
void k3_ddrss_lpddr4_exit_retention(struct udevice *dev,
struct k3_ddrss_regs *regs)
{
@@ -1151,7 +1156,10 @@ static int k3_ddrss_probe(struct udevice *dev)
ret = k3_ddrss_init_freq(ddrss);
if (ret)
return ret;
-
+#if defined(CONFIG_K3_J721E_DDRSS)
+ if (board_is_resuming())
+ return 0;
+#endif
k3_lpddr4_start(ddrss);
if (IS_ENABLED(CONFIG_K3_INLINE_ECC)) {
--
2.34.1
More information about the U-Boot
mailing list