coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
Go to the source code of this file.
Data Structures | |
struct | software_i2c_ops |
Macros | |
#define | SOFTWARE_I2C_MAX_BUS 10 /* increase as necessary */ |
Functions | |
int | platform_i2c_transfer (unsigned int bus, struct i2c_msg *segments, int count) |
int | software_i2c_transfer (unsigned int bus, struct i2c_msg *segments, int count) |
void | software_i2c_wedge_ack (unsigned int bus, u8 slave) |
void | software_i2c_wedge_read (unsigned int bus, u8 slave, u8 reg, int bit_count) |
void | software_i2c_wedge_write (unsigned int bus, u8 slave, u8 reg, int bit_count) |
int | i2c_read_field (unsigned int bus, uint8_t slave, uint8_t reg, uint8_t *data, uint8_t mask, uint8_t shift) |
int | i2c_write_field (unsigned int bus, uint8_t slave, uint8_t reg, uint8_t data, uint8_t mask, uint8_t shift) |
static int | i2c_transfer (unsigned int bus, struct i2c_msg *segments, int count) |
static int | i2c_read_raw (unsigned int bus, uint8_t slave, uint8_t *data, int len) |
static int | i2c_write_raw (unsigned int bus, uint8_t slave, uint8_t *data, int len) |
static int | i2c_read_bytes (unsigned int bus, uint8_t slave, uint8_t reg, uint8_t *data, int len) |
Read multi-bytes with two segments in one frame. More... | |
static int | i2c_readb (unsigned int bus, uint8_t slave, uint8_t reg, uint8_t *data) |
Read a byte with two segments in one frame. More... | |
static int | i2c_writeb (unsigned int bus, uint8_t slave, uint8_t reg, uint8_t data) |
Write a byte with one segment in one frame. More... | |
static int | i2c_2ba_read_bytes (unsigned int bus, uint8_t slave, uint16_t offset, uint8_t *data, int len) |
Read multi-bytes from an I2C device with two bytes register address/offset with two segments in one frame. More... | |
Variables | |
struct software_i2c_ops * | software_i2c [] |
#define SOFTWARE_I2C_MAX_BUS 10 /* increase as necessary */ |
Definition at line 13 of file i2c_simple.h.
|
inlinestatic |
Read multi-bytes from an I2C device with two bytes register address/offset with two segments in one frame.
[start][slave addr][w][register high addr][register low addr] [start][slave addr][r][data...][stop]
Definition at line 152 of file i2c_simple.h.
References ARRAY_SIZE, i2c_msg::buf, i2c_msg::flags, I2C_M_RD, i2c_transfer(), i2c_msg::len, offset, slave, and i2c_msg::slave.
Referenced by get_ddi1_type().
|
inlinestatic |
Read multi-bytes with two segments in one frame.
[start][slave addr][w][register addr][start][slave addr][r][data...][stop]
Definition at line 87 of file i2c_simple.h.
References ARRAY_SIZE, i2c_msg::buf, i2c_msg::flags, I2C_M_RD, i2c_transfer(), i2c_msg::len, slave, and i2c_msg::slave.
Referenced by anx7625_reg_block_read(), ast_software_i2c_read(), mt6360_i2c_read_byte(), and ps8640_get_edid().
int i2c_read_field | ( | unsigned int | bus, |
uint8_t | slave, | ||
uint8_t | reg, | ||
uint8_t * | data, | ||
uint8_t | mask, | ||
uint8_t | shift | ||
) |
Definition at line 6 of file i2c.c.
References buf, chip, i2c_readb(), and mask.
Referenced by da9212_probe(), get_mt6311_chip_id(), get_mt6691_chip_id(), mt6311_hw_init(), and mt6691_get_voltage().
Definition at line 57 of file i2c_simple.h.
References i2c_msg::flags, I2C_M_RD, i2c_transfer(), i2c_msg::len, and slave.
Referenced by cr50_i2c_read(), google_chromeec_command(), iic_tpm_read(), and tis_sendrecv().
Read a byte with two segments in one frame.
[start][slave addr][w][register addr][start][slave addr][r][data][stop]
Definition at line 109 of file i2c_simple.h.
References ARRAY_SIZE, i2c_msg::buf, i2c_msg::flags, I2C_M_RD, i2c_transfer(), i2c_msg::len, slave, and i2c_msg::slave.
Referenced by anx7625_reg_read(), as3722_read(), i2c_read_field(), i2c_write_field(), max77686_i2c_read(), ps8640_bridge_aux_request(), reg_read(), rk808_read(), setup_power(), sn65dsi86_bridge_link_training(), tps65090_i2c_read(), and tps65913_read().
Definition at line 42 of file i2c_simple.h.
References CONFIG, count, platform_i2c_transfer(), software_i2c, SOFTWARE_I2C_MAX_BUS, and software_i2c_transfer().
Referenced by bdk_twsix_read_ia(), eeprom_random_read(), i2c_2ba_read_bytes(), i2c_read_bytes(), i2c_read_raw(), i2c_readb(), i2c_write_raw(), i2c_writeb(), iic_tpm_read(), and ledc_transfer().
int i2c_write_field | ( | unsigned int | bus, |
uint8_t | slave, | ||
uint8_t | reg, | ||
uint8_t | data, | ||
uint8_t | mask, | ||
uint8_t | shift | ||
) |
Definition at line 20 of file i2c.c.
References buf, chip, i2c_readb(), i2c_writeb(), and mask.
Referenced by da9212_hw_init(), da9212_probe(), mt6311_hw_init(), mt6691_probe(), mt6691_set_voltage(), ps8640_bridge_aux_request(), sn65dsi86_bridge_assr_config(), sn65dsi86_bridge_configure(), sn65dsi86_bridge_dp_lane_config(), sn65dsi86_bridge_init(), and sn65dsi86_bridge_set_dp_clock_range().
Definition at line 72 of file i2c_simple.h.
References i2c_msg::flags, i2c_transfer(), i2c_msg::len, and slave.
Referenced by cr50_i2c_read(), cr50_i2c_write(), google_chromeec_command(), iic_tpm_read(), iic_tpm_write_generic(), mt6360_i2c_write_byte(), and tis_sendrecv().
Write a byte with one segment in one frame.
[start][slave addr][w][register addr][data][stop]
Definition at line 131 of file i2c_simple.h.
References ARRAY_SIZE, i2c_msg::buf, buf, i2c_msg::flags, i2c_transfer(), i2c_msg::len, slave, and i2c_msg::slave.
Referenced by anx7625_reg_write(), as3722_write(), i2c_access_workaround(), i2c_write_field(), ioexpander_init(), max77686_i2c_write(), parade_ps8625_bridge_setup(), pmic_write_reg(), ps8640_bridge_aux_request(), ps8640_get_edid(), rk808_write(), setup_power(), sn65dsi86_bridge_configure(), sn65dsi86_bridge_link_training(), sn65dsi86_bridge_set_bridge_active_timing(), sn65dsi86_bridge_set_dsi_clock_range(), tps65090_i2c_write(), and tps65913_write().
Definition at line 484 of file dw_i2c.c.
References ASSERT, BIOS_ERR, BIOS_SPEW, i2c_msg::buf, buf, chip, CONFIG, count, i2c_msg::flags, get_i2c_address(), hsi2c_transfer(), i2c_busses, i2c_disable(), i2c_do_xfer(), i2c_init(), I2C_M_RD, i2c_read(), I2C_READ_MODE, i2c_recv_buf(), i2c_send_start(), i2c_send_stop(), I2C_TIMEOUT_US, i2c_transfer_segment(), i2c_wait_for_idle(), i2c_write(), I2C_WRITE_MODE, I2C_WRITE_READ_MODE, i2c_xmit_buf(), I2cStatEnable, I2cStatMasterXmit, 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_bus::is_highspeed, i2c_msg::len, length, MIO_TWSx_PF_BAR0, mtk_i2c_should_combine(), mtk_i2c_transfer(), NULL, num_i2c_buses, platform_i2c_read(), platform_i2c_write(), printk, qup_set_state(), QUP_STATE_RESET, s3c24x0_i2c_bus::regs, i2c_bus::regs, regs, slave, i2c_msg::slave, stopwatch_expired(), stopwatch_init_usecs_expire(), twsi_read_data(), twsi_write_data(), udelay(), and write8().
Referenced by bdk_twsix_write_ia(), and i2c_transfer().
Definition at line 233 of file software_i2c.c.
References i2c_msg::buf, count, i2c_msg::flags, I2C_M_RD, in_byte(), i2c_msg::len, out_byte(), i2c_msg::slave, start_cond(), and stop_cond().
Referenced by i2c_transfer().
Definition at line 261 of file software_i2c.c.
References BIOS_INFO, chip, get_scl(), get_sda(), out_bit(), printk, software_i2c_ops::set_scl, software_i2c_ops::set_sda, software_i2c, start_cond(), wait(), and wait_for_scl().
Definition at line 284 of file software_i2c.c.
References BIOS_INFO, chip, get_scl(), get_sda(), in_bit(), out_byte(), printk, software_i2c_ops::set_scl, software_i2c_ops::set_sda, software_i2c, start_cond(), wait(), and wait_for_scl().
Definition at line 313 of file software_i2c.c.
References BIOS_INFO, chip, get_scl(), get_sda(), out_bit(), out_byte(), printk, software_i2c_ops::set_scl, software_i2c_ops::set_sda, software_i2c, start_cond(), wait(), and wait_for_scl().
|
extern |
Definition at line 24 of file software_i2c.c.
Referenced by __wait(), ast_software_i2c_read(), i2c_transfer(), in_bit(), out_bit(), software_i2c_attach(), software_i2c_detach(), software_i2c_wedge_ack(), software_i2c_wedge_read(), software_i2c_wedge_write(), start_cond(), stop_cond(), tegra_software_i2c_disable(), and tegra_software_i2c_init().