FreeRTOS port on GAP8/RISC-V
|
Macros | |
#define | PI_PMU_BOOT_DEV_ROM |
#define | PI_PMU_BOOT_DEV_L2 |
#define | PI_PMU_BOOT_POW_STATE_SOC_LV |
#define | PI_PMU_BOOT_POW_STATE_SOC_HV |
#define | PI_PMU_FLL_RET_OFF |
#define | PI_PMU_FLL_RET_ON |
#define | PI_PMU_L2_MEM_RET_OFF |
#define | PI_PMU_L2_MEM_RET_ON |
#define | PI_PMU_MV_TO_DCDC(mV) |
#define | PI_PMU_DCDC_TO_MV(Dc) |
Enumerations | |
enum | pi_pmu_scu_seq_e |
Functions | |
static void | __pi_pmu_handler (void *arg) |
static void | __pi_pmu_task_fifo_enqueue (pi_task_t *task) |
static pi_task_t * | __pi_pmu_task_fifo_pop () |
static void | __pi_pmu_regulator_state_change (pi_pmu_scu_seq_e scu_seq) |
void | __pi_pmu_init (void) |
int | __pi_pmu_voltage_set (pi_pmu_domain_e domain, uint32_t voltage) |
int | __pi_pmu_state_get (pi_pmu_domain_e domain) |
int | __pi_pmu_boot_state_get (pi_pmu_domain_e domain) |
int | __pi_pmu_sleep_mode_set (pi_pmu_domain_e domain, struct pi_pmu_sleep_conf_s *conf) |
int | __pi_pmu_sleep_mode_enable (pi_pmu_domain_e domain) |
Variables | |
static struct pmu_data_s | g_pmu_data |
#define PI_PMU_BOOT_DEV_L2 |
Referenced by __pi_pmu_sleep_mode_set().
#define PI_PMU_BOOT_DEV_ROM |
Referenced by __pi_pmu_sleep_mode_set().
#define PI_PMU_BOOT_POW_STATE_SOC_HV |
#define PI_PMU_BOOT_POW_STATE_SOC_LV |
#define PI_PMU_DCDC_TO_MV | ( | Dc | ) |
Referenced by __pi_pmu_init().
#define PI_PMU_FLL_RET_OFF |
Referenced by __pi_pmu_sleep_mode_set().
#define PI_PMU_FLL_RET_ON |
Referenced by __pi_pmu_sleep_mode_set().
#define PI_PMU_L2_MEM_RET_OFF |
Referenced by __pi_pmu_sleep_mode_set().
#define PI_PMU_L2_MEM_RET_ON |
Referenced by __pi_pmu_sleep_mode_set().
#define PI_PMU_MV_TO_DCDC | ( | mV | ) |
Referenced by __pi_pmu_voltage_set().
enum pi_pmu_scu_seq_e |
WIU_IFR1[0] = SCU_4 SoC-sleep, CL-sleep WIU_IFR1[1] = SCU_5 SoC-ret, CL-sleep WIU_IFR1[2] = SCU_0 SoC-NV, CL-sleep WIU_IFR1[3] = SCU_1 SoC-LV, CL-sleep WIU_IFR1[4] = SCU_2 SoC-NV, CL-ON WIU_IFR1[5] = SCU_3 SoC-LV, CL-ON
Enumerator | |
---|---|
PI_PMU_SCU_SEQ_DEEP_SLEEP | |
PI_PMU_SCU_SEQ_RET_DEEP_SLEEP | |
PI_PMU_SCU_SEQ_HP_CLUSTER_OFF | |
PI_PMU_SCU_SEQ_LP_CLUSTER_OFF | |
PI_PMU_SCU_SEQ_HP_CLUSTER_ON | |
PI_PMU_SCU_SEQ_LP_CLUSTER_ON |
int __pi_pmu_boot_state_get | ( | pi_pmu_domain_e | domain | ) |
References soc_ctrl_safe_pmu_sleepctrl_t::bttype, soc_ctrl_safe_pmu_sleepctrl_t::field, and pmu_data_s::sleepctrl.
Referenced by pi_pmu_boot_state_get().
|
static |
References __pi_pmu_task_fifo_pop(), pi_task_t::data, pmu_data_s::fifo_head, pi_task_release(), and PMU_TRACE.
Referenced by __pi_pmu_init().
void __pi_pmu_init | ( | void | ) |
References __pi_pmu_handler(), ARCHI_FREQ_INIT, soc_ctrl_cl_bypass_t::byp_clk, soc_ctrl_cl_bypass_t::byp_pow, soc_ctrl_safe_pmu_sleepctrl_t::cl_wake, pmu_data_s::cluster_state, pmu_data_s::cur_voltage, pmu_data_s::dcdc_regulator, soc_ctrl_cl_bypass_t::field, soc_ctrl_safe_pmu_rar_t::field, soc_ctrl_safe_pmu_sleepctrl_t::field, pmu_data_s::fifo_head, pmu_data_s::fifo_tail, FLL_ID_FC, hal_pmu_dlc_ifr_mask_clear(), hal_pmu_dlc_imr_mask_set(), hal_soc_ctrl_cl_bypass_get(), hal_soc_ctrl_cl_bypass_mask_set(), hal_soc_ctrl_pmu_rar_get(), hal_soc_ctrl_pmu_sleepctrl_get(), hal_soc_eu_set_fc_mask(), soc_ctrl_safe_pmu_rar_t::nv_volt, pi_fc_event_handler_set(), pi_fll_init(), PI_PMU_DCDC_TO_MV, PMU_DLC_DLC_IFR_PICL_OK_MASK, PMU_DLC_DLC_IFR_SCU_OK_MASK, PMU_DLC_DLC_IMR_ICU_DLYD_MASK, PMU_DLC_DLC_IMR_ICU_MD_CHG_MASK, PMU_DLC_DLC_IMR_ICU_OK_MASK, pmu_data_s::pmu_state, PMU_TRACE, pmu_data_s::sleep_state, pmu_data_s::sleepcfg, pmu_data_s::sleepctrl, SOC_EVENT_PMU_CLUSTER_CG, SOC_EVENT_PMU_CLUSTER_POWER, SOC_EVENT_PMU_DLC_BRIDGE_PICL, SOC_EVENT_PMU_DLC_BRIDGE_SCU, soc_ctrl_safe_pmu_sleepctrl_t::wakestate, soc_ctrl_cl_bypass_t::word, soc_ctrl_safe_pmu_rar_t::word, and soc_ctrl_safe_pmu_sleepctrl_t::word.
Referenced by system_init().
|
static |
References __pi_pmu_task_fifo_enqueue(), pmu_data_s::cluster_state, pi_task_t::data, pmu_data_s::dcdc_regulator, hal_pmu_dlc_idifr_get(), hal_pmu_dlc_ifr_get(), hal_pmu_dlc_ifr_mask_clear(), hal_pmu_dlc_imcifr_get(), hal_pmu_dlc_ioifr_get(), hal_pmu_dlc_pctrl_set(), PI_PMU_MAESTRO_EVENT_ICU_DELAYED, PI_PMU_MAESTRO_EVENT_ICU_OK, PI_PMU_MAESTRO_EVENT_MODE_CHANGED, PI_PMU_MAESTRO_EVENT_PICL_OK, PI_PMU_MAESTRO_EVENT_SCU_OK, PI_PMU_SCU_SEQ_LP_CLUSTER_ON, pi_task_block(), pi_task_wait_on(), PMU_DLC_DLC_PCTRL_DIR, PMU_DLC_DLC_PCTRL_PADDR, PMU_DLC_DLC_PCTRL_PWDATA, PMU_DLC_DLC_PCTRL_START, pmu_data_s::pmu_state, PMU_TRACE, SOC_EVENT_PMU_DLC_BRIDGE_SCU, WIU_IFR_1, and soc_ctrl_safe_pmu_rar_t::word.
Referenced by __pi_pmu_sleep_mode_enable(), and __pi_pmu_voltage_set().
int __pi_pmu_sleep_mode_enable | ( | pi_pmu_domain_e | domain | ) |
References __pi_pmu_regulator_state_change(), hal_soc_ctrl_pmu_sleepctrl_get(), hal_soc_ctrl_pmu_sleepctrl_mask_set(), PI_PMU_SCU_SEQ_DEEP_SLEEP, PI_PMU_SCU_SEQ_RET_DEEP_SLEEP, PMU_TRACE, pmu_data_s::sleep_state, pmu_data_s::sleepcfg, and soc_ctrl_safe_pmu_sleepctrl_t::word.
Referenced by pi_pmu_sleep_mode_enable().
int __pi_pmu_sleep_mode_set | ( | pi_pmu_domain_e | domain, |
struct pi_pmu_sleep_conf_s * | conf | ||
) |
References soc_ctrl_safe_pmu_sleepctrl_t::btdev, soc_ctrl_safe_pmu_sleepctrl_t::bttype, soc_ctrl_safe_pmu_sleepctrl_t::cl_fll, soc_ctrl_safe_pmu_sleepctrl_t::cl_wake, disable_irq(), soc_ctrl_safe_pmu_sleepctrl_t::extint, soc_ctrl_safe_pmu_sleepctrl_t::extwake_en, soc_ctrl_safe_pmu_sleepctrl_t::extwake_src, soc_ctrl_safe_pmu_sleepctrl_t::extwake_type, soc_ctrl_safe_pmu_sleepctrl_t::field, soc_ctrl_safe_pmu_sleepctrl_t::l2_r0, soc_ctrl_safe_pmu_sleepctrl_t::l2_r1, soc_ctrl_safe_pmu_sleepctrl_t::l2_r2, soc_ctrl_safe_pmu_sleepctrl_t::l2_r3, PI_PMU_BOOT_DEV_L2, PI_PMU_BOOT_DEV_ROM, PI_PMU_FLL_RET_OFF, PI_PMU_FLL_RET_ON, PI_PMU_L2_MEM_RET_OFF, PI_PMU_L2_MEM_RET_ON, PMU_TRACE, PMU_TRACE_ERR, restore_irq(), pmu_data_s::sleep_state, pmu_data_s::sleepcfg, pmu_data_s::sleepctrl, soc_ctrl_safe_pmu_sleepctrl_t::soc_fll, and soc_ctrl_safe_pmu_sleepctrl_t::wakestate.
Referenced by pi_pmu_sleep_mode_set().
int __pi_pmu_state_get | ( | pi_pmu_domain_e | domain | ) |
References pmu_data_s::cluster_state, and PMU_TRACE_ERR.
Referenced by pi_pmu_state_get().
|
static |
References pmu_data_s::fifo_head, pmu_data_s::fifo_tail, and pi_task_t::next.
Referenced by __pi_pmu_regulator_state_change().
|
static |
References pmu_data_s::fifo_head.
Referenced by __pi_pmu_handler().
int __pi_pmu_voltage_set | ( | pi_pmu_domain_e | domain, |
uint32_t | voltage | ||
) |
References __pi_pmu_regulator_state_change(), pmu_data_s::cluster_state, pmu_data_s::cur_voltage, pmu_data_s::dcdc_regulator, hal_soc_ctrl_pmu_rar_get(), hal_soc_ctrl_pmu_regulator_set(), PI_PMU_MV_TO_DCDC, PI_PMU_SCU_SEQ_HP_CLUSTER_OFF, PI_PMU_SCU_SEQ_LP_CLUSTER_OFF, PI_PMU_STATE_HV, PI_PMU_STATE_LV, pmu_data_s::pmu_state, PMU_TRACE, PMU_TRACE_ERR, SOC_CTRL_SAFE_PMU_RAR_LV_VOLT, SOC_CTRL_SAFE_PMU_RAR_LV_VOLT_MASK, SOC_CTRL_SAFE_PMU_RAR_LV_VOLT_SHIFT, SOC_CTRL_SAFE_PMU_RAR_NV_VOLT, SOC_CTRL_SAFE_PMU_RAR_NV_VOLT_MASK, SOC_CTRL_SAFE_PMU_RAR_NV_VOLT_SHIFT, and soc_ctrl_safe_pmu_rar_t::word.
Referenced by pi_pmu_voltage_set().
|
static |