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 "hal_gpio.h"
#include "plat_gpio.h"
#include "plat_i2c.h"
#include "plat_class.h"
#include "plat_sensor_table.h"
#include "plat_pldm_monitor.h"
Include dependency graph for plat_class.c:

Macros

#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)
 
int pcie_card_id_to_cxl_id (uint8_t pcie_card_id, uint8_t *cxl_id)
 
int cxl_id_to_pcie_card_id (uint8_t cxl_id, uint8_t *pcie_card_id)
 
int check_pcie_card_presence_status (uint8_t card_id, uint8_t *card_type)
 
void check_pcie_card_type ()
 
uint8_t prsnt_status_to_card_type (uint8_t presence_status)
 
int get_pcie_card_type (uint8_t card_id, uint8_t *card_type)
 
int get_pcie_device_type (uint8_t card_id, uint8_t device_id, uint8_t *device_type)
 
bool is_cxl_present ()
 
uint8_t get_board_revision ()
 
int get_pcie_card_power_status (uint8_t pcie_card_id)
 
int init_platform_config ()
 
void set_reset_smb4_mux_pin ()
 
void presence_check_handler ()
 
void init_accl_presence_check_work ()
 

Variables

struct k_thread presence_check_thread_handler
 
k_tid_t presence_check_tid
 
uint8_t board_revision = REV_UNKNOWN
 
struct PCIE_CARD_INFO pcie_card_info []
 

Macro Definition Documentation

◆ PRESENCE_CHECK_DELAY_MS

#define PRESENCE_CHECK_DELAY_MS   5000

◆ PRESENCE_CHECK_STACK_SIZE

#define PRESENCE_CHECK_STACK_SIZE   1024

Function Documentation

◆ check_pcie_card_presence_status()

int check_pcie_card_presence_status ( uint8_t  card_id,
uint8_t *  card_type 
)

◆ check_pcie_card_type()

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

◆ cxl_id_to_pcie_card_id()

int cxl_id_to_pcie_card_id ( uint8_t  cxl_id,
uint8_t *  pcie_card_id 
)

◆ get_board_revision()

uint8_t get_board_revision ( )

◆ get_pcie_card_power_status()

int get_pcie_card_power_status ( uint8_t  pcie_card_id)
Here is the call graph for this function:

◆ get_pcie_card_type()

int get_pcie_card_type ( uint8_t  card_id,
uint8_t *  card_type 
)

◆ get_pcie_device_type()

int get_pcie_device_type ( uint8_t  card_id,
uint8_t  device_id,
uint8_t *  device_type 
)

◆ init_accl_presence_check_work()

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

◆ init_platform_config()

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

◆ is_cxl_present()

bool is_cxl_present ( )

◆ K_THREAD_STACK_DEFINE()

K_THREAD_STACK_DEFINE ( presence_check_thread  ,
PRESENCE_CHECK_STACK_SIZE   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_class  )

◆ pcie_card_id_to_cxl_id()

int pcie_card_id_to_cxl_id ( uint8_t  pcie_card_id,
uint8_t *  cxl_id 
)

◆ presence_check_handler()

void presence_check_handler ( )

◆ prsnt_status_to_card_type()

uint8_t prsnt_status_to_card_type ( uint8_t  presence_status)

◆ set_reset_smb4_mux_pin()

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

Variable Documentation

◆ board_revision

uint8_t board_revision = REV_UNKNOWN

◆ pcie_card_info

struct PCIE_CARD_INFO pcie_card_info[]

◆ presence_check_thread_handler

struct k_thread presence_check_thread_handler

◆ presence_check_tid

k_tid_t presence_check_tid