OpenBIC
OpenSource Bridge-IC
plat_mctp.c File Reference
#include <zephyr.h>
#include <sys/printk.h>
#include <logging/log.h>
#include <logging/log_ctrl.h>
#include <stdlib.h>
#include "libutil.h"
#include "mctp.h"
#include "mctp_ctrl.h"
#include "pldm.h"
#include "ipmi.h"
#include "sensor.h"
#include "plat_hook.h"
#include "plat_mctp.h"
#include "plat_gpio.h"
#include "cci.h"
#include "pm8702.h"
Include dependency graph for plat_mctp.c:

Functions

 LOG_MODULE_REGISTER (plat_mctp)
 
 K_TIMER_DEFINE (send_cmd_timer, send_cmd_to_dev, NULL)
 
 K_WORK_DEFINE (send_cmd_work, send_cmd_to_dev_handler)
 
mctpfind_mctp_by_smbus (uint8_t bus)
 
uint8_t get_mctp_route_info (uint8_t dest_endpoint, void **mctp_inst, mctp_ext_params *ext_params)
 
uint8_t get_mctp_info (uint8_t dest_endpoint, mctp **mctp_inst, mctp_ext_params *ext_params)
 
void send_cmd_to_dev_handler (struct k_work *work)
 
void send_cmd_to_dev (struct k_timer *timer)
 
void plat_mctp_init ()
 

Variables

int mctp_config_table_size = 1
 
mctp_port mctp_config_table []
 

Function Documentation

◆ find_mctp_by_smbus()

mctp * find_mctp_by_smbus ( uint8_t  bus)

◆ get_mctp_info()

uint8_t get_mctp_info ( uint8_t  dest_endpoint,
mctp **  mctp_inst,
mctp_ext_params ext_params 
)
Here is the call graph for this function:

◆ get_mctp_route_info()

uint8_t get_mctp_route_info ( uint8_t  dest_endpoint,
void **  mctp_inst,
mctp_ext_params ext_params 
)
Here is the call graph for this function:

◆ K_TIMER_DEFINE()

K_TIMER_DEFINE ( send_cmd_timer  ,
send_cmd_to_dev  ,
NULL   
)

◆ K_WORK_DEFINE()

K_WORK_DEFINE ( send_cmd_work  ,
send_cmd_to_dev_handler   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_mctp  )

◆ plat_mctp_init()

void plat_mctp_init ( void  )

BIC will not initialize mctp instance if CXL is not present

init mctp for bmc bus

Here is the call graph for this function:

◆ send_cmd_to_dev()

void send_cmd_to_dev ( struct k_timer *  timer)

◆ send_cmd_to_dev_handler()

void send_cmd_to_dev_handler ( struct k_work *  work)

Variable Documentation

◆ mctp_config_table

mctp_port mctp_config_table[]
Initial value:
= {
{ .conf.smbus_conf.addr = I2C_ADDR_BIC, .conf.smbus_conf.bus = I2C_BUS_CXL },
}
#define I2C_ADDR_BIC
Definition: plat_mctp.c:43
#define I2C_BUS_CXL
Definition: plat_mctp.c:42

◆ mctp_config_table_size

int mctp_config_table_size = 1