mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
change(esp_hw_support): some system peripherals to use a retention module number
This commit is contained in:
parent
7092cf7d3e
commit
59115cd2d1
@ -29,15 +29,6 @@ extern "C" {
|
||||
*/
|
||||
bool peripheral_domain_pd_allowed(void);
|
||||
|
||||
/**
|
||||
* @brief Digital peripheral power down initialize
|
||||
*
|
||||
* @return ESP_OK on success
|
||||
* ESP_ERR_INVALID_ARG on invalid sleep_retention_entries_create args
|
||||
* No memory for the retention link
|
||||
*/
|
||||
void sleep_sys_periph_retention_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -20,80 +20,79 @@
|
||||
|
||||
static __attribute__((unused)) const char *TAG = "sleep_sys_periph";
|
||||
|
||||
esp_err_t sleep_sys_periph_intr_matrix_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_intr_matrix_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(intr_matrix_regs_retention, ARRAY_SIZE(intr_matrix_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_HIGH, SLEEP_RETENTION_MODULE_INTR_MATRIX);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (Interrupt matrix) retention");
|
||||
ESP_LOGI(TAG, "Interrupt Matrix sleep retention initialization");
|
||||
esp_err_t err = sleep_retention_entries_create(intr_matrix_regs_retention, ARRAY_SIZE(intr_matrix_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_HIGH, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (%s) retention", "Interrupt matrix");
|
||||
ESP_LOGD(TAG, "Interrupt Matrix sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t sleep_sys_periph_hp_system_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_hp_system_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(hp_system_regs_retention, ARRAY_SIZE(hp_system_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_HIGH, SLEEP_RETENTION_MODULE_HP_SYSTEM);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (HP system) retention");
|
||||
ESP_LOGI(TAG, "HP System sleep retention initialization");
|
||||
esp_err_t err = sleep_retention_entries_create(hp_system_regs_retention, ARRAY_SIZE(hp_system_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_HIGH, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (%s) retention", "HP system");
|
||||
ESP_LOGD(TAG, "HP System sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
#if SOC_APM_SUPPORTED
|
||||
esp_err_t sleep_sys_periph_tee_apm_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_tee_apm_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(tee_apm_regs_retention, ARRAY_SIZE(tee_apm_regs_retention), REGDMA_LINK_PRI_NON_CRITICAL_TEE_APM, SLEEP_RETENTION_MODULE_TEE_APM);
|
||||
esp_err_t err = sleep_retention_entries_create(tee_apm_regs_retention, ARRAY_SIZE(tee_apm_regs_retention), REGDMA_LINK_PRI_NON_CRITICAL_TEE_APM, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
if (err == ESP_OK) {
|
||||
err = sleep_retention_entries_create(tee_apm_highpri_regs_retention, ARRAY_SIZE(tee_apm_highpri_regs_retention), REGDMA_LINK_PRI_CRITICAL_TEE_APM, SLEEP_RETENTION_MODULE_TEE_APM);
|
||||
err = sleep_retention_entries_create(tee_apm_highpri_regs_retention, ARRAY_SIZE(tee_apm_highpri_regs_retention), REGDMA_LINK_PRI_CRITICAL_TEE_APM, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
}
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (TEE/APM) retention");
|
||||
ESP_LOGI(TAG, "TEE/APM sleep retention initialization");
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (%s) retention", "TEE/APM");
|
||||
ESP_LOGD(TAG, "TEE/APM sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
esp_err_t sleep_sys_periph_uart0_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_uart0_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(uart_regs_retention, ARRAY_SIZE(uart_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_HIGH, SLEEP_RETENTION_MODULE_UART0);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (UART) retention");
|
||||
ESP_LOGI(TAG, "UART sleep retention initialization");
|
||||
esp_err_t err = sleep_retention_entries_create(uart_regs_retention, ARRAY_SIZE(uart_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_HIGH, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (%s) retention", "UART");
|
||||
ESP_LOGD(TAG, "UART sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t sleep_sys_periph_tg0_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_tg0_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(tg_regs_retention, ARRAY_SIZE(tg_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_TG0);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (Timer Group) retention");
|
||||
ESP_LOGI(TAG, "Timer Group sleep retention initialization");
|
||||
esp_err_t err = sleep_retention_entries_create(tg_regs_retention, ARRAY_SIZE(tg_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (%s) retention", "Timer Group");
|
||||
ESP_LOGD(TAG, "Timer Group sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t sleep_sys_periph_iomux_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_iomux_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(iomux_regs_retention, ARRAY_SIZE(iomux_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_IOMUX);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (IO Matrix) retention");
|
||||
ESP_LOGI(TAG, "IO Matrix sleep retention initialization");
|
||||
esp_err_t err = sleep_retention_entries_create(iomux_regs_retention, ARRAY_SIZE(iomux_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (%s) retention", "IO Matrix");
|
||||
ESP_LOGD(TAG, "IO Matrix sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t sleep_sys_periph_spimem_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_spimem_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(spimem_regs_retention, ARRAY_SIZE(spimem_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_SPIMEM);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (SPI mem) retention");
|
||||
ESP_LOGI(TAG, "SPI Mem sleep retention initialization");
|
||||
esp_err_t err = sleep_retention_entries_create(spimem_regs_retention, ARRAY_SIZE(spimem_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (%s) retention", "SPI mem");
|
||||
ESP_LOGD(TAG, "SPI Mem sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_err_t sleep_sys_periph_systimer_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_systimer_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(systimer_regs_retention, ARRAY_SIZE(systimer_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_SYSTIMER);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (SysTimer) retention");
|
||||
ESP_LOGI(TAG, "SysTimer sleep retention initialization");
|
||||
esp_err_t err = sleep_retention_entries_create(systimer_regs_retention, ARRAY_SIZE(systimer_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (%s) retention", "SysTimer");
|
||||
ESP_LOGD(TAG, "SysTimer sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
esp_err_t sleep_sys_periph_l2_cache_retention_init(void)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(l2_cache_regs_retention, ARRAY_SIZE(l2_cache_regs_retention), REGDMA_LINK_PRI_5, SLEEP_RETENTION_MODULE_L2_CACHE);
|
||||
esp_err_t err = sleep_retention_entries_create(l2_cache_regs_retention, ARRAY_SIZE(l2_cache_regs_retention), REGDMA_LINK_PRI_5, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (L2 Cache) retention");
|
||||
ESP_LOGI(TAG, "L2 Cache sleep retention initialization");
|
||||
return ESP_OK;
|
||||
@ -103,39 +102,39 @@ esp_err_t sleep_sys_periph_l2_cache_retention_init(void)
|
||||
#if SOC_PAU_IN_TOP_DOMAIN
|
||||
esp_err_t sleep_pau_retention_init(void)
|
||||
{
|
||||
esp_err_t err = sleep_retention_entries_create(pau_regs_retention, ARRAY_SIZE(pau_regs_retention), REGDMA_LINK_PRI_7, SLEEP_RETENTION_MODULE_REGDMA_SYSTEM);
|
||||
esp_err_t err = sleep_retention_entries_create(pau_regs_retention, ARRAY_SIZE(pau_regs_retention), REGDMA_LINK_PRI_7, SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for system (PAU) retention");
|
||||
ESP_LOGI(TAG, "PAU sleep retention initialization");
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
esp_err_t sleep_sys_periph_retention_init(void)
|
||||
static __attribute__((unused)) esp_err_t sleep_sys_periph_retention_init(void *arg)
|
||||
{
|
||||
esp_err_t err;
|
||||
err = sleep_sys_periph_intr_matrix_retention_init();
|
||||
err = sleep_sys_periph_intr_matrix_retention_init(arg);
|
||||
if(err) goto error;
|
||||
err = sleep_sys_periph_hp_system_retention_init();
|
||||
err = sleep_sys_periph_hp_system_retention_init(arg);
|
||||
if(err) goto error;
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
err = sleep_sys_periph_l2_cache_retention_init();
|
||||
if(err) goto error;
|
||||
#endif
|
||||
#if SOC_APM_SUPPORTED
|
||||
err = sleep_sys_periph_tee_apm_retention_init();
|
||||
err = sleep_sys_periph_tee_apm_retention_init(arg);
|
||||
if(err) goto error;
|
||||
#endif
|
||||
err = sleep_sys_periph_uart0_retention_init();
|
||||
err = sleep_sys_periph_uart0_retention_init(arg);
|
||||
if(err) goto error;
|
||||
err = sleep_sys_periph_tg0_retention_init();
|
||||
err = sleep_sys_periph_tg0_retention_init(arg);
|
||||
if(err) goto error;
|
||||
err = sleep_sys_periph_iomux_retention_init();
|
||||
err = sleep_sys_periph_iomux_retention_init(arg);
|
||||
if(err) goto error;
|
||||
err = sleep_sys_periph_spimem_retention_init();
|
||||
err = sleep_sys_periph_spimem_retention_init(arg);
|
||||
if(err) goto error;
|
||||
err = sleep_sys_periph_systimer_retention_init(arg);
|
||||
if(err) goto error;
|
||||
err = sleep_sys_periph_systimer_retention_init();
|
||||
#if SOC_PAU_IN_TOP_DOMAIN
|
||||
if(err) goto error;
|
||||
err = sleep_pau_retention_init();
|
||||
#endif
|
||||
|
||||
@ -145,32 +144,27 @@ error:
|
||||
|
||||
bool peripheral_domain_pd_allowed(void)
|
||||
{
|
||||
const uint32_t inited_modules = sleep_retention_get_inited_modules();
|
||||
const uint32_t created_modules = sleep_retention_get_created_modules();
|
||||
const uint32_t mask = (const uint32_t) (BIT(SLEEP_RETENTION_MODULE_SYS_PERIPH));
|
||||
|
||||
uint32_t mask = (uint32_t) (
|
||||
BIT(SLEEP_RETENTION_MODULE_INTR_MATRIX) | \
|
||||
BIT(SLEEP_RETENTION_MODULE_HP_SYSTEM) | \
|
||||
BIT(SLEEP_RETENTION_MODULE_UART0) | \
|
||||
BIT(SLEEP_RETENTION_MODULE_TG0) | \
|
||||
BIT(SLEEP_RETENTION_MODULE_IOMUX) | \
|
||||
BIT(SLEEP_RETENTION_MODULE_SPIMEM) | \
|
||||
BIT(SLEEP_RETENTION_MODULE_SYSTIMER));
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
mask |= BIT(SLEEP_RETENTION_MODULE_L2_CACHE);
|
||||
#endif
|
||||
#if SOC_APM_SUPPORTED
|
||||
mask |= BIT(SLEEP_RETENTION_MODULE_TEE_APM);
|
||||
#endif
|
||||
#if SOC_PAU_IN_TOP_DOMAIN
|
||||
mask |= BIT(SLEEP_RETENTION_MODULE_REGDMA_SYSTEM);
|
||||
#endif
|
||||
return ((created_modules & mask) == mask);
|
||||
return ((inited_modules & mask) == (created_modules & mask));
|
||||
}
|
||||
|
||||
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP
|
||||
ESP_SYSTEM_INIT_FN(sleep_sys_periph_startup_init, SECONDARY, BIT(0), 107)
|
||||
{
|
||||
sleep_sys_periph_retention_init();
|
||||
sleep_retention_module_init_param_t init_param = {
|
||||
.cbs = { .create = { .handle = sleep_sys_periph_retention_init, .arg = NULL } },
|
||||
.depends = BIT(SLEEP_RETENTION_MODULE_CLOCK_SYSTEM)
|
||||
};
|
||||
esp_err_t err = sleep_retention_module_init(SLEEP_RETENTION_MODULE_SYS_PERIPH, &init_param);
|
||||
if (err == ESP_OK) {
|
||||
err = sleep_retention_module_allocate(SLEEP_RETENTION_MODULE_SYS_PERIPH);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGW(TAG, "failed to allocate sleep retention linked list for system peripherals retention");
|
||||
}
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif
|
||||
|
@ -28,14 +28,8 @@ typedef enum periph_retention_module {
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_INTR_MATRIX = 16,
|
||||
SLEEP_RETENTION_MODULE_HP_SYSTEM = 17,
|
||||
SLEEP_RETENTION_MODULE_TEE_APM = 18,
|
||||
SLEEP_RETENTION_MODULE_UART0 = 19,
|
||||
SLEEP_RETENTION_MODULE_TG0 = 20,
|
||||
SLEEP_RETENTION_MODULE_IOMUX = 21,
|
||||
SLEEP_RETENTION_MODULE_SPIMEM = 22,
|
||||
SLEEP_RETENTION_MODULE_SYSTIMER = 23,
|
||||
SLEEP_RETENTION_MODULE_SYS_PERIPH = 16,
|
||||
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH0 = 24,
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH1 = 25,
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH2 = 26,
|
||||
@ -57,14 +51,8 @@ typedef enum periph_retention_module_bitmap {
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_BM_INTR_MATRIX = BIT(SLEEP_RETENTION_MODULE_INTR_MATRIX),
|
||||
SLEEP_RETENTION_MODULE_BM_HP_SYSTEM = BIT(SLEEP_RETENTION_MODULE_HP_SYSTEM),
|
||||
SLEEP_RETENTION_MODULE_BM_TEE_APM = BIT(SLEEP_RETENTION_MODULE_TEE_APM),
|
||||
SLEEP_RETENTION_MODULE_BM_UART0 = BIT(SLEEP_RETENTION_MODULE_UART0),
|
||||
SLEEP_RETENTION_MODULE_BM_TG0 = BIT(SLEEP_RETENTION_MODULE_TG0),
|
||||
SLEEP_RETENTION_MODULE_BM_IOMUX = BIT(SLEEP_RETENTION_MODULE_IOMUX),
|
||||
SLEEP_RETENTION_MODULE_BM_SPIMEM = BIT(SLEEP_RETENTION_MODULE_SPIMEM),
|
||||
SLEEP_RETENTION_MODULE_BM_SYSTIMER = BIT(SLEEP_RETENTION_MODULE_SYSTIMER),
|
||||
SLEEP_RETENTION_MODULE_BM_SYS_PERIPH = BIT(SLEEP_RETENTION_MODULE_SYS_PERIPH),
|
||||
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH0 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH0),
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH1 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH1),
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH2 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH2),
|
||||
|
@ -28,14 +28,8 @@ typedef enum periph_retention_module {
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_INTR_MATRIX = 16,
|
||||
SLEEP_RETENTION_MODULE_HP_SYSTEM = 17,
|
||||
SLEEP_RETENTION_MODULE_TEE_APM = 18,
|
||||
SLEEP_RETENTION_MODULE_UART0 = 19,
|
||||
SLEEP_RETENTION_MODULE_TG0 = 20,
|
||||
SLEEP_RETENTION_MODULE_IOMUX = 21,
|
||||
SLEEP_RETENTION_MODULE_SPIMEM = 22,
|
||||
SLEEP_RETENTION_MODULE_SYSTIMER = 23,
|
||||
SLEEP_RETENTION_MODULE_SYS_PERIPH = 16,
|
||||
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH0 = 24,
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH1 = 25,
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH2 = 26,
|
||||
@ -58,14 +52,8 @@ typedef enum periph_retention_module_bitmap {
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_BM_INTR_MATRIX = BIT(SLEEP_RETENTION_MODULE_INTR_MATRIX),
|
||||
SLEEP_RETENTION_MODULE_BM_HP_SYSTEM = BIT(SLEEP_RETENTION_MODULE_HP_SYSTEM),
|
||||
SLEEP_RETENTION_MODULE_BM_TEE_APM = BIT(SLEEP_RETENTION_MODULE_TEE_APM),
|
||||
SLEEP_RETENTION_MODULE_BM_UART0 = BIT(SLEEP_RETENTION_MODULE_UART0),
|
||||
SLEEP_RETENTION_MODULE_BM_TG0 = BIT(SLEEP_RETENTION_MODULE_TG0),
|
||||
SLEEP_RETENTION_MODULE_BM_IOMUX = BIT(SLEEP_RETENTION_MODULE_IOMUX),
|
||||
SLEEP_RETENTION_MODULE_BM_SPIMEM = BIT(SLEEP_RETENTION_MODULE_SPIMEM),
|
||||
SLEEP_RETENTION_MODULE_BM_SYSTIMER = BIT(SLEEP_RETENTION_MODULE_SYSTIMER),
|
||||
SLEEP_RETENTION_MODULE_BM_SYS_PERIPH = BIT(SLEEP_RETENTION_MODULE_SYS_PERIPH),
|
||||
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH0 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH0),
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH1 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH1),
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH2 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH2),
|
||||
|
@ -28,14 +28,8 @@ typedef enum periph_retention_module {
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_INTR_MATRIX = 16,
|
||||
SLEEP_RETENTION_MODULE_HP_SYSTEM = 17,
|
||||
SLEEP_RETENTION_MODULE_TEE_APM = 18,
|
||||
SLEEP_RETENTION_MODULE_UART0 = 19,
|
||||
SLEEP_RETENTION_MODULE_TG0 = 20,
|
||||
SLEEP_RETENTION_MODULE_IOMUX = 21,
|
||||
SLEEP_RETENTION_MODULE_SPIMEM = 22,
|
||||
SLEEP_RETENTION_MODULE_SYSTIMER = 23,
|
||||
SLEEP_RETENTION_MODULE_SYS_PERIPH = 16,
|
||||
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH0 = 24,
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH1 = 25,
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH2 = 26,
|
||||
@ -58,14 +52,8 @@ typedef enum periph_retention_module_bitmap {
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_BM_INTR_MATRIX = BIT(SLEEP_RETENTION_MODULE_INTR_MATRIX),
|
||||
SLEEP_RETENTION_MODULE_BM_HP_SYSTEM = BIT(SLEEP_RETENTION_MODULE_HP_SYSTEM),
|
||||
SLEEP_RETENTION_MODULE_BM_TEE_APM = BIT(SLEEP_RETENTION_MODULE_TEE_APM),
|
||||
SLEEP_RETENTION_MODULE_BM_UART0 = BIT(SLEEP_RETENTION_MODULE_UART0),
|
||||
SLEEP_RETENTION_MODULE_BM_TG0 = BIT(SLEEP_RETENTION_MODULE_TG0),
|
||||
SLEEP_RETENTION_MODULE_BM_IOMUX = BIT(SLEEP_RETENTION_MODULE_IOMUX),
|
||||
SLEEP_RETENTION_MODULE_BM_SPIMEM = BIT(SLEEP_RETENTION_MODULE_SPIMEM),
|
||||
SLEEP_RETENTION_MODULE_BM_SYSTIMER = BIT(SLEEP_RETENTION_MODULE_SYSTIMER),
|
||||
SLEEP_RETENTION_MODULE_BM_SYS_PERIPH = BIT(SLEEP_RETENTION_MODULE_SYS_PERIPH),
|
||||
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH0 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH0),
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH1 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH1),
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH2 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH2),
|
||||
|
@ -26,14 +26,8 @@ typedef enum periph_retention_module {
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_INTR_MATRIX = 16,
|
||||
SLEEP_RETENTION_MODULE_HP_SYSTEM = 17,
|
||||
SLEEP_RETENTION_MODULE_TEE_APM = 18,
|
||||
SLEEP_RETENTION_MODULE_UART0 = 19,
|
||||
SLEEP_RETENTION_MODULE_TG0 = 20,
|
||||
SLEEP_RETENTION_MODULE_IOMUX = 21,
|
||||
SLEEP_RETENTION_MODULE_SPIMEM = 22,
|
||||
SLEEP_RETENTION_MODULE_SYSTIMER = 23,
|
||||
SLEEP_RETENTION_MODULE_SYS_PERIPH = 16,
|
||||
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH0 = 24,
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH1 = 25,
|
||||
SLEEP_RETENTION_MODULE_GDMA_CH2 = 26,
|
||||
@ -41,7 +35,7 @@ typedef enum periph_retention_module {
|
||||
SLEEP_RETENTION_MODULE_I2C1 = 28,
|
||||
|
||||
SLEEP_RETENTION_MODULE_MAX = 31
|
||||
} periph_retention_module_bitmap_t;
|
||||
} periph_retention_module_t;
|
||||
|
||||
typedef enum periph_retention_module_bitmap {
|
||||
/* clock module, which includes system and modem */
|
||||
@ -55,14 +49,8 @@ typedef enum periph_retention_module_bitmap {
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_BM_INTR_MATRIX = BIT(SLEEP_RETENTION_MODULE_INTR_MATRIX),
|
||||
SLEEP_RETENTION_MODULE_BM_HP_SYSTEM = BIT(SLEEP_RETENTION_MODULE_HP_SYSTEM),
|
||||
SLEEP_RETENTION_MODULE_BM_TEE_APM = BIT(SLEEP_RETENTION_MODULE_TEE_APM),
|
||||
SLEEP_RETENTION_MODULE_BM_UART0 = BIT(SLEEP_RETENTION_MODULE_UART0),
|
||||
SLEEP_RETENTION_MODULE_BM_TG0 = BIT(SLEEP_RETENTION_MODULE_TG0),
|
||||
SLEEP_RETENTION_MODULE_BM_IOMUX = BIT(SLEEP_RETENTION_MODULE_IOMUX),
|
||||
SLEEP_RETENTION_MODULE_BM_SPIMEM = BIT(SLEEP_RETENTION_MODULE_SPIMEM),
|
||||
SLEEP_RETENTION_MODULE_BM_SYSTIMER = BIT(SLEEP_RETENTION_MODULE_SYSTIMER),
|
||||
SLEEP_RETENTION_MODULE_BM_SYS_PERIPH = BIT(SLEEP_RETENTION_MODULE_SYS_PERIPH),
|
||||
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH0 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH0),
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH1 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH1),
|
||||
SLEEP_RETENTION_MODULE_BM_GDMA_CH2 = BIT(SLEEP_RETENTION_MODULE_GDMA_CH2),
|
||||
|
@ -17,19 +17,10 @@ typedef enum periph_retention_module {
|
||||
SLEEP_RETENTION_MODULE_MIN = 0,
|
||||
/* clock module, which includes system and modem */
|
||||
SLEEP_RETENTION_MODULE_CLOCK_SYSTEM = 1,
|
||||
SLEEP_RETENTION_MODULE_REGDMA_SYSTEM = 2,
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_INTR_MATRIX = 10,
|
||||
SLEEP_RETENTION_MODULE_HP_SYSTEM = 11,
|
||||
SLEEP_RETENTION_MODULE_TEE_APM = 12,
|
||||
SLEEP_RETENTION_MODULE_UART0 = 13,
|
||||
SLEEP_RETENTION_MODULE_TG0 = 14,
|
||||
SLEEP_RETENTION_MODULE_IOMUX = 15,
|
||||
SLEEP_RETENTION_MODULE_SPIMEM = 16,
|
||||
SLEEP_RETENTION_MODULE_SYSTIMER = 17,
|
||||
SLEEP_RETENTION_MODULE_L2_CACHE = 18,
|
||||
SLEEP_RETENTION_MODULE_SYS_PERIPH = 16,
|
||||
|
||||
SLEEP_RETENTION_MODULE_MAX = 31
|
||||
} periph_retention_module_t;
|
||||
@ -37,21 +28,12 @@ typedef enum periph_retention_module {
|
||||
typedef enum periph_retention_module_bitmap {
|
||||
/* clock module, which includes system and modem */
|
||||
SLEEP_RETENTION_MODULE_BM_CLOCK_SYSTEM = BIT(SLEEP_RETENTION_MODULE_CLOCK_SYSTEM),
|
||||
SLEEP_RETENTION_MODULE_BM_REGDMA_SYSTEM = BIT(SLEEP_RETENTION_MODULE_REGDMA_SYSTEM),
|
||||
|
||||
/* digital peripheral module, which includes Interrupt Matrix, HP_SYSTEM,
|
||||
* TEE, APM, UART, Timer Group, IOMUX, SPIMEM, SysTimer, etc.. */
|
||||
SLEEP_RETENTION_MODULE_BM_INTR_MATRIX = BIT(SLEEP_RETENTION_MODULE_INTR_MATRIX),
|
||||
SLEEP_RETENTION_MODULE_BM_HP_SYSTEM = BIT(SLEEP_RETENTION_MODULE_HP_SYSTEM),
|
||||
SLEEP_RETENTION_MODULE_BM_TEE_APM = BIT(SLEEP_RETENTION_MODULE_TEE_APM),
|
||||
SLEEP_RETENTION_MODULE_BM_UART0 = BIT(SLEEP_RETENTION_MODULE_UART0),
|
||||
SLEEP_RETENTION_MODULE_BM_TG0 = BIT(SLEEP_RETENTION_MODULE_TG0),
|
||||
SLEEP_RETENTION_MODULE_BM_IOMUX = BIT(SLEEP_RETENTION_MODULE_IOMUX),
|
||||
SLEEP_RETENTION_MODULE_BM_SPIMEM = BIT(SLEEP_RETENTION_MODULE_SPIMEM),
|
||||
SLEEP_RETENTION_MODULE_BM_SYSTIMER = BIT(SLEEP_RETENTION_MODULE_SYSTIMER),
|
||||
SLEEP_RETENTION_MODULE_BM_L2_CACHE = BIT(SLEEP_RETENTION_MODULE_L2_CACHE),
|
||||
SLEEP_RETENTION_MODULE_BM_SYS_PERIPH = BIT(SLEEP_RETENTION_MODULE_SYS_PERIPH),
|
||||
|
||||
SLEEP_RETENTION_MODULE_BM_ALL = (uint32_t)-1
|
||||
SLEEP_RETENTION_MODULE_BM_ALL = (uint32_t)-1
|
||||
} periph_retention_module_bitmap_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user