Skip to content

Commit 1854036

Browse files
committed
change(esp_hw_support): use union retention link priority definiation
1 parent 26cb10a commit 1854036

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

components/driver/i2c/i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static void i2c_hw_enable(i2c_port_t i2c_num)
280280
static esp_err_t i2c_sleep_retention_init(void *arg)
281281
{
282282
i2c_port_t i2c_num = *(i2c_port_t *)arg;
283-
esp_err_t ret = sleep_retention_entries_create(i2c_regs_retention[i2c_num].link_list, i2c_regs_retention[i2c_num].link_num, REGDMA_LINK_PRI_7, I2C_SLEEP_RETENTION_MODULE(i2c_num));
283+
esp_err_t ret = sleep_retention_entries_create(i2c_regs_retention[i2c_num].link_list, i2c_regs_retention[i2c_num].link_num, REGDMA_LINK_PRI_I2C, I2C_SLEEP_RETENTION_MODULE(i2c_num));
284284
ESP_RETURN_ON_ERROR(ret, I2C_TAG, "failed to allocate mem for sleep retention");
285285
return ret;
286286
}

components/esp_driver_i2c/i2c_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static esp_err_t s_i2c_sleep_retention_init(void *arg)
5252
{
5353
i2c_bus_t *bus = (i2c_bus_t *)arg;
5454
i2c_port_num_t port_num = bus->port_num;
55-
esp_err_t ret = sleep_retention_entries_create(i2c_regs_retention[port_num].link_list, i2c_regs_retention[port_num].link_num, REGDMA_LINK_PRI_7, I2C_SLEEP_RETENTION_MODULE(port_num));
55+
esp_err_t ret = sleep_retention_entries_create(i2c_regs_retention[port_num].link_list, i2c_regs_retention[port_num].link_num, REGDMA_LINK_PRI_I2C, I2C_SLEEP_RETENTION_MODULE(port_num));
5656
ESP_RETURN_ON_ERROR(ret, TAG, "failed to allocate mem for sleep retention");
5757
return ret;
5858
}

components/esp_hw_support/sleep_system_peripheral.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static __attribute__((unused)) esp_err_t sleep_sys_periph_systimer_retention_ini
8484
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
8585
esp_err_t sleep_sys_periph_l2_cache_retention_init(void)
8686
{
87-
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);
87+
esp_err_t err = sleep_retention_entries_create(l2_cache_regs_retention, ARRAY_SIZE(l2_cache_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_HIGH, SLEEP_RETENTION_MODULE_SYS_PERIPH);
8888
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for digital peripherals (L2 Cache) retention");
8989
ESP_LOGI(TAG, "L2 Cache sleep retention initialization");
9090
return ESP_OK;
@@ -94,7 +94,7 @@ esp_err_t sleep_sys_periph_l2_cache_retention_init(void)
9494
#if SOC_PAU_IN_TOP_DOMAIN
9595
esp_err_t sleep_pau_retention_init(void)
9696
{
97-
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);
97+
esp_err_t err = sleep_retention_entries_create(pau_regs_retention, ARRAY_SIZE(pau_regs_retention), REGDMA_LINK_PRI_SYS_PERIPH_LOW, SLEEP_RETENTION_MODULE_SYS_PERIPH);
9898
ESP_RETURN_ON_ERROR(err, TAG, "failed to allocate memory for system (PAU) retention");
9999
ESP_LOGI(TAG, "PAU sleep retention initialization");
100100
return ESP_OK;

components/esp_system/int_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static esp_err_t sleep_int_wdt_retention_init(void *arg)
5959
uint32_t group_id = *(uint32_t *)arg;
6060
esp_err_t err = sleep_retention_entries_create(tg_wdt_regs_retention[group_id].link_list,
6161
tg_wdt_regs_retention[group_id].link_num,
62-
REGDMA_LINK_PRI_6,
62+
REGDMA_LINK_PRI_SYS_PERIPH_LOW,
6363
(group_id == 0) ? SLEEP_RETENTION_MODULE_TG0_WDT : SLEEP_RETENTION_MODULE_TG1_WDT);
6464
if (err == ESP_OK) {
6565
ESP_LOGD(TAG, "Interrupt watchdog timer retention initialization");

components/esp_system/task_wdt/task_wdt_impl_timergroup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static esp_err_t sleep_task_wdt_retention_init(void *arg)
5252
uint32_t group_id = *(uint32_t *)arg;
5353
esp_err_t err = sleep_retention_entries_create(tg_wdt_regs_retention[group_id].link_list,
5454
tg_wdt_regs_retention[group_id].link_num,
55-
REGDMA_LINK_PRI_6,
55+
REGDMA_LINK_PRI_SYS_PERIPH_LOW,
5656
(group_id == 0) ? SLEEP_RETENTION_MODULE_TG0_WDT : SLEEP_RETENTION_MODULE_TG1_WDT);
5757
if (err == ESP_OK) {
5858
ESP_LOGD(TAG, "Task watchdog timer retention initialization");

components/soc/include/soc/regdma.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ extern "C" {
6060
#define REGDMA_LINK_PRI_BT_MAC_BB REGDMA_LINK_PRI_5
6161
#define REGDMA_LINK_PRI_SYS_PERIPH_HIGH REGDMA_LINK_PRI_5 // INT_MTX & HP_SYSTEM & Console UART
6262
#define REGDMA_LINK_PRI_SYS_PERIPH_LOW REGDMA_LINK_PRI_6 // TG0 & IO MUX & SPI MEM & Systimer
63-
#define REGDMA_LINK_PRI_IEEE802154 REGDMA_LINK_PRI_7
64-
#define REGDMA_LINK_PRI_GDMA REGDMA_LINK_PRI_7
65-
#define REGDMA_LINK_PRI_RMT REGDMA_LINK_PRI_7
63+
#define REGDMA_LINK_PRI_GENERAL_PERIPH REGDMA_LINK_PRI_7 // Low retenion priority for general peripherals
64+
#define REGDMA_LINK_PRI_IEEE802154 REGDMA_LINK_PRI_GENERAL_PERIPH
65+
#define REGDMA_LINK_PRI_GDMA REGDMA_LINK_PRI_GENERAL_PERIPH
66+
#define REGDMA_LINK_PRI_RMT REGDMA_LINK_PRI_GENERAL_PERIPH
67+
#define REGDMA_LINK_PRI_GPTIMER REGDMA_LINK_PRI_GENERAL_PERIPH
68+
#define REGDMA_LINK_PRI_I2C REGDMA_LINK_PRI_GENERAL_PERIPH
6669

6770
typedef enum {
6871
REGDMA_LINK_PRI_0 = 0,

0 commit comments

Comments
 (0)