Hi Wadim

On 15/05/25 16:45, Wadim Egorov wrote:
> Although AM62x, AM62Ax, AM64x, and AM62Px share the same register for
> reset reason, not all TRMs document this consistently. To avoid relying
> on undocumented behavior, introduce SoC-specific implementations for
> now. If TI confirms all SoCs share the same register, this can be moved to
> common.c for reuse.

Just checked the J7200 documentation, and seems like we have the same
register (CTRLMMR_WKUP_RESET_SRC_STAT) however it looks like the
register bit description is different from what is patched here. So
looks like the code cannot be common.

> 
> It will be mostly copy&paste for the mentioned devices.
> 
> Also, I am not sure how this Register operates exactly. I noticed that
> two bits can be set at once, so I started to check for set bits instead
> of having a switch/case logic.
> 
> Wadim Egorov (2):
>   arm: mach-k3: Detect and print reset reason
>   arm: mach-k3: am62x: Implement get_reset_reason()
> 
>  arch/arm/mach-k3/am62x/boot.c                 | 40 +++++++++++++++++++
>  arch/arm/mach-k3/common.c                     | 10 +++++
>  arch/arm/mach-k3/include/mach/am62_hardware.h | 19 +++++++++
>  arch/arm/mach-k3/include/mach/hardware.h      |  1 +
>  4 files changed, 70 insertions(+)
> 

-- 
Thanking You
Neha Malcom Francis

Reply via email to