From 1613b5aadea2f67e46d8a3a0bfc6d098bd34b6ed Mon Sep 17 00:00:00 2001 From: Adib Taraben Date: Sun, 27 Apr 2025 21:10:09 +0200 Subject: [PATCH] driver: hwinfo: nxp_rcm correct implementation of get_supported_reset_cause The function should return all possible combinations for reset cause. Signed-off-by: Adib Taraben --- drivers/hwinfo/hwinfo_mcux_rcm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/hwinfo/hwinfo_mcux_rcm.c b/drivers/hwinfo/hwinfo_mcux_rcm.c index e7dfcd6c338..ed8122ac73b 100644 --- a/drivers/hwinfo/hwinfo_mcux_rcm.c +++ b/drivers/hwinfo/hwinfo_mcux_rcm.c @@ -120,12 +120,9 @@ int z_impl_hwinfo_clear_reset_cause(void) #if (defined(FSL_FEATURE_RCM_HAS_PARAM) && FSL_FEATURE_RCM_HAS_PARAM) int z_impl_hwinfo_get_supported_reset_cause(uint32_t *supported) { - uint32_t sources; + *supported = hwinfo_mcux_rcm_xlate_reset_sources(UINT32_MAX); - sources = RCM_GetResetSourceImplementedStatus(RCM); - *supported = hwinfo_mcux_rcm_xlate_reset_sources(sources); - - LOG_DBG("sources = 0x%08x, supported = 0x%08x", sources, *supported); + LOG_DBG("supported = 0x%08x", *supported); return 0; }