OpenBIC
OpenSource Bridge-IC
plat_fru.c File Reference
#include <string.h>
#include "plat_i2c.h"
#include "i2c-mux-pca954x.h"
#include "modbus_server.h"
#include <libutil.h>
#include <stdlib.h>
#include <logging/log.h>
#include "fru.h"
#include "plat_fru.h"
#include <time.h>
Include dependency graph for plat_fru.c:

Macros

#define AALC_FRU_START   0x0000
 
#define AALC_FRU_SIZE   0x0400
 
#define FRU_ADDR_MIN   FRU_FB_PART_ADDR
 
#define FRU_ADDR_MAX   FRU_MFR_SERIEL_ADDR
 
#define FRU_DATA_SIZE   0x0200
 

Functions

 LOG_MODULE_REGISTER (plat_fru)
 
void pal_load_fru_config (void)
 
bool plat_eeprom_write (uint32_t offset, uint8_t *data, uint16_t data_len)
 
bool plat_eeprom_read (uint32_t offset, uint8_t *data, uint16_t data_len)
 
bool plat_fru_read (uint32_t offset, uint8_t *data, uint16_t data_len, uint8_t board_fru_id)
 
bool plat_get_fru_data (uint8_t *data, uint8_t board_fru_id)
 
FRU_INFOcreate_fru_info (void)
 
bool get_fru_info (uint8_t board_fru_id)
 
void print_fru_info (uint8_t board_fru_id)
 
FRU_INFOget_single_fru_info (uint8_t board_fru_id)
 

Variables

struct k_mutex i2c_1_PCA9546a_mutex
 
struct k_mutex i2c_2_PCA9546a_mutex
 
struct k_mutex i2c_6_PCA9546a_mutex
 
struct k_mutex i2c_7_PCA9546a_mutex
 
struct k_mutex i2c_8_PCA9546a_mutex
 
struct k_mutex i2c_9_PCA9546a_mutex
 
const EEPROM_CFG plat_fru_config []
 
FRU_INFOplat_fru_info = NULL
 

Macro Definition Documentation

◆ AALC_FRU_SIZE

#define AALC_FRU_SIZE   0x0400

◆ AALC_FRU_START

#define AALC_FRU_START   0x0000

◆ FRU_ADDR_MAX

#define FRU_ADDR_MAX   FRU_MFR_SERIEL_ADDR

◆ FRU_ADDR_MIN

#define FRU_ADDR_MIN   FRU_FB_PART_ADDR

◆ FRU_DATA_SIZE

#define FRU_DATA_SIZE   0x0200

Function Documentation

◆ create_fru_info()

FRU_INFO * create_fru_info ( void  )

◆ get_fru_info()

bool get_fru_info ( uint8_t  board_fru_id)
Here is the call graph for this function:

◆ get_single_fru_info()

FRU_INFO * get_single_fru_info ( uint8_t  board_fru_id)
Here is the call graph for this function:

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_fru  )

◆ pal_load_fru_config()

void pal_load_fru_config ( void  )

◆ plat_eeprom_read()

bool plat_eeprom_read ( uint32_t  offset,
uint8_t *  data,
uint16_t  data_len 
)
Here is the call graph for this function:

◆ plat_eeprom_write()

bool plat_eeprom_write ( uint32_t  offset,
uint8_t *  data,
uint16_t  data_len 
)
Here is the call graph for this function:

◆ plat_fru_read()

bool plat_fru_read ( uint32_t  offset,
uint8_t *  data,
uint16_t  data_len,
uint8_t  board_fru_id 
)
Here is the call graph for this function:

◆ plat_get_fru_data()

bool plat_get_fru_data ( uint8_t *  data,
uint8_t  board_fru_id 
)
Here is the call graph for this function:

◆ print_fru_info()

void print_fru_info ( uint8_t  board_fru_id)
Here is the call graph for this function:

Variable Documentation

◆ i2c_1_PCA9546a_mutex

struct k_mutex i2c_1_PCA9546a_mutex
extern

◆ i2c_2_PCA9546a_mutex

struct k_mutex i2c_2_PCA9546a_mutex
extern

◆ i2c_6_PCA9546a_mutex

struct k_mutex i2c_6_PCA9546a_mutex
extern

◆ i2c_7_PCA9546a_mutex

struct k_mutex i2c_7_PCA9546a_mutex
extern

◆ i2c_8_PCA9546a_mutex

struct k_mutex i2c_8_PCA9546a_mutex
extern

◆ i2c_9_PCA9546a_mutex

struct k_mutex i2c_9_PCA9546a_mutex
extern

◆ plat_fru_config

const EEPROM_CFG plat_fru_config[]

◆ plat_fru_info

FRU_INFO* plat_fru_info = NULL