refactor(etm): move ETM retention info from HAL to driver layer

Move soc_etm_retention_desc_t type definition and soc_etm_retention_info
data from hal component to esp_hw_support component, following the
pattern of other peripheral retention data (e.g. MWDT).

- Create esp_private/etm_retention.h with type and extern declaration
- Create port/<target>/etm_retention.c for each target with retention data
- Remove hal/<target>/etm_periph.c and hal/include/hal/etm_periph.h
- Update esp_etm.c to include the new header
- Update CMakeLists.txt in both components
This commit is contained in:
morris
2026-07-13 15:37:52 +08:00
parent 6ef9a267f1
commit bedeedafec
15 changed files with 104 additions and 103 deletions
-39
View File
@@ -1,39 +0,0 @@
/*
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stdint.h>
#include "soc/soc_caps.h"
#include "soc/regdma.h"
#if SOC_HAS(ETM)
#include "hal/etm_ll.h"
#endif
#if SOC_HAS(PAU)
#include "soc/retention_periph_defs.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if SOC_HAS(PAU) && SOC_ETM_SUPPORT_SLEEP_RETENTION
typedef struct {
periph_retention_module_t module; // ID of the ETM as a retention module
const regdma_entries_config_t *regdma_entry_array; // Array of regdma entries for retention
uint32_t array_size; // Size of the regdma_entry_array
} soc_etm_retention_desc_t;
extern const soc_etm_retention_desc_t soc_etm_retention_info[ETM_LL_GET(INST_NUM)];
#endif // SOC_HAS(PAU)
#ifdef __cplusplus
}
#endif