88#include <zephyr/drivers/hwinfo.h>
99#include <string.h>
1010#include <zephyr/sys/byteorder.h>
11- #if !defined(CONFIG_BOARD_QEMU_CORTEX_M0 )
11+ #if !defined(CONFIG_SOC_SERIES_NRF54HX ) && !defined( CONFIG_BOARD_QEMU_CORTEX_M0 )
1212#include <helpers/nrfx_reset_reason.h>
1313#endif
1414
@@ -63,7 +63,7 @@ ssize_t z_impl_hwinfo_get_device_id(uint8_t *buffer, size_t length)
6363 return length ;
6464}
6565
66- #if !defined(CONFIG_BOARD_QEMU_CORTEX_M0 )
66+ #if !defined(CONFIG_SOC_SERIES_NRF54HX ) && !defined( CONFIG_BOARD_QEMU_CORTEX_M0 )
6767int z_impl_hwinfo_get_reset_cause (uint32_t * cause )
6868{
6969 uint32_t flags = 0 ;
@@ -76,37 +76,16 @@ int z_impl_hwinfo_get_reset_cause(uint32_t *cause)
7676 if (reason & NRFX_RESET_REASON_DOG_MASK ) {
7777 flags |= RESET_WATCHDOG ;
7878 }
79-
80- #if defined(NRF_RESETINFO )
81- if (reason & NRFX_RESET_REASON_LOCAL_DOG0_MASK ) {
82- flags |= RESET_WATCHDOG ;
83- }
84- #endif
85-
86- #if defined(NRF_RESETINFO )
87- if ((reason & NRFX_RESET_REASON_LOCKUP )
88- || (reason & NRFX_RESET_REASON_LOCAL_LOCKUP_MASK ))
89- #else
90- if (reason & NRFX_RESET_REASON_LOCKUP_MASK )
91- #endif
92- {
79+ if (reason & NRFX_RESET_REASON_LOCKUP_MASK ) {
9380 flags |= RESET_CPU_LOCKUP ;
9481 }
95-
9682 if (reason & NRFX_RESET_REASON_OFF_MASK ) {
9783 flags |= RESET_LOW_POWER_WAKE ;
9884 }
9985 if (reason & NRFX_RESET_REASON_DIF_MASK ) {
10086 flags |= RESET_DEBUG ;
10187 }
102-
103- #if defined(NRF_RESETINFO )
104- if ((reason & NRFX_RESET_REASON_SREQ )
105- || (reason & NRFX_RESET_REASON_LOCAL_SREQ_MASK ))
106- #else
107- if (reason & NRFX_RESET_REASON_SREQ_MASK )
108- #endif
109- {
88+ if (reason & NRFX_RESET_REASON_SREQ_MASK ) {
11089 flags |= RESET_SOFTWARE ;
11190 }
11291
@@ -145,18 +124,11 @@ int z_impl_hwinfo_get_reset_cause(uint32_t *cause)
145124 flags |= RESET_DEBUG ;
146125 }
147126#endif
148-
149127#if !NRF_POWER_HAS_RESETREAS
150- #if defined(NRF_RESETINFO )
151- if (reason & NRFX_RESET_REASON_LOCAL_DOG1_MASK )
152- #else
153- if (reason & NRFX_RESET_REASON_DOG1_MASK )
154- #endif
155- {
128+ if (reason & NRFX_RESET_REASON_DOG1_MASK ) {
156129 flags |= RESET_WATCHDOG ;
157130 }
158- #endif /* !NRF_POWER_HAS_RESETREAS */
159-
131+ #endif
160132#if NRFX_RESET_REASON_HAS_GRTC
161133 if (reason & NRFX_RESET_REASON_GRTC_MASK ) {
162134 flags |= RESET_CLOCK ;
0 commit comments