public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] memory: ti-gpmc: Fix lock up at A53 SPL during NAND boot on AM64-EVM
@ 2024-02-06 14:02 Roger Quadros
  2024-02-13 22:33 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Roger Quadros @ 2024-02-06 14:02 UTC (permalink / raw)
  To: trini; +Cc: dario.binacchi, nm, praneeth, vigneshr, u-boot, Roger Quadros

AM64 ES2.0 bootrom seems to enable WAIT0EDGEDETECTION interrupt.
This causes a lockup at A53 SPL when accessing NAND controller
or ELM registers.

A good option would be to softrest GPMC block at probe
but this cannot be done for AM64 as SOFTRESET bit is marked
as reserved in SYSCONFIG register.

Fix the issue by disabling all IRQs at probe.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
---
 drivers/memory/ti-gpmc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/memory/ti-gpmc.c b/drivers/memory/ti-gpmc.c
index 0b8674339e..8877b8f438 100644
--- a/drivers/memory/ti-gpmc.c
+++ b/drivers/memory/ti-gpmc.c
@@ -1196,6 +1196,12 @@ static int gpmc_probe(struct udevice *dev)
 	gpmc_cfg = (struct gpmc *)priv->base;
 	gpmc_base = priv->base;
 
+	/*
+	 * Disable all IRQs as some bootroms might leave them enabled
+	 * and that will cause a lock-up later
+	 */
+	gpmc_write_reg(GPMC_IRQENABLE, 0);
+
 	priv->l3_clk = devm_clk_get(dev, "fck");
 	if (IS_ERR(priv->l3_clk))
 		return PTR_ERR(priv->l3_clk);

base-commit: 28760ce8640ff6266bd1c1c568a4a231576f3919
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-13 22:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 14:02 [PATCH] memory: ti-gpmc: Fix lock up at A53 SPL during NAND boot on AM64-EVM Roger Quadros
2024-02-13 22:33 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox