refactor: move_ocode_to_pmu_init_c6_c5_c61

This commit is contained in:
chaijie@espressif.com
2025-05-08 08:59:36 +08:00
committed by BOT
parent 7bca1fe76f
commit 24c46f1b89
5 changed files with 25 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -16,6 +16,8 @@
#include "esp_private/esp_pmu.h"
#include "soc/regi2c_dig_reg.h"
#include "regi2c_ctrl.h"
#include "esp_private/ocode_init.h"
#include "esp_rom_sys.h"
static __attribute__((unused)) const char *TAG = "pmu_init";
@ -212,4 +214,10 @@ void pmu_init(void)
pmu_lp_system_init_default(PMU_instance());
pmu_power_domain_force_default(PMU_instance());
#if !CONFIG_IDF_ENV_FPGA
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON) {
esp_ocode_calib_init();
}
#endif
}

View File

@ -17,6 +17,8 @@
#include "esp_private/esp_pmu.h"
#include "soc/regi2c_dig_reg.h"
#include "regi2c_ctrl.h"
#include "esp_private/ocode_init.h"
#include "esp_rom_sys.h"
static __attribute__((unused)) const char *TAG = "pmu_init";
@ -218,4 +220,10 @@ void pmu_init(void)
pmu_lp_system_init_default(PMU_instance());
pmu_power_domain_force_default(PMU_instance());
#if !CONFIG_IDF_ENV_FPGA
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON) {
esp_ocode_calib_init();
}
#endif
}

View File

@ -17,6 +17,8 @@
#include "esp_private/esp_pmu.h"
#include "soc/regi2c_dig_reg.h"
#include "regi2c_ctrl.h"
#include "esp_private/ocode_init.h"
#include "esp_rom_sys.h"
static __attribute__((unused)) const char *TAG = "pmu_init";
@ -213,4 +215,10 @@ void pmu_init(void)
pmu_lp_system_init_default(PMU_instance());
pmu_power_domain_force_default(PMU_instance());
#if !CONFIG_IDF_ENV_FPGA
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON) {
esp_ocode_calib_init();
}
#endif
}

View File

@ -32,7 +32,6 @@
#include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "esp_private/esp_pmu.h"
#include "esp_private/ocode_init.h"
#include "esp_rom_uart.h"
#include "esp_rom_sys.h"
@ -52,9 +51,6 @@ void esp_rtc_init(void)
{
#if !CONFIG_IDF_ENV_FPGA
pmu_init();
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON) {
esp_ocode_calib_init();
}
#endif
}

View File

@ -45,7 +45,6 @@
#include "esp_private/periph_ctrl.h"
#include "esp_private/esp_clk.h"
#include "esp_private/esp_pmu.h"
#include "esp_private/ocode_init.h"
#include "esp_rom_uart.h"
#include "esp_rom_sys.h"
@ -72,9 +71,6 @@ void esp_rtc_init(void)
#if !CONFIG_IDF_ENV_FPGA
pmu_init();
if (esp_rom_get_reset_reason(0) == RESET_REASON_CHIP_POWER_ON) {
esp_ocode_calib_init();
}
#endif
}