change(pm): change macro SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG

This commit is contained in:
Lou Tianhao 2023-12-15 11:29:02 +08:00
parent 3140fa2121
commit d8b1f7207a
9 changed files with 14 additions and 14 deletions

View File

@ -43,7 +43,7 @@ void pau_regdma_trigger_modem_link_backup(void);
void pau_regdma_trigger_modem_link_restore(void);
#endif
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
/**
* @brief Set the address of system REGDMA Link in active state
* @param link_addr linked lists address

View File

@ -122,7 +122,7 @@ void sleep_retention_do_extra_retention(bool backup_or_restore);
*/
uint32_t sleep_retention_get_modules(void);
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
/**
* @brief Software trigger REGDMA to do system linked list retention
*

View File

@ -62,7 +62,7 @@ void pau_regdma_trigger_modem_link_restore(void)
}
#endif
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
void IRAM_ATTR pau_regdma_set_system_link_addr(void *link_addr)
{
/* ESP32H2 use software to trigger REGDMA to restore instead of PMU,

View File

@ -23,7 +23,7 @@
#include "soc/pcr_reg.h"
#include "modem/modem_syscon_reg.h"
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
#include "modem/modem_lpcon_reg.h"
#endif
@ -54,13 +54,13 @@ void sleep_clock_system_retention_deinit(void)
esp_err_t sleep_clock_modem_retention_init(void)
{
#define N_REGS_SYSCON() (((MODEM_SYSCON_MEM_CONF_REG - MODEM_SYSCON_TEST_CONF_REG) / 4) + 1)
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
#define N_REGS_LPCON() (((MODEM_LPCON_MEM_CONF_REG - MODEM_LPCON_TEST_CONF_REG) / 4) + 1)
#endif
const static sleep_retention_entries_config_t modem_regs_retention[] = {
[0] = { .config = REGDMA_LINK_CONTINUOUS_INIT(REGDMA_MODEMSYSCON_LINK(0), MODEM_SYSCON_TEST_CONF_REG, MODEM_SYSCON_TEST_CONF_REG, N_REGS_SYSCON(), 0, 0), .owner = ENTRY(0) | ENTRY(1) }, /* MODEM SYSCON */
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
[1] = { .config = REGDMA_LINK_CONTINUOUS_INIT(REGDMA_MODEMLPCON_LINK(0), MODEM_LPCON_TEST_CONF_REG, MODEM_LPCON_TEST_CONF_REG, N_REGS_LPCON(), 0, 0), .owner = ENTRY(0) | ENTRY(1) } /* MODEM LPCON */
#endif
};

View File

@ -99,7 +99,7 @@
#include "esp_private/sleep_clock.h"
#endif
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
#include "esp_private/sleep_retention.h"
#endif
@ -656,7 +656,7 @@ static esp_err_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags, esp_sleep_mode_t m
// Will switch to XTAL turn down MSPI speed
mspi_timing_change_speed_mode_cache_safe(true);
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
if (!deep_sleep && (pd_flags & PMU_SLEEP_PD_TOP)) {
sleep_retention_do_system_retention(true);
}
@ -890,7 +890,7 @@ static esp_err_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags, esp_sleep_mode_t m
if (!deep_sleep) {
s_config.ccount_ticks_record = esp_cpu_get_cycle_count();
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
if (pd_flags & PMU_SLEEP_PD_TOP) {
sleep_retention_do_system_retention(false);
}

View File

@ -515,7 +515,7 @@ void IRAM_ATTR sleep_retention_do_extra_retention(bool backup_or_restore)
}
#endif
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
void IRAM_ATTR sleep_retention_do_system_retention(bool backup_or_restore)
{
#define SYSTEM_LINK_NUM (0)

View File

@ -55,7 +55,7 @@ void pau_hal_start_regdma_modem_link(pau_hal_context_t *hal, bool backup_or_rest
void pau_hal_stop_regdma_modem_link(pau_hal_context_t *hal);
#endif
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
/**
* @brief Set regdma system link address
*
@ -102,7 +102,7 @@ void pau_hal_start_regdma_extra_link(pau_hal_context_t *hal, bool backup_or_rest
*/
void pau_hal_stop_regdma_extra_link(pau_hal_context_t *hal);
#if SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
#if SOC_PM_RETENTION_SW_TRIGGER_REGDMA
/**
* @brief Enable or disable PAU module clock
*

View File

@ -1235,7 +1235,7 @@ config SOC_PM_SUPPORT_DEEPSLEEP_CHECK_STUB_ONLY
bool
default y
config SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG
config SOC_PM_RETENTION_SW_TRIGGER_REGDMA
bool
default y

View File

@ -494,7 +494,7 @@
#define SOC_PM_CPU_RETENTION_BY_SW (1)
#define SOC_PM_MODEM_RETENTION_BY_REGDMA (1)
#define SOC_PM_SUPPORT_DEEPSLEEP_CHECK_STUB_ONLY (1) /*!<Supports CRC only the stub code in RTC memory */
#define SOC_PM_RETENTION_HAS_REGDMA_POWER_BUG (1)
#define SOC_PM_RETENTION_SW_TRIGGER_REGDMA (1) /*!< In esp32H2, regdma will power off when entering sleep */
/*-------------------------- CLOCK SUBSYSTEM CAPS ----------------------------------------*/
#define SOC_CLK_RC_FAST_SUPPORT_CALIBRATION (1)