From bf4a6680895f8a35412be22c7218877bd6a14b22 Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Mon, 15 Jun 2026 17:09:58 +0800 Subject: [PATCH] refactor(esp_hw_support): move system_periph_retention from soc to esp_hw_support --- components/esp_hw_support/CMakeLists.txt | 1 + .../port}/esp32c5/include/soc/system_periph_retention.h | 0 .../port/esp32c5/system_periph_retention.c} | 0 .../port}/esp32c6/include/soc/system_periph_retention.h | 0 .../port/esp32c6/system_periph_retention.c} | 0 .../port}/esp32c61/include/soc/system_periph_retention.h | 0 .../port/esp32c61/system_periph_retention.c} | 0 .../port}/esp32h2/include/soc/system_periph_retention.h | 0 .../port/esp32h2/system_periph_retention.c} | 0 .../port}/esp32p4/include/soc/system_periph_retention.h | 0 .../port/esp32p4/system_periph_retention.c} | 1 + components/soc/CMakeLists.txt | 4 ---- 12 files changed, 2 insertions(+), 4 deletions(-) rename components/{soc => esp_hw_support/port}/esp32c5/include/soc/system_periph_retention.h (100%) rename components/{soc/esp32c5/system_retention_periph.c => esp_hw_support/port/esp32c5/system_periph_retention.c} (100%) rename components/{soc => esp_hw_support/port}/esp32c6/include/soc/system_periph_retention.h (100%) rename components/{soc/esp32c6/system_retention_periph.c => esp_hw_support/port/esp32c6/system_periph_retention.c} (100%) rename components/{soc => esp_hw_support/port}/esp32c61/include/soc/system_periph_retention.h (100%) rename components/{soc/esp32c61/system_retention_periph.c => esp_hw_support/port/esp32c61/system_periph_retention.c} (100%) rename components/{soc => esp_hw_support/port}/esp32h2/include/soc/system_periph_retention.h (100%) rename components/{soc/esp32h2/system_retention_periph.c => esp_hw_support/port/esp32h2/system_periph_retention.c} (100%) rename components/{soc => esp_hw_support/port}/esp32p4/include/soc/system_periph_retention.h (100%) rename components/{soc/esp32p4/system_retention_periph.c => esp_hw_support/port/esp32p4/system_periph_retention.c} (99%) diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index 25b804040b0..131f6a4edc7 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -63,6 +63,7 @@ if(NOT non_os_build) ) if(CONFIG_SOC_PAU_SUPPORTED AND CONFIG_SOC_PM_SUPPORT_TOP_PD) list(APPEND srcs "sleep_system_peripheral.c") + list(APPEND srcs "port/${target}/system_periph_retention.c") endif() endif() diff --git a/components/soc/esp32c5/include/soc/system_periph_retention.h b/components/esp_hw_support/port/esp32c5/include/soc/system_periph_retention.h similarity index 100% rename from components/soc/esp32c5/include/soc/system_periph_retention.h rename to components/esp_hw_support/port/esp32c5/include/soc/system_periph_retention.h diff --git a/components/soc/esp32c5/system_retention_periph.c b/components/esp_hw_support/port/esp32c5/system_periph_retention.c similarity index 100% rename from components/soc/esp32c5/system_retention_periph.c rename to components/esp_hw_support/port/esp32c5/system_periph_retention.c diff --git a/components/soc/esp32c6/include/soc/system_periph_retention.h b/components/esp_hw_support/port/esp32c6/include/soc/system_periph_retention.h similarity index 100% rename from components/soc/esp32c6/include/soc/system_periph_retention.h rename to components/esp_hw_support/port/esp32c6/include/soc/system_periph_retention.h diff --git a/components/soc/esp32c6/system_retention_periph.c b/components/esp_hw_support/port/esp32c6/system_periph_retention.c similarity index 100% rename from components/soc/esp32c6/system_retention_periph.c rename to components/esp_hw_support/port/esp32c6/system_periph_retention.c diff --git a/components/soc/esp32c61/include/soc/system_periph_retention.h b/components/esp_hw_support/port/esp32c61/include/soc/system_periph_retention.h similarity index 100% rename from components/soc/esp32c61/include/soc/system_periph_retention.h rename to components/esp_hw_support/port/esp32c61/include/soc/system_periph_retention.h diff --git a/components/soc/esp32c61/system_retention_periph.c b/components/esp_hw_support/port/esp32c61/system_periph_retention.c similarity index 100% rename from components/soc/esp32c61/system_retention_periph.c rename to components/esp_hw_support/port/esp32c61/system_periph_retention.c diff --git a/components/soc/esp32h2/include/soc/system_periph_retention.h b/components/esp_hw_support/port/esp32h2/include/soc/system_periph_retention.h similarity index 100% rename from components/soc/esp32h2/include/soc/system_periph_retention.h rename to components/esp_hw_support/port/esp32h2/include/soc/system_periph_retention.h diff --git a/components/soc/esp32h2/system_retention_periph.c b/components/esp_hw_support/port/esp32h2/system_periph_retention.c similarity index 100% rename from components/soc/esp32h2/system_retention_periph.c rename to components/esp_hw_support/port/esp32h2/system_periph_retention.c diff --git a/components/soc/esp32p4/include/soc/system_periph_retention.h b/components/esp_hw_support/port/esp32p4/include/soc/system_periph_retention.h similarity index 100% rename from components/soc/esp32p4/include/soc/system_periph_retention.h rename to components/esp_hw_support/port/esp32p4/include/soc/system_periph_retention.h diff --git a/components/soc/esp32p4/system_retention_periph.c b/components/esp_hw_support/port/esp32p4/system_periph_retention.c similarity index 99% rename from components/soc/esp32p4/system_retention_periph.c rename to components/esp_hw_support/port/esp32p4/system_periph_retention.c index 3df795ebf20..ae3d8616292 100644 --- a/components/soc/esp32p4/system_retention_periph.c +++ b/components/esp_hw_support/port/esp32p4/system_periph_retention.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include "sdkconfig.h" #include "soc/cache_reg.h" #include "soc/gpio_reg.h" #include "soc/hp_system_reg.h" diff --git a/components/soc/CMakeLists.txt b/components/soc/CMakeLists.txt index 79564e640b5..d7ee0e5a750 100644 --- a/components/soc/CMakeLists.txt +++ b/components/soc/CMakeLists.txt @@ -167,10 +167,6 @@ if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED) list(APPEND srcs "${target_folder}/sdio_slave_periph.c") endif() -if(CONFIG_SOC_PAU_SUPPORTED AND CONFIG_SOC_LIGHT_SLEEP_SUPPORTED AND CONFIG_SOC_PM_SUPPORT_TOP_PD) - list(APPEND srcs "${target_folder}/system_retention_periph.c") -endif() - if(CONFIG_SOC_LCDCAM_CAM_SUPPORTED) list(APPEND srcs "${target_folder}/cam_periph.c") endif()