![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <assert.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <device/i2c_simple.h>
#include <device/pci.h>
#include <soc/i2c.h>
#include <soc/ramstage.h>
#include <soc/reg_access.h>
#include <timer.h>
Go to the source code of this file.
Functions | |
static void | i2c_disable (I2C_REGS *regs) |
static int | platform_i2c_write (uint32_t restart, uint8_t *tx_buffer, int length, uint32_t stop, uint8_t *rx_buffer, struct stopwatch *timeout) |
static int | platform_i2c_read (uint32_t restart, uint8_t *rx_buffer, int length, uint32_t stop, struct stopwatch *timeout) |
int | platform_i2c_transfer (unsigned int bus, struct i2c_msg *segment, int seg_count) |
Definition at line 15 of file i2c.c.
References die_with_post_code, IC_ENABLE_CONTROLLER, POST_HW_INIT_FAILURE, and udelay().
Referenced by platform_i2c_read(), platform_i2c_transfer(), and platform_i2c_write().
|
static |
Definition at line 103 of file i2c.c.
References ASSERT, BIOS_ERR, CONFIG, get_i2c_address(), i2c_disable(), IC_DATA_CMD_READ, IC_INTR_RX_OVER, IC_INTR_RX_UNDER, IC_INTR_TX_ABRT, IC_INTR_TX_OVER, IC_STATUS_RFNE, IC_STATUS_TFNF, length, MIN, NULL, printk, regs, stopwatch_expired(), udelay(), and void().
Referenced by platform_i2c_transfer().
Definition at line 176 of file i2c.c.
References ASSERT, BIOS_ERR, i2c_msg::buf, buf, chip, CONFIG, i2c_msg::flags, get_i2c_address(), i2c_disable(), I2C_M_RD, IC_CON_10B, IC_CON_7B, IC_CON_MASTER_MODE, IC_CON_RESTART_EN, IC_CON_SPEED, IC_CON_SPEED_400_KHz, IC_DATA_CMD_RESTART, IC_DATA_CMD_STOP, IC_ENABLE_CONTROLLER, IC_INTR_RX_OVER, IC_INTR_RX_UNDER, IC_INTR_STOP_DET, IC_INTR_TX_ABRT, IC_INTR_TX_OVER, IC_STATUS_RFNE, i2c_msg::len, length, NULL, platform_i2c_read(), platform_i2c_write(), printk, regs, slave, i2c_msg::slave, stopwatch_expired(), stopwatch_init_usecs_expire(), and udelay().
|
static |
Definition at line 38 of file i2c.c.
References ASSERT, BIOS_ERR, CONFIG, get_i2c_address(), i2c_disable(), IC_DATA_CMD_WRITE, IC_INTR_RX_OVER, IC_INTR_RX_UNDER, IC_INTR_TX_ABRT, IC_INTR_TX_OVER, IC_STATUS_RFNE, IC_STATUS_TFNF, length, NULL, printk, regs, stopwatch_expired(), and udelay().
Referenced by platform_i2c_transfer().