coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smbus_ops.c File Reference
#include <device/device.h>
#include <device/path.h>
#include <device/smbus.h>
#include <device/pci.h>
#include <device/pci_def.h>
#include <device/pci_ids.h>
#include <device/smbus_host.h>
#include <southbridge/intel/common/smbus_ops.h>
Include dependency graph for smbus_ops.c:

Go to the source code of this file.

Functions

static int lsmbus_read_byte (struct device *dev, u8 address)
 
static int lsmbus_write_byte (struct device *dev, u8 address, u8 data)
 
static int lsmbus_block_write (struct device *dev, u8 cmd, u8 bytes, const u8 *buf)
 
static int lsmbus_block_read (struct device *dev, u8 cmd, u8 bytes, u8 *buf)
 
void smbus_read_resources (struct device *dev)
 

Variables

struct smbus_bus_operations lops_smbus_bus
 

Function Documentation

◆ lsmbus_block_read()

static int lsmbus_block_read ( struct device dev,
u8  cmd,
u8  bytes,
u8 buf 
)
static

Definition at line 49 of file smbus_ops.c.

◆ lsmbus_block_write()

static int lsmbus_block_write ( struct device dev,
u8  cmd,
u8  bytes,
const u8 buf 
)
static

Definition at line 37 of file smbus_ops.c.

References resource::base, buf, bus::dev, i2c_path::device, device, do_smbus_block_write(), find_resource(), get_pbus_smbus(), device_path::i2c, device::path, and PCI_BASE_ADDRESS_4.

Here is the call graph for this function:

◆ lsmbus_read_byte()

static int lsmbus_read_byte ( struct device dev,
u8  address 
)
static

Definition at line 12 of file smbus_ops.c.

References address, resource::base, bus::dev, i2c_path::device, device, do_smbus_read_byte(), find_resource(), get_pbus_smbus(), device_path::i2c, device::path, and PCI_BASE_ADDRESS_4.

Here is the call graph for this function:

◆ lsmbus_write_byte()

static int lsmbus_write_byte ( struct device dev,
u8  address,
u8  data 
)
static

Definition at line 25 of file smbus_ops.c.

References address, resource::base, bus::dev, i2c_path::device, device, do_smbus_write_byte(), find_resource(), get_pbus_smbus(), device_path::i2c, device::path, and PCI_BASE_ADDRESS_4.

Here is the call graph for this function:

◆ smbus_read_resources()

void smbus_read_resources ( struct device dev)

Variable Documentation

◆ lops_smbus_bus

struct smbus_bus_operations lops_smbus_bus
Initial value:
= {
.read_byte = lsmbus_read_byte,
.write_byte = lsmbus_write_byte,
.block_read = lsmbus_block_read,
.block_write = lsmbus_block_write,
}
static int lsmbus_block_write(struct device *dev, u8 cmd, u8 bytes, const u8 *buf)
Definition: smbus_ops.c:37
static int lsmbus_block_read(struct device *dev, u8 cmd, u8 bytes, u8 *buf)
Definition: smbus_ops.c:49
static int lsmbus_write_byte(struct device *dev, u8 address, u8 data)
Definition: smbus_ops.c:25
static int lsmbus_read_byte(struct device *dev, u8 address)
Definition: smbus_ops.c:12

Definition at line 49 of file smbus_ops.c.