OpenBIC
OpenSource Bridge-IC
plat_hook.c File Reference
#include <logging/log.h>
#include <drivers/peci.h>
#include "sensor.h"
#include "intel_peci.h"
#include "intel_dimm.h"
#include "power_status.h"
#include "i2c-mux-tca9548.h"
#include "libutil.h"
#include "hal_peci.h"
#include "plat_hook.h"
#include "plat_sensor_table.h"
#include "plat_gpio.h"
#include "plat_dimm.h"
Include dependency graph for plat_hook.c:

Macros

#define RDPKG_IDX_DIMM_TEMP   0x0E
 

Functions

 LOG_MODULE_REGISTER (plat_hook)
 
bool pre_xdpe15284_read (sensor_cfg *cfg, void *args)
 
bool pre_vol_bat3v_read (sensor_cfg *cfg, void *args)
 
bool post_vol_bat3v_read (sensor_cfg *cfg, void *args, int *reading)
 
bool pre_nvme_read (sensor_cfg *cfg, void *args)
 
bool post_cpu_margin_read (sensor_cfg *cfg, void *args, int *reading)
 
bool pre_intel_dimm_i3c_read (sensor_cfg *cfg, void *args)
 
bool post_intel_dimm_i3c_read (sensor_cfg *cfg, void *args, int *reading)
 

Variables

xdpe15284_pre_read_arg xdpe15284_pre_read_args []
 
adc_asd_init_arg adc_asd_init_args []
 
adm1278_init_arg adm1278_init_args []
 
mp5990_init_arg mp5990_init_args []
 
mp2985_init_arg mp2985_init_args [] = { [0] = { .is_init = false } }
 
struct tca9548 mux_conf_addr_0xe2 [8]
 
dimm_post_proc_arg dimm_post_proc_args []
 

Macro Definition Documentation

◆ RDPKG_IDX_DIMM_TEMP

#define RDPKG_IDX_DIMM_TEMP   0x0E

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_hook  )

◆ post_cpu_margin_read()

bool post_cpu_margin_read ( sensor_cfg cfg,
void *  args,
int *  reading 
)
Here is the call graph for this function:

◆ post_intel_dimm_i3c_read()

bool post_intel_dimm_i3c_read ( sensor_cfg cfg,
void *  args,
int *  reading 
)
Here is the call graph for this function:

◆ post_vol_bat3v_read()

bool post_vol_bat3v_read ( sensor_cfg cfg,
void *  args,
int *  reading 
)
Here is the call graph for this function:

◆ pre_intel_dimm_i3c_read()

bool pre_intel_dimm_i3c_read ( sensor_cfg cfg,
void *  args 
)
Here is the call graph for this function:

◆ pre_nvme_read()

bool pre_nvme_read ( sensor_cfg cfg,
void *  args 
)
Here is the call graph for this function:

◆ pre_vol_bat3v_read()

bool pre_vol_bat3v_read ( sensor_cfg cfg,
void *  args 
)
Here is the call graph for this function:

◆ pre_xdpe15284_read()

bool pre_xdpe15284_read ( sensor_cfg cfg,
void *  args 
)
Here is the call graph for this function:

Variable Documentation

◆ adc_asd_init_args

adc_asd_init_arg adc_asd_init_args[]
Initial value:
= {
[0] = { .is_init = false,
.deglitch[0] = { .deglitch_en = true, .upper_bound = 0x33C },
.deglitch[2] = { .deglitch_en = true, .upper_bound = 0x2DA },
.deglitch[3] = { .deglitch_en = true, .upper_bound = 0x1D1 },
.deglitch[4] = { .deglitch_en = true, .upper_bound = 0x1DE },
},
[1] = {
.is_init = false,
.deglitch[0] = { .deglitch_en = false, },
.deglitch[1] = { .deglitch_en = true, .upper_bound = 0x28C },
.deglitch[3] = { .deglitch_en = true, .upper_bound = 0x372 },
.deglitch[5] = { .deglitch_en = true, .upper_bound = 0x213 },
.deglitch[6] = { .deglitch_en = true, .upper_bound = 0x2F6 },
.deglitch[7] = { .deglitch_en = true, .upper_bound = 0x31D },
}
}

◆ adm1278_init_args

adm1278_init_arg adm1278_init_args[]
Initial value:
= {
[0] = { .is_init = false, .config = { 0x3F1C }, .r_sense = 0.25 }
}

◆ dimm_post_proc_args

dimm_post_proc_arg dimm_post_proc_args[]
Initial value:
= {
[1] = { .dimm_channel = DIMM_CHANNEL_NUM_1, .dimm_number = DIMM_NUMBER_0 },
[2] = { .dimm_channel = DIMM_CHANNEL_NUM_2, .dimm_number = DIMM_NUMBER_0 },
[3] = { .dimm_channel = DIMM_CHANNEL_NUM_3, .dimm_number = DIMM_NUMBER_0 },
[4] = { .dimm_channel = DIMM_CHANNEL_NUM_4, .dimm_number = DIMM_NUMBER_0 },
[5] = { .dimm_channel = DIMM_CHANNEL_NUM_5, .dimm_number = DIMM_NUMBER_0 },
[6] = { .dimm_channel = DIMM_CHANNEL_NUM_6, .dimm_number = DIMM_NUMBER_0 },
[7] = { .dimm_channel = DIMM_CHANNEL_NUM_7, .dimm_number = DIMM_NUMBER_0 },
}
@ DIMM_CHANNEL_NUM_3
Definition: intel_dimm.h:49
@ DIMM_CHANNEL_NUM_6
Definition: intel_dimm.h:52
@ DIMM_CHANNEL_NUM_5
Definition: intel_dimm.h:51
@ DIMM_CHANNEL_NUM_7
Definition: intel_dimm.h:53
@ DIMM_CHANNEL_NUM_4
Definition: intel_dimm.h:50
@ DIMM_CHANNEL_NUM_1
Definition: intel_dimm.h:47
@ DIMM_CHANNEL_NUM_2
Definition: intel_dimm.h:48
@ DIMM_NUMBER_0
Definition: intel_dimm.h:57

◆ mp2985_init_args

mp2985_init_arg mp2985_init_args[] = { [0] = { .is_init = false } }

◆ mp5990_init_args

mp5990_init_arg mp5990_init_args[]
Initial value:
= { [0] = { .is_init = false,
.iout_cal_gain = 0x01B3,
.iout_oc_fault_limit = 0x0050,
.ocw_sc_ref = 0x0AE0 },
[1] = { .is_init = false,
.iout_cal_gain = 0x021A,
.iout_oc_fault_limit = 0x0058,
.ocw_sc_ref = 0x0AE0 } }

◆ mux_conf_addr_0xe2

struct tca9548 mux_conf_addr_0xe2[8]
Initial value:
= {
[0] = { .addr = 0xe2, .chan = 0 }, [1] = { .addr = 0xe2, .chan = 1 },
[2] = { .addr = 0xe2, .chan = 2 }, [3] = { .addr = 0xe2, .chan = 3 },
[4] = { .addr = 0xe2, .chan = 4 }, [5] = { .addr = 0xe2, .chan = 5 },
[6] = { .addr = 0xe2, .chan = 6 }, [7] = { .addr = 0xe2, .chan = 7 },
}

◆ xdpe15284_pre_read_args

xdpe15284_pre_read_arg xdpe15284_pre_read_args[]
Initial value:
= {
[0] = { 0x0 },
[1] = { 0x1 },
}