diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index 7bc03a57f5..44e1b2f57d 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -22,7 +22,7 @@ if(NOT BOOTLOADER_BUILD) # [refactor-todo]: requires "driver" for GPIO and RTC (by sleep_gpio and sleep_modes) list(APPEND priv_requires driver) - if(CONFIG_SOC_RTC_WDT_SUPPORTED) + if(CONFIG_IDF_TARGET_ESP32 OR CONFIG_IDF_TARGET_ESP32S2) list(APPEND srcs "rtc_wdt.c") endif() diff --git a/components/esp_hw_support/include/soc/rtc_wdt.h b/components/esp_hw_support/include/soc/rtc_wdt.h index efbfe32a84..29dd88520f 100644 --- a/components/esp_hw_support/include/soc/rtc_wdt.h +++ b/components/esp_hw_support/include/soc/rtc_wdt.h @@ -45,7 +45,7 @@ without description where were CPUs when it happened. #include "soc/rtc_periph.h" #include "esp_err.h" -#if SOC_RTC_WDT_SUPPORTED +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 #ifdef __cplusplus extern "C" @@ -191,4 +191,4 @@ bool rtc_wdt_is_on(void); } #endif -#endif // SOC_CAPS_RTC_WDT +#endif // CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 diff --git a/components/esp_hw_support/linker.lf b/components/esp_hw_support/linker.lf index 21c4cbb023..05c3fead8c 100644 --- a/components/esp_hw_support/linker.lf +++ b/components/esp_hw_support/linker.lf @@ -9,7 +9,7 @@ entries: rtc_pm (noflash_text) rtc_sleep (noflash_text) rtc_time (noflash_text) - if SOC_RTC_WDT_SUPPORTED = y: + if IDF_TARGET_ESP32 = y || IDF_TARGET_ESP32S2 = y: rtc_wdt (noflash_text) if IDF_TARGET_ESP32S3 = y: if SPIRAM_MODE_QUAD = y: diff --git a/components/esp_hw_support/rtc_wdt.c b/components/esp_hw_support/rtc_wdt.c index 9296770105..7ca9c5c358 100644 --- a/components/esp_hw_support/rtc_wdt.c +++ b/components/esp_hw_support/rtc_wdt.c @@ -9,7 +9,7 @@ #include "soc/rtc.h" #include "hal/efuse_ll.h" -#if SOC_RTC_WDT_SUPPORTED +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 bool rtc_wdt_get_protect_status(void) { @@ -147,4 +147,4 @@ bool rtc_wdt_is_on(void) return (REG_GET_BIT(RTC_CNTL_WDTCONFIG0_REG, RTC_CNTL_WDT_EN) != 0) || (REG_GET_BIT(RTC_CNTL_WDTCONFIG0_REG, RTC_CNTL_WDT_FLASHBOOT_MOD_EN) != 0); } -#endif // SOC_RTC_WDT_SUPPORTED +#endif // CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 diff --git a/components/soc/esp32/include/soc/Kconfig.soc_caps.in b/components/soc/esp32/include/soc/Kconfig.soc_caps.in index 5f068bb4dd..a2e570fb96 100644 --- a/components/soc/esp32/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32/include/soc/Kconfig.soc_caps.in @@ -83,10 +83,6 @@ config SOC_RTC_SLOW_MEM_SUPPORTED bool default y -config SOC_RTC_WDT_SUPPORTED - bool - default y - config SOC_I2S_SUPPORTED bool default y diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index d64071d4cd..fa58582e5e 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -80,7 +80,6 @@ #define SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS 1 #define SOC_RTC_FAST_MEM_SUPPORTED 1 #define SOC_RTC_SLOW_MEM_SUPPORTED 1 -#define SOC_RTC_WDT_SUPPORTED 1 #define SOC_I2S_SUPPORTED 1 #define SOC_RMT_SUPPORTED 1 #define SOC_SIGMADELTA_SUPPORTED 1 diff --git a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in index 18fe16d86f..94c1929055 100644 --- a/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s2/include/soc/Kconfig.soc_caps.in @@ -107,10 +107,6 @@ config SOC_RTC_SLOW_MEM_SUPPORTED bool default y -config SOC_RTC_WDT_SUPPORTED - bool - default y - config SOC_PSRAM_DMA_CAPABLE bool default y diff --git a/components/soc/esp32s2/include/soc/soc_caps.h b/components/soc/esp32s2/include/soc/soc_caps.h index f82c7bc6d5..9411514d28 100644 --- a/components/soc/esp32s2/include/soc/soc_caps.h +++ b/components/soc/esp32s2/include/soc/soc_caps.h @@ -65,7 +65,6 @@ #define SOC_FLASH_ENCRYPTION_XTS_AES_256 1 #define SOC_RTC_FAST_MEM_SUPPORTED 1 #define SOC_RTC_SLOW_MEM_SUPPORTED 1 -#define SOC_RTC_WDT_SUPPORTED 1 #define SOC_PSRAM_DMA_CAPABLE 1 #define SOC_XT_WDT_SUPPORTED 1 #define SOC_SUPPORT_SECURE_BOOT_REVOKE_KEY 1