OpenBIC
OpenSource Bridge-IC
|
#include <zephyr.h>
#include <stdio.h>
#include <stdlib.h>
#include "ipmi.h"
#include "ipmb.h"
#include "libipmi.h"
#include "libutil.h"
#include "util_worker.h"
#include "power_status.h"
#include "plat_gpio.h"
#include "plat_isr.h"
#include "plat_sensor_table.h"
#include "plat_power_seq.h"
#include <logging/log.h>
Functions | |
LOG_MODULE_REGISTER (power_sequence) | |
K_THREAD_STACK_EXTERN (e1s_power_thread) | |
K_THREAD_STACK_ARRAY_DEFINE (e1s_power_threads, MAX_E1S_IDX, POWER_SEQ_CTRL_STACK_SIZE) | |
K_THREAD_STACK_DEFINE (cpu_pcie_reset_thread, POWER_SEQ_CTRL_STACK_SIZE) | |
K_MUTEX_DEFINE (cpld_e1s_prsnt_reg_mutex) | |
bool | get_e1s_present (uint8_t index) |
bool | get_e1s_power_good (uint8_t index) |
bool | get_edge_power_good () |
uint8_t | get_e1s_pcie_reset_status (uint8_t index) |
void | init_sequence_status () |
bool | is_all_sequence_done (uint8_t status) |
bool | is_retimer_done (void) |
void | control_power_stage (uint8_t control_mode, uint8_t control_seq) |
int | check_power_stage (uint8_t check_mode, uint8_t check_seq) |
bool | notify_cpld_e1s_present (uint8_t index, uint8_t present) |
bool | e1s_power_on_handler (uint8_t initial_stage, e1s_power_control_gpio *e1s_gpio, uint8_t device_index) |
bool | e1s_power_off_handler (uint8_t initial_stage, e1s_power_control_gpio *e1s_gpio, uint8_t device_index) |
void | control_e1s_power_on_sequence (void *pvParameters, void *initial_stage, void *arvg1) |
void | control_e1s_power_off_sequence (void *pvParameters, void *arvg0, void *arvg1) |
void | abort_e1s_power_thread (uint8_t index) |
void | e1s_power_on_thread (uint8_t index, uint8_t initial_stage) |
void | e1s_power_off_thread (uint8_t index) |
void | control_cpu_perst_low (void *arvg0, void *arvg1, void *arvg2) |
void | abort_cpu_perst_low_thread () |
void | cpu_perst_low_thread () |
bool | power_on_handler (uint8_t initial_stage) |
bool | power_off_handler (uint8_t initial_stage) |
void | control_power_on_sequence (void *initial_stage, void *arvg0, void *arvg1) |
void | control_power_off_sequence () |
Variables | |
struct k_thread | e1s_power_thread_handler [MAX_E1S_IDX] |
k_tid_t | e1s_power_tid [MAX_E1S_IDX] |
struct k_thread | cpu_pcie_reset_thread_handler |
k_tid_t | cpu_pcie_reset_tid |
e1s_power_control_gpio | opa_e1s_power_control_gpio [] |
e1s_power_control_gpio | opb_e1s_power_control_gpio [] |
void abort_cpu_perst_low_thread | ( | ) |
void abort_e1s_power_thread | ( | uint8_t | index | ) |
int check_power_stage | ( | uint8_t | check_mode, |
uint8_t | check_seq | ||
) |
void control_cpu_perst_low | ( | void * | arvg0, |
void * | arvg1, | ||
void * | arvg2 | ||
) |
void control_e1s_power_off_sequence | ( | void * | pvParameters, |
void * | arvg0, | ||
void * | arvg1 | ||
) |
void control_e1s_power_on_sequence | ( | void * | pvParameters, |
void * | initial_stage, | ||
void * | arvg1 | ||
) |
void control_power_off_sequence | ( | ) |
void control_power_on_sequence | ( | void * | initial_stage, |
void * | arvg0, | ||
void * | arvg1 | ||
) |
void control_power_stage | ( | uint8_t | control_mode, |
uint8_t | control_seq | ||
) |
void cpu_perst_low_thread | ( | ) |
bool e1s_power_off_handler | ( | uint8_t | initial_stage, |
e1s_power_control_gpio * | e1s_gpio, | ||
uint8_t | device_index | ||
) |
void e1s_power_off_thread | ( | uint8_t | index | ) |
bool e1s_power_on_handler | ( | uint8_t | initial_stage, |
e1s_power_control_gpio * | e1s_gpio, | ||
uint8_t | device_index | ||
) |
void e1s_power_on_thread | ( | uint8_t | index, |
uint8_t | initial_stage | ||
) |
uint8_t get_e1s_pcie_reset_status | ( | uint8_t | index | ) |
bool get_e1s_power_good | ( | uint8_t | index | ) |
bool get_e1s_present | ( | uint8_t | index | ) |
bool get_edge_power_good | ( | ) |
void init_sequence_status | ( | ) |
bool is_all_sequence_done | ( | uint8_t | status | ) |
bool is_retimer_done | ( | void | ) |
K_MUTEX_DEFINE | ( | cpld_e1s_prsnt_reg_mutex | ) |
K_THREAD_STACK_ARRAY_DEFINE | ( | e1s_power_threads | , |
MAX_E1S_IDX | , | ||
POWER_SEQ_CTRL_STACK_SIZE | |||
) |
K_THREAD_STACK_DEFINE | ( | cpu_pcie_reset_thread | , |
POWER_SEQ_CTRL_STACK_SIZE | |||
) |
K_THREAD_STACK_EXTERN | ( | e1s_power_thread | ) |
LOG_MODULE_REGISTER | ( | power_sequence | ) |
bool notify_cpld_e1s_present | ( | uint8_t | index, |
uint8_t | present | ||
) |
static bool power_off_handler | ( | uint8_t | initial_stage | ) |
static bool power_on_handler | ( | uint8_t | initial_stage | ) |
struct k_thread cpu_pcie_reset_thread_handler |
k_tid_t cpu_pcie_reset_tid |
struct k_thread e1s_power_thread_handler[MAX_E1S_IDX] |
k_tid_t e1s_power_tid[MAX_E1S_IDX] |
e1s_power_control_gpio opa_e1s_power_control_gpio[] |
e1s_power_control_gpio opb_e1s_power_control_gpio[] |