From 7d2ab4c14d6413446d3594a67a6de12c7eb54f87 Mon Sep 17 00:00:00 2001 From: cjin Date: Mon, 4 Dec 2023 14:46:10 +0800 Subject: [PATCH] fix(pm): place extra link opt in iram --- components/esp_hw_support/port/pau_regdma.c | 6 +++--- components/esp_hw_support/sleep_modem.c | 2 +- components/esp_hw_support/sleep_retention.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/esp_hw_support/port/pau_regdma.c b/components/esp_hw_support/port/pau_regdma.c index aab6b17860f5..06b2528b286f 100644 --- a/components/esp_hw_support/port/pau_regdma.c +++ b/components/esp_hw_support/port/pau_regdma.c @@ -88,18 +88,18 @@ void IRAM_ATTR pau_regdma_trigger_system_link_restore(void) } #endif -void pau_regdma_set_extra_link_addr(void *link_addr) +void IRAM_ATTR pau_regdma_set_extra_link_addr(void *link_addr) { pau_hal_set_regdma_extra_link_addr(PAU_instance()->hal, link_addr); } -void pau_regdma_trigger_extra_link_backup(void) +void IRAM_ATTR pau_regdma_trigger_extra_link_backup(void) { pau_hal_start_regdma_extra_link(PAU_instance()->hal, true); pau_hal_stop_regdma_extra_link(PAU_instance()->hal); } -void pau_regdma_trigger_extra_link_restore(void) +void IRAM_ATTR pau_regdma_trigger_extra_link_restore(void) { pau_hal_start_regdma_extra_link(PAU_instance()->hal, false); pau_hal_stop_regdma_extra_link(PAU_instance()->hal); diff --git a/components/esp_hw_support/sleep_modem.c b/components/esp_hw_support/sleep_modem.c index e04f60250733..97fafd657761 100644 --- a/components/esp_hw_support/sleep_modem.c +++ b/components/esp_hw_support/sleep_modem.c @@ -432,7 +432,7 @@ void sleep_modem_unregister_mac_bb_module_prepare_callback(mac_bb_power_down_cb_ * @param cpu_freq_mhz cpu frequency to do retention * @param do_retention function for retention */ -static void rtc_clk_cpu_freq_to_pll_mhz_and_do_retention(bool backup, int cpu_freq_mhz, void (*do_retention)(bool)) +static void IRAM_ATTR rtc_clk_cpu_freq_to_pll_mhz_and_do_retention(bool backup, int cpu_freq_mhz, void (*do_retention)(bool)) { #if SOC_PM_SUPPORT_PMU_MODEM_STATE if (pmu_sleep_pll_already_enabled()) { diff --git a/components/esp_hw_support/sleep_retention.c b/components/esp_hw_support/sleep_retention.c index 48fddb29dbca..7916c7d215aa 100644 --- a/components/esp_hw_support/sleep_retention.c +++ b/components/esp_hw_support/sleep_retention.c @@ -499,7 +499,7 @@ uint32_t IRAM_ATTR sleep_retention_get_modules(void) } #if SOC_PM_RETENTION_HAS_CLOCK_BUG -void sleep_retention_do_extra_retention(bool backup_or_restore) +void IRAM_ATTR sleep_retention_do_extra_retention(bool backup_or_restore) { if (s_retention.highpri < SLEEP_RETENTION_REGDMA_LINK_HIGHEST_PRIORITY || s_retention.highpri > SLEEP_RETENTION_REGDMA_LINK_LOWEST_PRIORITY) {