In warm reset, the value of CTRLMMR_MCU_RST_SRC was not being reset.

This leads to a reset-loop boot failure when a warm reset is triggered
from the MAIN domain (by writing 0x2006 to MCU_RST_CTRL).

Signed-off-by: Anshul Dalal <[email protected]>
---
Changes in v2:
- Fix commit message where the issue was observed on a 'warm reset' and not a 
'cold boot'
- Link to v1: 
https://patch.msgid.link/[email protected]
---
 arch/arm/mach-k3/am64x/am642_init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-k3/am64x/am642_init.c 
b/arch/arm/mach-k3/am64x/am642_init.c
index a15adf1cb1e7..a177c2658d49 100644
--- a/arch/arm/mach-k3/am64x/am642_init.c
+++ b/arch/arm/mach-k3/am64x/am642_init.c
@@ -255,6 +255,8 @@ void board_init_f(ulong dummy)
        if (rst_src == COLD_BOOT || rst_src & (SW_POR_MCU | SW_POR_MAIN)) {
                printf("Resetting on cold boot to workaround ErrataID:i2331\n");
                printf("Please resend tiboot3.bin in case of UART/DFU boot\n");
+               /* clear MCU_RST_SRC register before reset */
+               writel(0xFFFFFFFF, CTRLMMR_MCU_RST_SRC);
                do_reset(NULL, 0, 0, NULL);
        }
 #endif

---
base-commit: e800cc67f5b6cb50a20f37c993ec1cd4063bdbd3
change-id: 20260702-am64x_sw_rst_fix-eb5436122780

Best regards,
--  
Anshul Dalal <[email protected]>

Reply via email to