OpenBIC
OpenSource Bridge-IC
|
#include "sensor.h"
#include "plat_sensor_table.h"
#include "plat_isr.h"
#include "plat_gpio.h"
#include "plat_pwm.h"
#include "plat_hwmon.h"
#include "plat_led.h"
#include "plat_log.h"
#include <logging/log.h>
#include "plat_threshold.h"
#include "plat_fsc.h"
#include <hal_i2c.h>
#include <nct7363.h>
#include <plat_hook.h>
#include "libutil.h"
#include "plat_status.h"
#include "adm1272.h"
#include "plat_class.h"
Classes | |
struct | pump_threshold_mapping |
struct | fb_sen_entry |
Macros | |
#define | THRESHOLD_POLL_STACK_SIZE 2048 |
#define | FAN_PUMP_PWRGD_STACK_SIZE 2048 |
#define | ENABLE_REDUNDANCY 1 |
#define | DISABLE_REDUNDANCY 0 |
#define | READ_ERROR -1 |
#define | FAN_BOARD_FAULT_PWM_OFFSET 0xA2 |
#define | FAN_BOARD_FAULT_PWM_OFFSET_DVT 0x9E |
#define | FAN_BOARD_FAULT_PWM_DUTY_1 0x00 |
#define | FAN_BOARD_FAULT_PWM_DUTY_50 0x7F |
#define | FAN_BOARD_FAULT_PWM_DUTY_100 0xFF |
#define | EVT_FAN_BOARD_FAULT_BIT_LOCATION 1 |
#define | EVT_FAN_BOARD_PWRGD_BIT_LOCATION 0 |
#define | DVT_FAN_BOARD_FAULT_BIT_LOCATION 7 |
#define | DVT_FAN_BOARD_PWRGD_BIT_LOCATION 3 |
#define | DVT_FAN_BOARD_FAULT_BLINK_ENABLE 0x0C |
#define | DVT_FAN_BOARD_FAULT_BLINK_DISABLE 0 |
#define | EVT_PUMP_BOARD_FAULT_BIT_LOCATION 1 |
#define | EVT_PUMP_BOARD_PWRGD_BIT_LOCATION 0 |
#define | DVT_PUMP_BOARD_FAULT_BIT_LOCATION 3 |
#define | DVT_PUMP_BOARD_PWRGD_BIT_LOCATION 7 |
#define | THRESHOLD_ARG0_TABLE_INDEX 0xFFFFFFFF |
#define | HEX_FAN_NUM 14 |
#define | SENSOR_NUM(type, index) SENSOR_NUM_FB_##index##_##type |
#define | FB_SEN_ENTRY(index) |
#define | FB_REINIT_SEN_COUNT 3 |
Enumerations | |
enum | THRESHOLD_TYPE { THRESHOLD_DISABLE , THRESHOLD_ENABLE_LCR , THRESHOLD_ENABLE_UCR , THRESHOLD_ENABLE_BOTH , THRESHOLD_ENABLE_DISCRETE } |
Variables | |
struct k_thread | threshold_poll |
struct k_thread | fan_pump_pwrgd_thread |
uint8_t | fan_pump_sensor_array [] |
uint8_t | fan_sensor_array [] |
uint8_t | pump_sensor_array [] |
uint8_t | hsc_communicate_sensor_array [] |
pump_threshold_mapping | pump_threshold_tbl [] |
sensor_threshold | threshold_tbl [] |
struct fb_sen_entry | fb_sen_tbl [] |
#define DISABLE_REDUNDANCY 0 |
#define DVT_FAN_BOARD_FAULT_BIT_LOCATION 7 |
#define DVT_FAN_BOARD_FAULT_BLINK_DISABLE 0 |
#define DVT_FAN_BOARD_FAULT_BLINK_ENABLE 0x0C |
#define DVT_FAN_BOARD_PWRGD_BIT_LOCATION 3 |
#define DVT_PUMP_BOARD_FAULT_BIT_LOCATION 3 |
#define DVT_PUMP_BOARD_PWRGD_BIT_LOCATION 7 |
#define ENABLE_REDUNDANCY 1 |
#define EVT_FAN_BOARD_FAULT_BIT_LOCATION 1 |
#define EVT_FAN_BOARD_PWRGD_BIT_LOCATION 0 |
#define EVT_PUMP_BOARD_FAULT_BIT_LOCATION 1 |
#define EVT_PUMP_BOARD_PWRGD_BIT_LOCATION 0 |
#define FAN_BOARD_FAULT_PWM_DUTY_1 0x00 |
#define FAN_BOARD_FAULT_PWM_DUTY_100 0xFF |
#define FAN_BOARD_FAULT_PWM_DUTY_50 0x7F |
#define FAN_BOARD_FAULT_PWM_OFFSET 0xA2 |
#define FAN_BOARD_FAULT_PWM_OFFSET_DVT 0x9E |
#define FAN_PUMP_PWRGD_STACK_SIZE 2048 |
#define FB_REINIT_SEN_COUNT 3 |
#define FB_SEN_ENTRY | ( | index | ) |
#define HEX_FAN_NUM 14 |
#define READ_ERROR -1 |
#define SENSOR_NUM | ( | type, | |
index | |||
) | SENSOR_NUM_FB_##index##_##type |
#define THRESHOLD_ARG0_TABLE_INDEX 0xFFFFFFFF |
#define THRESHOLD_POLL_STACK_SIZE 2048 |
enum THRESHOLD_TYPE |
void abnormal_flow_do | ( | uint32_t | thres_tbl_idx, |
uint32_t | status | ||
) |
void abnormal_press_do | ( | uint32_t | unused, |
uint32_t | status | ||
) |
void abnormal_temp_do | ( | uint32_t | sensor_num, |
uint32_t | status | ||
) |
void fan_board_tach_status_handler | ( | uint8_t | sensor_num, |
uint8_t | status | ||
) |
void fan_pump_pwrgd | ( | ) |
void fan_pump_pwrgd_handler | ( | void * | arug0, |
void * | arug1, | ||
void * | arug2 | ||
) |
uint8_t fb_hsc_status | ( | uint8_t | idx | ) |
sensor_threshold * find_threshold_tbl_entry | ( | uint8_t | sensor_num | ) |
bool get_threshold_poll_enable_flag | ( | ) |
uint32_t get_threshold_status | ( | uint8_t | sensor_num | ) |
bool hex_fan_fail_check | ( | ) |
void hex_fan_failure_do | ( | uint32_t | sensor_num, |
uint32_t | status | ||
) |
bool hsc_communicate_check | ( | ) |
K_KERNEL_STACK_MEMBER | ( | fan_pump_pwrgd_stack | , |
FAN_PUMP_PWRGD_STACK_SIZE | |||
) |
K_KERNEL_STACK_MEMBER | ( | threshold_poll_stack | , |
THRESHOLD_POLL_STACK_SIZE | |||
) |
K_WORK_DELAYABLE_DEFINE | ( | flow_rate_ready_worker | , |
flow_rate_ready | |||
) |
void level_sensor_do | ( | uint32_t | unused, |
uint32_t | status | ||
) |
LOG_MODULE_REGISTER | ( | plat_threshold | ) |
void plat_sensor_poll_post | ( | ) |
void pump_board_tach_status_handler | ( | uint8_t | sensor_num, |
uint8_t | status | ||
) |
void pump_change_threshold | ( | uint8_t | sensor_num, |
uint8_t | duty | ||
) |
bool pump_fail_check | ( | ) |
void pump_failure_do | ( | uint32_t | thres_tbl_idx, |
uint32_t | status | ||
) |
void rpu_internal_fan_failure_do | ( | uint32_t | sensor_num, |
uint32_t | status | ||
) |
void rpu_level_sensor_do | ( | uint32_t | unused, |
uint32_t | status | ||
) |
bool rpu_ready_recovery | ( | ) |
void sensor_log | ( | uint32_t | sensor_num, |
uint32_t | status | ||
) |
void set_threshold_poll_enable_flag | ( | bool | flag | ) |
bool system_failure_recovery | ( | ) |
void threshold_poll_init | ( | ) |
struct k_thread fan_pump_pwrgd_thread |
uint8_t fan_pump_sensor_array[] |
uint8_t fan_sensor_array[] |
struct fb_sen_entry fb_sen_tbl[] |
uint8_t hsc_communicate_sensor_array[] |
uint8_t pump_sensor_array[] |
pump_threshold_mapping pump_threshold_tbl[] |
struct k_thread threshold_poll |
sensor_threshold threshold_tbl[] |