coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smbus.c File Reference
#include <arch/io.h>
#include <stdint.h>
#include "smbus.h"
#include <console/console.h>
Include dependency graph for smbus.c:

Go to the source code of this file.

Functions

static int smbus_wait_until_ready (u32 smbus_io_base)
 
static int smbus_wait_until_done (u32 smbus_io_base)
 
int do_smbus_recv_byte (u32 smbus_io_base, u32 device)
 
int do_smbus_send_byte (u32 smbus_io_base, u32 device, u8 val)
 
int do_smbus_read_byte (u32 smbus_io_base, u32 device, u32 address)
 
int do_smbus_write_byte (u32 smbus_io_base, u32 device, u32 address, u8 val)
 
void alink_ab_indx (u32 reg_space, u32 reg_addr, u32 mask, u32 val)
 
void alink_rc_indx (u32 reg_space, u32 reg_addr, u32 port, u32 mask, u32 val)
 
void alink_ax_indx (u32 space, u32 axindc, u32 mask, u32 val)
 

Function Documentation

◆ alink_ab_indx()

void alink_ab_indx ( u32  reg_space,
u32  reg_addr,
u32  mask,
u32  val 
)

Definition at line 174 of file smbus.c.

References AB_DATA, AB_INDX, BIOS_DEBUG, inl(), mask, outl(), printk, and val.

Here is the call graph for this function:

◆ alink_ax_indx()

void alink_ax_indx ( u32  space,
u32  axindc,
u32  mask,
u32  val 
)

Definition at line 223 of file smbus.c.

References AB_DATA, AB_INDX, BIOS_DEBUG, inl(), mask, outl(), printk, and val.

Here is the call graph for this function:

◆ alink_rc_indx()

void alink_rc_indx ( u32  reg_space,
u32  reg_addr,
u32  port,
u32  mask,
u32  val 
)

Definition at line 197 of file smbus.c.

References AB_DATA, AB_INDX, BIOS_DEBUG, inl(), mask, outl(), printk, and val.

Here is the call graph for this function:

◆ do_smbus_read_byte()

int do_smbus_read_byte ( u32  smbus_io_base,
u32  device,
u32  address 
)

Definition at line 108 of file smbus.c.

References address, BIOS_DEBUG, inb(), outb(), printk, SMBHSTADDR, SMBHSTCMD, SMBHSTCTRL, SMBHSTDAT0, smbus_wait_until_done(), and smbus_wait_until_ready().

Here is the call graph for this function:

◆ do_smbus_recv_byte()

int do_smbus_recv_byte ( u32  smbus_io_base,
u32  device 
)

Definition at line 48 of file smbus.c.

References BIOS_DEBUG, inb(), outb(), printk, SMBHSTADDR, SMBHSTCMD, SMBHSTCTRL, smbus_wait_until_done(), and smbus_wait_until_ready().

Here is the call graph for this function:

◆ do_smbus_send_byte()

int do_smbus_send_byte ( u32  smbus_io_base,
u32  device,
u8  val 
)

Definition at line 78 of file smbus.c.

References BIOS_DEBUG, inb(), outb(), printk, SMBHSTADDR, SMBHSTCMD, SMBHSTCTRL, smbus_wait_until_done(), smbus_wait_until_ready(), and val.

Here is the call graph for this function:

◆ do_smbus_write_byte()

int do_smbus_write_byte ( u32  smbus_io_base,
u32  device,
u32  address,
u8  val 
)

Definition at line 141 of file smbus.c.

References address, BIOS_DEBUG, inb(), outb(), printk, SMBHSTADDR, SMBHSTCMD, SMBHSTCTRL, SMBHSTDAT0, smbus_wait_until_done(), smbus_wait_until_ready(), and val.

Here is the call graph for this function:

◆ smbus_wait_until_done()

static int smbus_wait_until_done ( u32  smbus_io_base)
static

Definition at line 26 of file smbus.c.

References inb(), outb(), SMBHSTSTAT, SMBUS_TIMEOUT, and val.

Referenced by do_smbus_read_byte(), do_smbus_recv_byte(), do_smbus_send_byte(), and do_smbus_write_byte().

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

◆ smbus_wait_until_ready()

static int smbus_wait_until_ready ( u32  smbus_io_base)
static

Definition at line 8 of file smbus.c.

References inb(), outb(), SMBHSTSTAT, SMBUS_TIMEOUT, and val.

Referenced by do_smbus_read_byte(), do_smbus_recv_byte(), do_smbus_send_byte(), and do_smbus_write_byte().

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