diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig index d755d2dbe..a99e0df2c 100644 --- a/boot/zephyr/Kconfig +++ b/boot/zephyr/Kconfig @@ -1232,11 +1232,6 @@ config BOOT_WATCHDOG_FEED_NRFX_WDT depends on SOC_FAMILY_NORDIC_NRF # for nRF nrfx based implementation is available imply NRFX_WDT - imply NRFX_WDT0 - imply NRFX_WDT1 - imply NRFX_WDT30 - imply NRFX_WDT31 - imply NRFX_WDT010 config BOOT_IMAGE_ACCESS_HOOKS bool "Enable hooks for overriding MCUboot's native routines" diff --git a/boot/zephyr/include/mcuboot_config/mcuboot_config.h b/boot/zephyr/include/mcuboot_config/mcuboot_config.h index 64666c3f4..f67eea7a1 100644 --- a/boot/zephyr/include/mcuboot_config/mcuboot_config.h +++ b/boot/zephyr/include/mcuboot_config/mcuboot_config.h @@ -463,39 +463,38 @@ #if CONFIG_BOOT_WATCHDOG_FEED_NRFX_WDT #include -#define FEED_WDT_INST(id) \ +#define FEED_WDT_INST(inst) \ do { \ - nrfx_wdt_t wdt_inst_##id = NRFX_WDT_INSTANCE(id); \ for (uint8_t i = 0; i < NRF_WDT_CHANNEL_NUMBER; i++) \ { \ - nrf_wdt_reload_request_set(wdt_inst_##id.p_reg, \ + nrf_wdt_reload_request_set(inst, \ (nrf_wdt_rr_register_t)(NRF_WDT_RR0 + i)); \ } \ } while (0) -#if defined(CONFIG_NRFX_WDT0) && defined(CONFIG_NRFX_WDT1) -#define MCUBOOT_WATCHDOG_FEED() \ - do { \ - FEED_WDT_INST(0); \ - FEED_WDT_INST(1); \ +#if defined(NRF_WDT0) && defined(NRF_WDT1) +#define MCUBOOT_WATCHDOG_FEED() \ + do { \ + FEED_WDT_INST(NRF_WDT0); \ + FEED_WDT_INST(NRF_WDT1); \ } while (0) -#elif defined(CONFIG_NRFX_WDT0) -#define MCUBOOT_WATCHDOG_FEED() \ - FEED_WDT_INST(0); -#elif defined(CONFIG_NRFX_WDT30) && defined(CONFIG_NRFX_WDT31) +#elif defined(NRF_WDT0) #define MCUBOOT_WATCHDOG_FEED() \ - do { \ - FEED_WDT_INST(30); \ - FEED_WDT_INST(31); \ + FEED_WDT_INST(NRF_WDT0); +#elif defined(NRF_WDT30) && defined(NRF_WDT31) +#define MCUBOOT_WATCHDOG_FEED() \ + do { \ + FEED_WDT_INST(NRF_WDT30); \ + FEED_WDT_INST(NRF_WDT31); \ } while (0) -#elif defined(CONFIG_NRFX_WDT30) +#elif defined(NRF_WDT30) #define MCUBOOT_WATCHDOG_FEED() \ - FEED_WDT_INST(30); -#elif defined(CONFIG_NRFX_WDT31) + FEED_WDT_INST(NRF_WDT30); +#elif defined(NRF_WDT31) #define MCUBOOT_WATCHDOG_FEED() \ - FEED_WDT_INST(31); -#elif defined(CONFIG_NRFX_WDT010) + FEED_WDT_INST(NRF_WDT31); +#elif defined(NRF_WDT010) #define MCUBOOT_WATCHDOG_FEED() \ - FEED_WDT_INST(010); + FEED_WDT_INST(NRF_WDT010); #else #error "No NRFX WDT instances enabled" #endif diff --git a/ext/nrf/cc310_glue.h b/ext/nrf/cc310_glue.h index 22eb94911..a6bed188e 100644 --- a/ext/nrf/cc310_glue.h +++ b/ext/nrf/cc310_glue.h @@ -18,7 +18,7 @@ #ifndef NRF_CC310_GLUE_H__ #define NRF_CC310_GLUE_H__ -#include +#include #include #include #include