kopia lustrzana https://github.com/espressif/esp-idf
fix(ci): add sdkconfig head and change some macro
rodzic
f5487c72ab
commit
bd4147b5ef
|
@ -29,9 +29,7 @@ extern "C" {
|
|||
*/
|
||||
typedef enum {
|
||||
PMU_HP_ICG_MODEM_CODE_SLEEP = 0,
|
||||
#if SOC_PM_SUPPORT_PMU_MODEM_STATE
|
||||
PMU_HP_ICG_MODEM_CODE_MODEM = 1,
|
||||
#endif
|
||||
PMU_HP_ICG_MODEM_CODE_ACTIVE = 2,
|
||||
} pmu_hp_icg_modem_mode_t;
|
||||
|
||||
|
|
|
@ -294,10 +294,9 @@ static IRAM_ATTR uint32_t modem_clock_get_module_deps(periph_module_t module)
|
|||
* of pmu SLEEP, MODEM and ACTIVE mode respectively */
|
||||
#define ICG_NOGATING_ACTIVE (BIT(PMU_HP_ICG_MODEM_CODE_ACTIVE))
|
||||
#define ICG_NOGATING_SLEEP (BIT(PMU_HP_ICG_MODEM_CODE_SLEEP))
|
||||
#if SOC_PM_SUPPORT_PMU_MODEM_STATE
|
||||
#define ICG_NOGATING_MODEM (BIT(PMU_HP_ICG_MODEM_CODE_MODEM))
|
||||
#endif
|
||||
|
||||
#if !CONFIG_IDF_TARGET_ESP32H2
|
||||
static const DRAM_ATTR uint32_t initial_gating_mode[MODEM_CLOCK_DOMAIN_MAX] = {
|
||||
[MODEM_CLOCK_DOMAIN_MODEM_APB] = ICG_NOGATING_ACTIVE | ICG_NOGATING_MODEM,
|
||||
[MODEM_CLOCK_DOMAIN_MODEM_PERIPH] = ICG_NOGATING_ACTIVE,
|
||||
|
@ -310,16 +309,15 @@ static const DRAM_ATTR uint32_t initial_gating_mode[MODEM_CLOCK_DOMAIN_MAX] = {
|
|||
[MODEM_CLOCK_DOMAIN_COEX] = ICG_NOGATING_ACTIVE | ICG_NOGATING_MODEM,
|
||||
[MODEM_CLOCK_DOMAIN_WIFIPWR] = ICG_NOGATING_ACTIVE | ICG_NOGATING_MODEM,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if !CONFIG_IDF_TARGET_ESP32H2 //TODO: PM-92
|
||||
static IRAM_ATTR void modem_clock_module_icg_map_init_all(void)
|
||||
{
|
||||
portENTER_CRITICAL_SAFE(&MODEM_CLOCK_instance()->lock);
|
||||
for (int domain = 0; domain < MODEM_CLOCK_DOMAIN_MAX; domain++) {
|
||||
#if !CONFIG_IDF_TARGET_ESP32H2 //TODO: ESP32H2 need icg
|
||||
uint32_t code = modem_clock_hal_get_clock_domain_icg_bitmap(MODEM_CLOCK_instance()->hal, domain);
|
||||
modem_clock_hal_set_clock_domain_icg_bitmap(MODEM_CLOCK_instance()->hal, domain, initial_gating_mode[domain] | code);
|
||||
#endif
|
||||
}
|
||||
portEXIT_CRITICAL_SAFE(&MODEM_CLOCK_instance()->lock);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include "sdkconfig.h"
|
||||
#if SOC_MODEM_CLOCK_IS_INDEPENDENT && SOC_MODEM_CLOCK_SUPPORTED
|
||||
#include "hal/modem_syscon_ll.h"
|
||||
#include "hal/modem_lpcon_ll.h"
|
||||
|
@ -23,7 +24,7 @@ typedef struct {
|
|||
modem_lpcon_dev_t *lpcon_dev;
|
||||
} modem_clock_hal_context_t;
|
||||
|
||||
#if !CONFIG_IDF_TARGET_ESP32H2 //TODO: PM-
|
||||
#if !CONFIG_IDF_TARGET_ESP32H2 //TODO: PM-92
|
||||
void modem_clock_hal_set_clock_domain_icg_bitmap(modem_clock_hal_context_t *hal, modem_clock_domain_t domain, uint32_t bitmap);
|
||||
uint32_t modem_clock_hal_get_clock_domain_icg_bitmap(modem_clock_hal_context_t *hal, modem_clock_domain_t domain);
|
||||
#endif
|
||||
|
|
Ładowanie…
Reference in New Issue