From 2f952f308fddde7c91b92415b78fe58980e35fd5 Mon Sep 17 00:00:00 2001 From: zhangwenxu Date: Mon, 20 Mar 2023 12:07:03 +0800 Subject: [PATCH] coex: fix unused macro on esp32h2 --- components/esp_coex/esp32c6/esp_coex_adapter.c | 1 - components/esp_coex/esp32h2/esp_coex_adapter.c | 9 --------- components/esp_coex/include/esp_coexist_adapter.h | 3 +++ components/esp_coex/lib | 2 +- components/soc/esp32h2/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32h2/include/soc/soc_caps.h | 4 ---- components/soc/esp32h4/include/soc/Kconfig.soc_caps.in | 4 ---- components/soc/esp32h4/include/soc/soc_caps.h | 3 --- 8 files changed, 4 insertions(+), 26 deletions(-) diff --git a/components/esp_coex/esp32c6/esp_coex_adapter.c b/components/esp_coex/esp32c6/esp_coex_adapter.c index 51417fc912..e792c0ebad 100644 --- a/components/esp_coex/esp32c6/esp_coex_adapter.c +++ b/components/esp_coex/esp32c6/esp_coex_adapter.c @@ -156,7 +156,6 @@ coex_adapter_funcs_t g_coex_adapter_funcs = { ._free = free, ._esp_timer_get_time = esp_timer_get_time, ._env_is_chip = esp_coex_common_env_is_chip_wrapper, - ._slowclk_cal_get = esp_coex_common_clk_slowclk_cal_get_wrapper, ._timer_disarm = esp_coex_common_timer_disarm_wrapper, ._timer_done = esp_coex_common_timer_done_wrapper, ._timer_setfn = esp_coex_common_timer_setfn_wrapper, diff --git a/components/esp_coex/esp32h2/esp_coex_adapter.c b/components/esp_coex/esp32h2/esp_coex_adapter.c index 51417fc912..630d4745ad 100644 --- a/components/esp_coex/esp32h2/esp_coex_adapter.c +++ b/components/esp_coex/esp32h2/esp_coex_adapter.c @@ -117,14 +117,6 @@ void IRAM_ATTR esp_coex_common_timer_arm_us_wrapper(void *ptimer, uint32_t us, b ets_timer_arm_us(ptimer, us, repeat); } -uint32_t esp_coex_common_clk_slowclk_cal_get_wrapper(void) -{ - /* The bit width of WiFi light sleep clock calibration is 12 while the one of - * system is 19. It should shift 19 - 12 = 7. - */ - return (esp_clk_slowclk_cal_get() >> (RTC_CLK_CAL_FRACT - SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH)); -} - void *IRAM_ATTR esp_coex_common_malloc_internal_wrapper(size_t size) { return heap_caps_malloc(size, MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL); @@ -156,7 +148,6 @@ coex_adapter_funcs_t g_coex_adapter_funcs = { ._free = free, ._esp_timer_get_time = esp_timer_get_time, ._env_is_chip = esp_coex_common_env_is_chip_wrapper, - ._slowclk_cal_get = esp_coex_common_clk_slowclk_cal_get_wrapper, ._timer_disarm = esp_coex_common_timer_disarm_wrapper, ._timer_done = esp_coex_common_timer_done_wrapper, ._timer_setfn = esp_coex_common_timer_setfn_wrapper, diff --git a/components/esp_coex/include/esp_coexist_adapter.h b/components/esp_coex/include/esp_coexist_adapter.h index 11bf54d9b5..fde83d1111 100644 --- a/components/esp_coex/include/esp_coexist_adapter.h +++ b/components/esp_coex/include/esp_coexist_adapter.h @@ -38,7 +38,10 @@ typedef struct { void (* _free)(void *p); int64_t (* _esp_timer_get_time)(void); bool (* _env_is_chip)(void); +#if CONFIG_IDF_TARGET_ESP32C2 + // this function is only used on esp32c2 uint32_t (* _slowclk_cal_get)(void); +#endif void (* _timer_disarm)(void *timer); void (* _timer_done)(void *ptimer); void (* _timer_setfn)(void *ptimer, void *pfunction, void *parg); diff --git a/components/esp_coex/lib b/components/esp_coex/lib index 67ba5893b0..125056ce87 160000 --- a/components/esp_coex/lib +++ b/components/esp_coex/lib @@ -1 +1 @@ -Subproject commit 67ba5893b088d02a9902e1af275102c8f9dbed24 +Subproject commit 125056ce875d4c0898c5cbe51b6ee12537000924 diff --git a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in index 1daccc3f54..c838f7934f 100644 --- a/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h2/include/soc/Kconfig.soc_caps.in @@ -1031,10 +1031,6 @@ config SOC_PHY_DIG_REGS_MEM_SIZE int default 21 -config SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH - int - default 12 - config SOC_PM_SUPPORT_WIFI_WAKEUP bool default y diff --git a/components/soc/esp32h2/include/soc/soc_caps.h b/components/soc/esp32h2/include/soc/soc_caps.h index 83d9b780be..ac9d8e53a4 100644 --- a/components/soc/esp32h2/include/soc/soc_caps.h +++ b/components/soc/esp32h2/include/soc/soc_caps.h @@ -442,10 +442,6 @@ /*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/ #define SOC_PHY_DIG_REGS_MEM_SIZE (21*4) -// TODO: IDF-5679 (Copy from esp32c6, need check) -/*--------------- WIFI LIGHT SLEEP CLOCK WIDTH CAPS --------------------------*/ -#define SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH (12) - // TODO: IDF-6270 (Copy from esp32c6, need check) /*-------------------------- Power Management CAPS ----------------------------*/ #define SOC_PM_SUPPORT_WIFI_WAKEUP (1) diff --git a/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in b/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in index 6ce37dc557..1efb5ef96d 100644 --- a/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32h4/include/soc/Kconfig.soc_caps.in @@ -231,10 +231,6 @@ config SOC_APB_BACKUP_DMA bool default y -config SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH - int - default 12 - config SOC_BROWNOUT_RESET_SUPPORTED bool default y diff --git a/components/soc/esp32h4/include/soc/soc_caps.h b/components/soc/esp32h4/include/soc/soc_caps.h index 92eed24500..759114e918 100644 --- a/components/soc/esp32h4/include/soc/soc_caps.h +++ b/components/soc/esp32h4/include/soc/soc_caps.h @@ -110,9 +110,6 @@ /*-------------------------- APB BACKUP DMA CAPS -------------------------------*/ #define SOC_APB_BACKUP_DMA (1) -/*--------------- WIFI LIGHT SLEEP CLOCK WIDTH CAPS --------------------------*/ -#define SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH (12) - /*-------------------------- BROWNOUT CAPS -----------------------------------*/ #define SOC_BROWNOUT_RESET_SUPPORTED 1