memory: ti-gpmc: Fix lock up at A53 SPL during NAND boot on AM64-EVM
PATCH 1/1 memory: ti-gpmc: Fix lock up at A53 SPL during NAND boot on AM64-EVM
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.
--- drivers/memory/ti-gpmc.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/memory/ti-gpmc.c +6 -0
@@ -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
Signature · 1 line
2.34.1
Quoted 11 lines · 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 <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom