diff --git a/components/esp_hal_pmu/esp32s31/include/hal/pmu_ll.h b/components/esp_hal_pmu/esp32s31/include/hal/pmu_ll.h index f4c5def701d..1a30165f606 100644 --- a/components/esp_hal_pmu/esp32s31/include/hal/pmu_ll.h +++ b/components/esp_hal_pmu/esp32s31/include/hal/pmu_ll.h @@ -16,11 +16,17 @@ #include "soc/pmu_struct.h" #include "hal/pmu_types.h" #include "hal/misc.h" +#include "soc/efuse_struct.h" #ifdef __cplusplus extern "C" { #endif +FORCE_INLINE_ATTR int32_t pmu_ll_get_dbias_vol_gap(void) +{ + return EFUSE.rd_mac_sys5.lp_hp_dbias_vol_gap; +} + FORCE_INLINE_ATTR uint32_t pmu_ll_lp_get_interrupt_raw(pmu_dev_t *hw) { return hw->lp_ext.int_raw.val; diff --git a/components/esp_hw_support/port/esp32s31/pmu_pvt.c b/components/esp_hw_support/port/esp32s31/pmu_pvt.c index 6ee6286e748..c14607ce283 100644 --- a/components/esp_hw_support/port/esp32s31/pmu_pvt.c +++ b/components/esp_hw_support/port/esp32s31/pmu_pvt.c @@ -20,7 +20,6 @@ #include "soc/regi2c_dig_reg.h" #include "regi2c_ctrl.h" #include "soc/rtc.h" -#include "hal/efuse_ll.h" #include "hal/efuse_hal.h" #include "esp_hw_log.h" #include "soc/hp_sys_clkrst_reg.h" @@ -36,7 +35,7 @@ static uint8_t get_lp_hp_gap(void) uint32_t blk_version = efuse_hal_blk_version(); uint8_t lp_hp_gap_efuse = 0; if (blk_version >= 1) { - lp_hp_gap_efuse = efuse_ll_get_dbias_vol_gap(); + lp_hp_gap_efuse = pmu_ll_get_dbias_vol_gap(); bool gap_flag = lp_hp_gap_efuse >> 4; uint8_t gap_abs_value = lp_hp_gap_efuse & 0xf; if (gap_flag) { diff --git a/components/hal/esp32s31/include/hal/efuse_ll.h b/components/hal/esp32s31/include/hal/efuse_ll.h index 134f49e64db..3f1365ceac5 100644 --- a/components/hal/esp32s31/include/hal/efuse_ll.h +++ b/components/hal/esp32s31/include/hal/efuse_ll.h @@ -99,11 +99,6 @@ __attribute__((always_inline)) static inline uint32_t efuse_ll_get_recovery_boot return EFUSE.rd_repeat_data5.recovery_bootloader_flash_sector; } -__attribute__((always_inline)) static inline int32_t efuse_ll_get_dbias_vol_gap(void) -{ - return EFUSE.rd_mac_sys5.lp_hp_dbias_vol_gap; -} - /******************* eFuse control functions *************************/ __attribute__((always_inline)) static inline bool efuse_ll_get_read_cmd(void)