coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
i2c.c File Reference
#include <assert.h>
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/mmio.h>
#include <soc/addressmap.h>
#include <soc/i2c.h>
Include dependency graph for i2c.c:

Go to the source code of this file.

Macros

#define I2CTAG   "[I2C][PL] "
 
#define I2CLOG(fmt, arg...)
 
#define I2CERR(fmt, arg...)   printk(BIOS_ERR, I2CTAG fmt, ##arg)
 

Functions

 _Static_assert (ARRAY_SIZE(mtk_i2c_bus_controller)==I2C_BUS_NUMBER, "Wrong size of mtk_i2c_bus_controller")
 
void mtk_i2c_bus_init (uint8_t bus)
 

Variables

struct mtk_i2c mtk_i2c_bus_controller [7]
 

Macro Definition Documentation

◆ I2CERR

#define I2CERR (   fmt,
  arg... 
)    printk(BIOS_ERR, I2CTAG fmt, ##arg)

Definition at line 63 of file i2c.c.

◆ I2CLOG

#define I2CLOG (   fmt,
  arg... 
)

Definition at line 60 of file i2c.c.

◆ I2CTAG

#define I2CTAG   "[I2C][PL] "

Definition at line 55 of file i2c.c.

Function Documentation

◆ _Static_assert()

_Static_assert ( ARRAY_SIZE(mtk_i2c_bus_controller = =I2C_BUS_NUMBER,
"Wrong size of mtk_i2c_bus_controller  
)

◆ mtk_i2c_bus_init()

void mtk_i2c_bus_init ( uint8_t  bus)

Definition at line 65 of file i2c.c.

References ARRAY_SIZE, assert, DIV_ROUND_UP, I2C_CLK_HZ, KHz, mtk_i2c_bus_controller, and write32().

Referenced by bootblock_mainboard_init(), configure_audio(), configure_display(), configure_ext_buck(), get_panel_description(), mtk_msdc_configure_sdcard(), platform_romstage_main(), read_edid_from_ps8640(), and wfc_id().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ mtk_i2c_bus_controller