coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
i2c.c File Reference
#include <amdblocks/i2c.h>
#include <console/console.h>
#include <soc/i2c.h>
#include <soc/southbridge.h>
#include "chip.h"
Include dependency graph for i2c.c:

Go to the source code of this file.

Functions

void i2c_set_bar (unsigned int bus, uintptr_t bar)
 
void soc_i2c_misc_init (unsigned int bus, const struct dw_i2c_bus_config *cfg)
 
const struct soc_i2c_ctrlr_infosoc_get_i2c_ctrlr_info (size_t *num_ctrlrs)
 
const struct dw_i2c_bus_configsoc_get_i2c_bus_config (size_t *num_buses)
 

Variables

static struct soc_i2c_ctrlr_info i2c_ctrlr [I2C_CTRLR_COUNT]
 

Function Documentation

◆ i2c_set_bar()

void i2c_set_bar ( unsigned int  bus,
uintptr_t  bar 
)

Definition at line 24 of file i2c.c.

References ARRAY_SIZE, soc_i2c_ctrlr_info::bar, BIOS_ERR, i2c_ctrlr, and printk.

◆ soc_get_i2c_bus_config()

const struct dw_i2c_bus_config* soc_get_i2c_bus_config ( size_t num_buses)

Definition at line 51 of file i2c.c.

References ARRAY_SIZE, config, and config_of_soc.

◆ soc_get_i2c_ctrlr_info()

const struct soc_i2c_ctrlr_info* soc_get_i2c_ctrlr_info ( size_t num_ctrlrs)

Definition at line 45 of file i2c.c.

References ARRAY_SIZE, and i2c_ctrlr.

◆ soc_i2c_misc_init()

void soc_i2c_misc_init ( unsigned int  bus,
const struct dw_i2c_bus_config cfg 
)

Definition at line 35 of file i2c.c.

References ARRAY_SIZE, config, config_of_soc, fch_i23c_pad_init(), and dw_i2c_bus_config::speed.

Here is the call graph for this function:

Variable Documentation

◆ i2c_ctrlr

struct soc_i2c_ctrlr_info i2c_ctrlr[I2C_CTRLR_COUNT]
static
Initial value:
= {
{ I2C_MASTER_MODE, 0, "" },
{ I2C_MASTER_MODE, 0, "" },
{ I2C_MASTER_MODE, 0, "" },
{ I2C_MASTER_MODE, 0, "" }
}
@ I2C_MASTER_MODE
Definition: i2c.h:13

Definition at line 1 of file i2c.c.

Referenced by i2c_set_bar(), and soc_get_i2c_ctrlr_info().