OpenBIC
OpenSource Bridge-IC
|
#include <stdbool.h>
#include <stdint.h>
#include <kernel.h>
#include "plat_def.h"
#include "sdr.h"
#include "pldm_monitor.h"
#include "libutil.h"
#include "sensor_shell.h"
Go to the source code of this file.
Macros | |
#define | sensor_name_to_num(x) #x, |
#define | SENSOR_POLL_STACK_SIZE 2048 |
#define | NONE 0 |
#define | GET_FROM_CACHE 0x00 |
#define | GET_FROM_SENSOR 0x01 |
#define | SENSOR_NULL 0xFF |
#define | SENSOR_FAIL 0xFF |
#define | SENSOR_NUM_MAX 0xFF |
#define | SENSOR_NOT_SUPPORT 0xFF |
#define | DIMM_NOT_PRESENT 0xFF |
#define | DEBUG_SENSOR 0 |
#define | SAMPLE_COUNT_DEFAULT 1 |
#define | POLL_TIME_DEFAULT 1 |
Variables | |
bool | enable_sensor_poll_thread |
sensor_cfg * | sensor_config |
uint8_t | sensor_config_index_map [SENSOR_NUM_MAX] |
uint8_t | sensor_config_count |
sensor_monitor_table_info * | sensor_monitor_table |
uint16_t | sensor_monitor_count |
const char *const | sensor_type_name [] |
sensor_drive_api | sensor_drive_tbl [] |
#define DEBUG_SENSOR 0 |
#define DIMM_NOT_PRESENT 0xFF |
#define GET_FROM_CACHE 0x00 |
#define GET_FROM_SENSOR 0x01 |
#define NONE 0 |
#define POLL_TIME_DEFAULT 1 |
#define SAMPLE_COUNT_DEFAULT 1 |
#define SENSOR_FAIL 0xFF |
#define sensor_name_to_num | ( | x | ) | #x, |
#define SENSOR_NOT_SUPPORT 0xFF |
#define SENSOR_NULL 0xFF |
#define SENSOR_NUM_MAX 0xFF |
#define SENSOR_POLL_STACK_SIZE 2048 |
typedef struct _adc128d818_init_arg adc128d818_init_arg |
typedef struct _adc_asd_deglitch_arg adc_asd_deglitch_arg |
typedef struct _adc_asd_init_arg adc_asd_init_arg |
typedef struct _adm1272_init_arg adm1272_init_arg |
typedef struct _adm1278_init_arg adm1278_init_arg |
typedef struct _apml_mailbox_init_arg_ apml_mailbox_init_arg |
typedef struct _cx7_init_arg cx7_init_arg |
typedef struct _ddr5_init_power_arg_ ddr5_init_power_arg |
typedef struct _ddr5_init_temp_arg_ ddr5_init_temp_arg |
typedef struct _g788p81u_init_arg_ g788p81u_init_arg |
typedef struct _ina230_init_arg ina230_init_arg |
typedef struct _ina233_init_arg_ ina233_init_arg |
typedef struct _isl28022_init_arg isl28022_init_arg |
typedef struct isl69259_init_args isl69259_init_arg |
typedef struct _ltc2991_init_arg_ ltc2991_init_arg |
typedef struct _ltc4282_init_arg ltc4282_init_arg |
typedef struct _ltc4286_init_arg ltc4286_init_arg |
typedef struct _max11617_init_arg max11617_init_arg |
typedef struct _max16550a_init_arg_ max16550a_init_arg |
typedef struct mp2971_init_args mp2971_init_arg |
typedef struct _mp2985_init_arg mp2985_init_arg |
typedef struct _mp5990_init_arg mp5990_init_arg |
typedef struct _nct7718w_init_arg_ nct7718w_init_arg |
typedef struct _nv_satmc_init_arg nv_satmc_init_arg |
typedef struct _pex89000_init_arg pex89000_init_arg |
typedef struct _pm8702_dimm_init_arg pm8702_dimm_init_arg |
typedef struct _pmic_init_arg pmic_init_arg |
typedef struct _pt5161l_init_arg_ pt5161l_init_arg |
typedef struct _rs31380r_init_arg rs31380r_init_arg |
typedef struct _rtq6056_init_arg_ rtq6056_init_arg |
typedef struct _sensor_cfg_ sensor_cfg |
typedef struct _sensor_drive_api sensor_drive_api |
typedef struct _sensor_monitor_table_info sensor_monitor_table_info |
typedef struct _sensor_poll_time_cfg sensor_poll_time_cfg |
typedef struct _sensor_val sensor_val |
typedef struct _sq52205_init_arg_ sq52205_init_arg |
typedef struct _vistara_init_arg_ vistara_init_arg |
typedef struct _vr_page_cfg vr_page_cfg |
anonymous enum |
enum ADM1278_OFFSET |
enum ADS112C_OFFSET |
enum DIMM_RELATED_OFFSET |
enum G788P81U_OFFSET |
enum INA230_OFFSET |
enum LTC4282_OFFSET |
enum NCT7718W_OFFSET |
enum SENSOR_DEV |
void add_sensor_config | ( | sensor_cfg | config | ) |
bool check_is_sensor_ready | ( | ) |
bool check_reading_pointer_null_is_allowed | ( | sensor_cfg * | cfg | ) |
bool check_sensor_num_exist | ( | uint8_t | sensor_num | ) |
void clear_unaccessible_sensor_cache | ( | sensor_cfg * | cfg | ) |
uint8_t common_tbl_sen_reinit | ( | uint8_t | sen_num | ) |
void control_sensor_polling | ( | uint8_t | sensor_num, |
uint8_t | optional, | ||
uint8_t | cache_status | ||
) |
bool dc_access | ( | uint8_t | sensor_num | ) |
void disable_sensor_poll | ( | ) |
bool e1s_pwrgd_access | ( | uint8_t | sensor_num | ) |
void enable_sensor_poll | ( | ) |
sensor_cfg * find_sensor_cfg_via_sensor_num | ( | sensor_cfg * | cfg_table, |
uint8_t | cfg_count, | ||
uint8_t | sensor_num | ||
) |
sensor_cfg * get_common_sensor_cfg_info | ( | uint8_t | sensor_num | ) |
bool get_sensor_init_done_flag | ( | ) |
bool get_sensor_poll_enable_flag | ( | ) |
uint8_t get_sensor_reading | ( | sensor_cfg * | cfg_table, |
uint8_t | cfg_count, | ||
uint8_t | sensor_num, | ||
int * | reading, | ||
uint8_t | read_mode | ||
) |
bool init_drive_type_delayed | ( | sensor_cfg * | cfg | ) |
void load_sensor_config | ( | void | ) |
bool me_access | ( | uint8_t | sensor_num | ) |
void pal_extend_sensor_config | ( | void | ) |
EVT2 switch board has two configurations that will cause the need to load different sensor table.
1st : ISL69259(VR) + MPS5990(HSC) + ISL28022(Power monitor IC) 2nd : XDPE12284(VR) + LTC4282(HSC) + INA230(Power monitor IC)
Since the BOARD_ID pins were originally used to identify which configuration has no function in this stage, so the current configuration is identified by IC_DEVICE_ID which gets from the VR chip.
The way to identify different configurations by BOARD_ID will be added back in the next stage.
uint8_t pal_get_monitor_sensor_count | ( | ) |
bool pal_is_time_to_poll | ( | uint8_t | sensor_num, |
int | poll_time | ||
) |
void pal_set_sensor_poll_interval | ( | int * | interval_ms | ) |
void plat_fill_monitor_sensor_table | ( | ) |
uint8_t plat_get_config_size | ( | ) |
void plat_sensor_poll_post | ( | ) |
bool post_access | ( | uint8_t | sensor_num | ) |
bool sensor_init | ( | void | ) |
bool stby_access | ( | uint8_t | sensor_num | ) |
bool vr_access | ( | uint8_t | sensor_num | ) |
bool vr_stby_access | ( | uint8_t | sensor_num | ) |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |