OpenBIC
OpenSource Bridge-IC
plat_class.c File Reference
#include <stdio.h>
#include <logging/log.h>
#include "plat_class.h"
#include "plat_cpld.h"
#include "plat_pldm_sensor.h"
#include "plat_fru.h"
#include "plat_i2c.h"
#include "plat_util.h"
#include "plat_mctp.h"
#include "plat_user_setting.h"
#include "plat_adc.h"
Include dependency graph for plat_class.c:

Macros

#define BOARD_TYPE_MASK   (BIT(0) | BIT(1))
 
#define REV_ID_MASK   (BIT(0) | BIT(1) | BIT(2))
 
#define I2C_BUS_TMP   I2C_BUS3
 

Functions

 LOG_MODULE_REGISTER (plat_class)
 
bool plat_cpld_eerprom_read (uint8_t *data, uint16_t offset, uint8_t len)
 
void init_board_type (void)
 
void init_board_stage (void)
 
void init_tmp_vendor_type (void)
 
void init_vr_vendor_type (void)
 
void init_plat_config ()
 
uint8_t get_vr_module ()
 
uint8_t get_ubc_module ()
 
uint8_t get_tmp_module ()
 
uint8_t get_mmc_slot ()
 
uint8_t get_asic_board_id ()
 
uint8_t get_board_rev_id ()
 
uint8_t get_tray_location ()
 
void pal_show_board_types (const struct shell *shell)
 
void pal_show_extra_info (const struct shell *shell)
 

Variables

const char * vr_vendor_module_name []
 
const char * vr_module_name []
 
const char * ubc_module_name []
 

Macro Definition Documentation

◆ BOARD_TYPE_MASK

#define BOARD_TYPE_MASK   (BIT(0) | BIT(1))

◆ I2C_BUS_TMP

#define I2C_BUS_TMP   I2C_BUS3

◆ REV_ID_MASK

#define REV_ID_MASK   (BIT(0) | BIT(1) | BIT(2))

Function Documentation

◆ get_asic_board_id()

uint8_t get_asic_board_id ( )

◆ get_board_rev_id()

uint8_t get_board_rev_id ( )

◆ get_mmc_slot()

uint8_t get_mmc_slot ( )

◆ get_tmp_module()

uint8_t get_tmp_module ( )

◆ get_tray_location()

uint8_t get_tray_location ( )

◆ get_ubc_module()

uint8_t get_ubc_module ( )

◆ get_vr_module()

uint8_t get_vr_module ( void  )

◆ init_board_stage()

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

◆ init_board_type()

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

◆ init_plat_config()

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

◆ init_tmp_vendor_type()

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

◆ init_vr_vendor_type()

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

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_class  )

◆ pal_show_board_types()

void pal_show_board_types ( const struct shell *  shell)
Here is the call graph for this function:

◆ pal_show_extra_info()

void pal_show_extra_info ( const struct shell *  shell)
Here is the call graph for this function:

◆ plat_cpld_eerprom_read()

bool plat_cpld_eerprom_read ( uint8_t *  data,
uint16_t  offset,
uint8_t  len 
)
Here is the call graph for this function:

Variable Documentation

◆ ubc_module_name

const char* ubc_module_name[]
Initial value:
= {
"UBC_MODULE_DELTA",
"UBC_MODULE_MPS",
"UBC_MODULE_FLEX",
"UBC_MODULE_LUXSHARE",
"UBC_MODULE_CYNTEX",
"UBC_MODULE_UNKNOWN",
}

◆ vr_module_name

const char* vr_module_name[]
Initial value:
= {
"VR_MODULE_MPS",
"VR_MODULE_RNS",
"VR_MODULE_UNKNOWN",
}

◆ vr_vendor_module_name

const char* vr_vendor_module_name[]
Initial value:
= {
"DELTA_UBC_AND_MPS_VR",
"DELTA_UBC_AND_RNS_VR",
"MPS_UBC_AND_MPS_VR",
"MPS_UBC_AND_RNS_VR",
"FLEX_UBC_AND_MPS_VR",
"FLEX_UBC_AND_RNS_VR",
"LUXSHURE_UBC_AND_MPS_VR",
"LUXSHURE_UBC_AND_RNS_VR",
"CYNTEX_UBC_AND_MPS_VR",
"CYNTEX_UBC_AND_RNS_VR",
"VENDOR_TYPE_UNKNOWN",
}