OpenBIC
OpenSource Bridge-IC
plat_class.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <logging/log.h>
#include "libutil.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include "plat_fru.h"
#include "plat_class.h"
#include "common_i2c_mux.h"
#include "pex89000.h"
#include "plat_sensor_table.h"
#include "hal_gpio.h"
#include "plat_gpio.h"
#include "ioexp_pca9555.h"
#include "plat_dev.h"
#include "plat_pldm_monitor.h"
#include "util_worker.h"
Include dependency graph for plat_class.c:

Macros

#define NUMBER_OF_ADC_CHANNEL   16
 
#define AST1030_ADC_BASE_ADDR   0x7e6e9000
 
#define PRESENCE_CHECK_STACK_SIZE   1024
 
#define PRESENCE_CHECK_DELAY_MS   5000
 

Functions

 LOG_MODULE_REGISTER (plat_class)
 
 K_THREAD_STACK_DEFINE (presence_check_thread, PRESENCE_CHECK_STACK_SIZE)
 
uint8_t reverse_ioexp_val (uint8_t val)
 
int get_cpld_register (uint8_t offset, uint8_t *value)
 
int get_accl_presence_status (uint8_t option, uint16_t *reg_val)
 
int get_accl_presence_val (uint8_t card_id, uint16_t val, bool *is_present)
 
void check_accl_device_presence_status_via_ioexp ()
 
int init_platform_config ()
 
uint8_t get_board_revision ()
 
uint8_t get_hsc_module ()
 
uint8_t get_pwr_brick_module ()
 
uint8_t get_pwr_monitor_module ()
 
uint8_t get_vr_module ()
 
bool get_acb_power_status ()
 
bool get_acb_power_good_flag ()
 
void presence_check_handler ()
 
void init_accl_presence_check_work ()
 
void init_asic_jtag_select_ioexp ()
 

Variables

struct k_thread presence_check_thread_handler
 
k_tid_t presence_check_tid
 
struct ASIC_CARD_INFO asic_card_info [ASIC_CARD_COUNT]
 

Macro Definition Documentation

◆ AST1030_ADC_BASE_ADDR

#define AST1030_ADC_BASE_ADDR   0x7e6e9000

◆ NUMBER_OF_ADC_CHANNEL

#define NUMBER_OF_ADC_CHANNEL   16

◆ PRESENCE_CHECK_DELAY_MS

#define PRESENCE_CHECK_DELAY_MS   5000

◆ PRESENCE_CHECK_STACK_SIZE

#define PRESENCE_CHECK_STACK_SIZE   1024

Function Documentation

◆ check_accl_device_presence_status_via_ioexp()

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

◆ get_acb_power_good_flag()

bool get_acb_power_good_flag ( )

◆ get_acb_power_status()

bool get_acb_power_status ( )
Here is the call graph for this function:

◆ get_accl_presence_status()

int get_accl_presence_status ( uint8_t  option,
uint16_t *  reg_val 
)
Here is the call graph for this function:

◆ get_accl_presence_val()

int get_accl_presence_val ( uint8_t  card_id,
uint16_t  val,
bool *  is_present 
)

◆ get_board_revision()

uint8_t get_board_revision ( )

◆ get_cpld_register()

int get_cpld_register ( uint8_t  offset,
uint8_t *  value 
)
Here is the call graph for this function:

◆ get_hsc_module()

uint8_t get_hsc_module ( )

◆ get_pwr_brick_module()

uint8_t get_pwr_brick_module ( )

◆ get_pwr_monitor_module()

uint8_t get_pwr_monitor_module ( )

◆ get_vr_module()

uint8_t get_vr_module ( )

◆ init_accl_presence_check_work()

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

◆ init_asic_jtag_select_ioexp()

void init_asic_jtag_select_ioexp ( )

Write U233 ioexp output 0 register

Write U233 ioexp output 1 register

Write U233 ioexp config 0 register

Write U233 ioexp config 1 register

Here is the call graph for this function:

◆ init_platform_config()

int init_platform_config ( )
Here is the call graph for this function:

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( presence_check_thread  ,
PRESENCE_CHECK_STACK_SIZE   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_class  )

◆ presence_check_handler()

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

◆ reverse_ioexp_val()

uint8_t reverse_ioexp_val ( uint8_t  val)

Variable Documentation

◆ asic_card_info

struct ASIC_CARD_INFO asic_card_info[ASIC_CARD_COUNT]

◆ presence_check_thread_handler

struct k_thread presence_check_thread_handler

◆ presence_check_tid

k_tid_t presence_check_tid