diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index d555c90e38..4867755f0a 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -106,6 +106,7 @@ /components/esp_https_server/ @esp-idf-codeowners/app-utilities /components/esp_hw_support/ @esp-idf-codeowners/system @esp-idf-codeowners/peripherals /components/esp_hw_support/lowpower/ @esp-idf-codeowners/power-management +/components/esp_hw_support/modem/ @esp-idf-codeowners/power-management /components/esp_hw_support/usb_phy/ @esp-idf-codeowners/peripherals/usb /components/esp_lcd/ @esp-idf-codeowners/peripherals /components/esp_libc/ @esp-idf-codeowners/system @esp-idf-codeowners/toolchain diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index dd2e94454f..3d205ec4b9 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -49,9 +49,6 @@ if(NOT non_os_build) if(CONFIG_SOC_PAU_SUPPORTED) list(APPEND srcs "sleep_retention.c") endif() - if(CONFIG_SOC_MODEM_SUPPORT_ETM) - list(APPEND srcs "modem/modem_etm.c") - endif() if(CONFIG_SOC_PMU_SUPPORTED) list(APPEND srcs "pmu_share_hw.c") endif() @@ -107,10 +104,6 @@ if(NOT non_os_build) "port/regdma_link.c") endif() - if(CONFIG_SOC_MODEM_CLOCK_SUPPORTED) - list(APPEND srcs "modem_clock.c") - endif() - if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP) list(APPEND srcs "mspi/mspi_timing_tuning/mspi_timing_tuning.c") if(CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_MSPI_DELAY AND NOT CONFIG_IDF_TARGET_ESP32S3) @@ -205,6 +198,7 @@ if(CONFIG_SOC_SPI_MEM_SUPPORT_TIMING_TUNING) add_subdirectory(mspi/mspi_timing_tuning/port/${target}) endif() add_subdirectory(lowpower) +add_subdirectory(modem) if(CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND OR CONFIG_PM_SLP_DISABLE_GPIO) target_link_libraries(${COMPONENT_LIB} INTERFACE "-u esp_sleep_gpio_include") diff --git a/components/esp_hw_support/modem/CMakeLists.txt b/components/esp_hw_support/modem/CMakeLists.txt new file mode 100644 index 0000000000..684df345ef --- /dev/null +++ b/components/esp_hw_support/modem/CMakeLists.txt @@ -0,0 +1,20 @@ +idf_build_get_property(target IDF_TARGET) +idf_build_get_property(non_os_build NON_OS_BUILD) + +if(non_os_build OR NOT CONFIG_SOC_MODEM_CLOCK_SUPPORTED) + return() +endif() + +set(srcs) + +if(CONFIG_SOC_MODEM_SUPPORT_ETM) + list(APPEND srcs "modem_etm.c") +endif() + +if(CONFIG_SOC_MODEM_CLOCK_SUPPORTED) + list(APPEND srcs "modem_clock.c") + list(APPEND srcs "port/${target}/modem_clock_impl.c") +endif() + +add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}") +target_sources(${COMPONENT_LIB} PRIVATE "${srcs}") diff --git a/components/esp_hw_support/modem_clock.c b/components/esp_hw_support/modem/modem_clock.c similarity index 100% rename from components/esp_hw_support/modem_clock.c rename to components/esp_hw_support/modem/modem_clock.c diff --git a/components/esp_hw_support/port/esp32c5/modem_clock_impl.c b/components/esp_hw_support/modem/port/esp32c5/modem_clock_impl.c similarity index 100% rename from components/esp_hw_support/port/esp32c5/modem_clock_impl.c rename to components/esp_hw_support/modem/port/esp32c5/modem_clock_impl.c diff --git a/components/esp_hw_support/port/esp32c6/modem_clock_impl.c b/components/esp_hw_support/modem/port/esp32c6/modem_clock_impl.c similarity index 100% rename from components/esp_hw_support/port/esp32c6/modem_clock_impl.c rename to components/esp_hw_support/modem/port/esp32c6/modem_clock_impl.c diff --git a/components/esp_hw_support/port/esp32c61/modem_clock_impl.c b/components/esp_hw_support/modem/port/esp32c61/modem_clock_impl.c similarity index 100% rename from components/esp_hw_support/port/esp32c61/modem_clock_impl.c rename to components/esp_hw_support/modem/port/esp32c61/modem_clock_impl.c diff --git a/components/esp_hw_support/port/esp32h2/modem_clock_impl.c b/components/esp_hw_support/modem/port/esp32h2/modem_clock_impl.c similarity index 100% rename from components/esp_hw_support/port/esp32h2/modem_clock_impl.c rename to components/esp_hw_support/modem/port/esp32h2/modem_clock_impl.c diff --git a/components/esp_hw_support/port/esp32h21/modem_clock_impl.c b/components/esp_hw_support/modem/port/esp32h21/modem_clock_impl.c similarity index 100% rename from components/esp_hw_support/port/esp32h21/modem_clock_impl.c rename to components/esp_hw_support/modem/port/esp32h21/modem_clock_impl.c diff --git a/components/esp_hw_support/port/esp32h4/modem_clock_impl.c b/components/esp_hw_support/modem/port/esp32h4/modem_clock_impl.c similarity index 100% rename from components/esp_hw_support/port/esp32h4/modem_clock_impl.c rename to components/esp_hw_support/modem/port/esp32h4/modem_clock_impl.c diff --git a/components/esp_hw_support/port/esp32c5/CMakeLists.txt b/components/esp_hw_support/port/esp32c5/CMakeLists.txt index 421a560c92..b27e92b99c 100644 --- a/components/esp_hw_support/port/esp32c5/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32c5/CMakeLists.txt @@ -12,10 +12,6 @@ set(srcs "rtc_clk_init.c" if(NOT non_os_build) list(APPEND srcs "sar_periph_ctrl.c") - - if(CONFIG_SOC_MODEM_CLOCK_SUPPORTED) - list(APPEND srcs "modem_clock_impl.c") - endif() endif() if(NOT BOOTLOADER_BUILD AND CONFIG_ESP_ENABLE_PVT) diff --git a/components/esp_hw_support/port/esp32c6/CMakeLists.txt b/components/esp_hw_support/port/esp32c6/CMakeLists.txt index 00f0244cc6..33715e7cb5 100644 --- a/components/esp_hw_support/port/esp32c6/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32c6/CMakeLists.txt @@ -12,10 +12,6 @@ set(srcs "rtc_clk_init.c" if(NOT non_os_build) list(APPEND srcs "sar_periph_ctrl.c") - - if(CONFIG_SOC_MODEM_CLOCK_SUPPORTED) - list(APPEND srcs "modem_clock_impl.c") - endif() endif() if(NOT BOOTLOADER_BUILD AND CONFIG_ESP_ENABLE_PVT) diff --git a/components/esp_hw_support/port/esp32c61/CMakeLists.txt b/components/esp_hw_support/port/esp32c61/CMakeLists.txt index 00f0244cc6..33715e7cb5 100644 --- a/components/esp_hw_support/port/esp32c61/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32c61/CMakeLists.txt @@ -12,10 +12,6 @@ set(srcs "rtc_clk_init.c" if(NOT non_os_build) list(APPEND srcs "sar_periph_ctrl.c") - - if(CONFIG_SOC_MODEM_CLOCK_SUPPORTED) - list(APPEND srcs "modem_clock_impl.c") - endif() endif() if(NOT BOOTLOADER_BUILD AND CONFIG_ESP_ENABLE_PVT) diff --git a/components/esp_hw_support/port/esp32h2/CMakeLists.txt b/components/esp_hw_support/port/esp32h2/CMakeLists.txt index 2c8e46e850..0be7eb5dd9 100644 --- a/components/esp_hw_support/port/esp32h2/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32h2/CMakeLists.txt @@ -13,10 +13,6 @@ if(NOT non_os_build) list(APPEND srcs "sar_periph_ctrl.c") endif() -if(CONFIG_SOC_MODEM_CLOCK_SUPPORTED) - list(APPEND srcs "modem_clock_impl.c") -endif() - add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}") target_sources(${COMPONENT_LIB} PRIVATE "${srcs}") diff --git a/components/esp_hw_support/port/esp32h21/CMakeLists.txt b/components/esp_hw_support/port/esp32h21/CMakeLists.txt index 22415c710f..9f9db291e3 100644 --- a/components/esp_hw_support/port/esp32h21/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32h21/CMakeLists.txt @@ -11,10 +11,6 @@ if(CONFIG_SOC_PMU_SUPPORTED) ) endif() -if(CONFIG_SOC_MODEM_CLOCK_SUPPORTED) - list(APPEND srcs "modem_clock_impl.c") -endif() - add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}") target_sources(${COMPONENT_LIB} PRIVATE "${srcs}") diff --git a/components/esp_hw_support/port/esp32h4/CMakeLists.txt b/components/esp_hw_support/port/esp32h4/CMakeLists.txt index 377d5d38c4..8c824225ec 100644 --- a/components/esp_hw_support/port/esp32h4/CMakeLists.txt +++ b/components/esp_hw_support/port/esp32h4/CMakeLists.txt @@ -14,10 +14,6 @@ endif() if(NOT BOOTLOADER_BUILD) # list(APPEND srcs "sar_periph_ctrl.c") // TODO: [ESP32H4] IDF-12368 - - if(CONFIG_SOC_MODEM_CLOCK_SUPPORTED) - list(APPEND srcs "modem_clock_impl.c") - endif() endif() add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}")