mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
refactor(pmu): move S31 dbias vol gap getter from efuse_ll to pmu_ll
Keep PMU calibration efuse reads in the PMU LL layer, matching other chips.
This commit is contained in:
@@ -16,11 +16,17 @@
|
|||||||
#include "soc/pmu_struct.h"
|
#include "soc/pmu_struct.h"
|
||||||
#include "hal/pmu_types.h"
|
#include "hal/pmu_types.h"
|
||||||
#include "hal/misc.h"
|
#include "hal/misc.h"
|
||||||
|
#include "soc/efuse_struct.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#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)
|
FORCE_INLINE_ATTR uint32_t pmu_ll_lp_get_interrupt_raw(pmu_dev_t *hw)
|
||||||
{
|
{
|
||||||
return hw->lp_ext.int_raw.val;
|
return hw->lp_ext.int_raw.val;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include "soc/regi2c_dig_reg.h"
|
#include "soc/regi2c_dig_reg.h"
|
||||||
#include "regi2c_ctrl.h"
|
#include "regi2c_ctrl.h"
|
||||||
#include "soc/rtc.h"
|
#include "soc/rtc.h"
|
||||||
#include "hal/efuse_ll.h"
|
|
||||||
#include "hal/efuse_hal.h"
|
#include "hal/efuse_hal.h"
|
||||||
#include "esp_hw_log.h"
|
#include "esp_hw_log.h"
|
||||||
#include "soc/hp_sys_clkrst_reg.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();
|
uint32_t blk_version = efuse_hal_blk_version();
|
||||||
uint8_t lp_hp_gap_efuse = 0;
|
uint8_t lp_hp_gap_efuse = 0;
|
||||||
if (blk_version >= 1) {
|
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;
|
bool gap_flag = lp_hp_gap_efuse >> 4;
|
||||||
uint8_t gap_abs_value = lp_hp_gap_efuse & 0xf;
|
uint8_t gap_abs_value = lp_hp_gap_efuse & 0xf;
|
||||||
if (gap_flag) {
|
if (gap_flag) {
|
||||||
|
|||||||
@@ -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;
|
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 *************************/
|
/******************* eFuse control functions *************************/
|
||||||
|
|
||||||
__attribute__((always_inline)) static inline bool efuse_ll_get_read_cmd(void)
|
__attribute__((always_inline)) static inline bool efuse_ll_get_read_cmd(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user