OpenBIC
OpenSource Bridge-IC
plat_util.c File Reference
#include <stdint.h>
#include <stdlib.h>
#include <kernel.h>
#include "libutil.h"
#include "util_worker.h"
#include "ipmb.h"
#include "ipmi.h"
#include "libipmi.h"
#include "plat_gpio.h"
#include "plat_m2.h"
#include "plat_class.h"
#include "plat_ipmb.h"
#include "plat_util.h"
#include <logging/log.h>
Include dependency graph for plat_util.c:

Classes

struct  delay_item_t
 
struct  clock_t
 
struct  assert_func_t
 

Functions

 LOG_MODULE_REGISTER (plat_util)
 
void tmp_func (void *args, uint32_t x)
 
void delay_function (uint32_t delay_time, void *func, uint32_t arg1, uint32_t arg2)
 
void free_timer (struct k_work *work)
 
void clock_ex_fn_tmp (struct k_timer *my_timer)
 
void clock_stop_fn_tmp (struct k_timer *my_timer)
 
void add_clock (uint32_t arg1, uint32_t arg2, void *ex_fn, void *stop_fn, uint32_t duration, uint32_t period)
 
 K_TIMER_DEFINE (ignore_noise_timer_A, NULL, NULL)
 
 K_TIMER_DEFINE (ignore_noise_timer_B, NULL, NULL)
 
 K_TIMER_DEFINE (ignore_noise_timer_C, NULL, NULL)
 
 K_TIMER_DEFINE (ignore_noise_timer_D, NULL, NULL)
 
struct k_timer * idx_to_noise_timer (NOSIE_E idx)
 
uint8_t ignore_noise (uint8_t idx, uint32_t m_sec)
 
void add_sel (uint8_t sensor_type, uint8_t event_type, uint8_t sensor_number, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3)
 
void add_sel_work (uint32_t sel_msg_addr)
 
assert_func_tassert_type_to_deassert_list (DEASSERT_CHK_TYPE_E assert_type)
 
uint8_t assert_func (DEASSERT_CHK_TYPE_E assert_type)
 
void init_sel_sensor_num (void)
 
uint8_t get_sel_sensor_num (void)
 

Variables

uint8_t plat_sel_sensor_num = SENSOR_NUM_SYS_STA
 
assert_func_t deassert_list []
 

Function Documentation

◆ add_clock()

void add_clock ( uint32_t  arg1,
uint32_t  arg2,
void *  ex_fn,
void *  stop_fn,
uint32_t  duration,
uint32_t  period 
)
Here is the call graph for this function:

◆ add_sel()

void add_sel ( uint8_t  sensor_type,
uint8_t  event_type,
uint8_t  sensor_number,
uint8_t  event_data1,
uint8_t  event_data2,
uint8_t  event_data3 
)

◆ add_sel_work()

void add_sel_work ( uint32_t  sel_msg_addr)
Here is the call graph for this function:

◆ assert_func()

uint8_t assert_func ( DEASSERT_CHK_TYPE_E  assert_type)
Here is the call graph for this function:

◆ assert_type_to_deassert_list()

assert_func_t * assert_type_to_deassert_list ( DEASSERT_CHK_TYPE_E  assert_type)

◆ clock_ex_fn_tmp()

void clock_ex_fn_tmp ( struct k_timer *  my_timer)

◆ clock_stop_fn_tmp()

void clock_stop_fn_tmp ( struct k_timer *  my_timer)
Here is the call graph for this function:

◆ delay_function()

void delay_function ( uint32_t  delay_time,
void *  func,
uint32_t  arg1,
uint32_t  arg2 
)
Here is the call graph for this function:

◆ free_timer()

void free_timer ( struct k_work *  work)

◆ get_sel_sensor_num()

uint8_t get_sel_sensor_num ( void  )

◆ idx_to_noise_timer()

struct k_timer * idx_to_noise_timer ( NOSIE_E  idx)

◆ ignore_noise()

uint8_t ignore_noise ( uint8_t  idx,
uint32_t  m_sec 
)
Here is the call graph for this function:

◆ init_sel_sensor_num()

void init_sel_sensor_num ( void  )
Here is the call graph for this function:

◆ K_TIMER_DEFINE() [1/4]

K_TIMER_DEFINE ( ignore_noise_timer_A  ,
NULL  ,
NULL   
)

◆ K_TIMER_DEFINE() [2/4]

K_TIMER_DEFINE ( ignore_noise_timer_B  ,
NULL  ,
NULL   
)

◆ K_TIMER_DEFINE() [3/4]

K_TIMER_DEFINE ( ignore_noise_timer_C  ,
NULL  ,
NULL   
)

◆ K_TIMER_DEFINE() [4/4]

K_TIMER_DEFINE ( ignore_noise_timer_D  ,
NULL  ,
NULL   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_util  )

◆ tmp_func()

void tmp_func ( void *  args,
uint32_t  x 
)

Variable Documentation

◆ deassert_list

assert_func_t deassert_list[]
Initial value:
= {
{ IRQ_INA230_E1S_0_ALERT_N, GPIO_INT_EDGE_BOTH, DEASSERT_CHK_TYPE_E_INA231_ALERT_0,
{ IRQ_INA230_E1S_1_ALERT_N, GPIO_INT_EDGE_BOTH, DEASSERT_CHK_TYPE_E_INA231_ALERT_1,
{ IRQ_INA230_E1S_2_ALERT_N, GPIO_INT_EDGE_BOTH, DEASSERT_CHK_TYPE_E_INA231_ALERT_2,
{ IRQ_INA230_E1S_3_ALERT_N, GPIO_INT_EDGE_BOTH, DEASSERT_CHK_TYPE_E_INA231_ALERT_3,
}
uint8_t assert_func(DEASSERT_CHK_TYPE_E assert_type)
Definition: plat_util.c:279
@ DEASSERT_CHK_TYPE_E_INA231_ALERT_1
Definition: plat_util.h:40
@ DEASSERT_CHK_TYPE_E_INA231_ALERT_3
Definition: plat_util.h:42
@ DEASSERT_CHK_TYPE_E_INA231_ALERT_0
Definition: plat_util.h:39
@ DEASSERT_CHK_TYPE_E_INA231_ALERT_2
Definition: plat_util.h:41

◆ plat_sel_sensor_num

uint8_t plat_sel_sensor_num = SENSOR_NUM_SYS_STA