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

Go to the source code of this file.

Macros

#define IOSF_READ(port)    (IOSF_OPCODE(IOSF_OP_READ_##port) | IOSF_PORT(IOSF_PORT_##port))
 
#define IOSF_WRITE(port)    (IOSF_OPCODE(IOSF_OP_WRITE_##port) | IOSF_PORT(IOSF_PORT_##port))
 

Functions

static void write_iosf_reg (int reg, uint32_t value)
 
static uint32_t read_iosf_reg (int reg)
 
static uint32_t iosf_read_port (uint32_t cr, int reg)
 
static void iosf_write_port (uint32_t cr, int reg, uint32_t val)
 
uint32_t iosf_bunit_read (int reg)
 
void iosf_bunit_write (int reg, uint32_t val)
 
uint32_t iosf_punit_read (int reg)
 
void iosf_punit_write (int reg, uint32_t val)
 
uint32_t iosf_score_read (int reg)
 
void iosf_score_write (int reg, uint32_t val)
 
uint32_t iosf_lpss_read (int reg)
 
void iosf_lpss_write (int reg, uint32_t val)
 
uint32_t iosf_port58_read (int reg)
 
void iosf_port58_write (int reg, uint32_t val)
 
uint32_t iosf_scc_read (int reg)
 
void iosf_scc_write (int reg, uint32_t val)
 
uint32_t iosf_usbphy_read (int reg)
 
void iosf_usbphy_write (int reg, uint32_t val)
 

Macro Definition Documentation

◆ IOSF_READ

#define IOSF_READ (   port)     (IOSF_OPCODE(IOSF_OP_READ_##port) | IOSF_PORT(IOSF_PORT_##port))

Definition at line 35 of file iosf.c.

◆ IOSF_WRITE

#define IOSF_WRITE (   port)     (IOSF_OPCODE(IOSF_OP_WRITE_##port) | IOSF_PORT(IOSF_PORT_##port))

Definition at line 37 of file iosf.c.

Function Documentation

◆ iosf_bunit_read()

uint32_t iosf_bunit_read ( int  reg)

Definition at line 40 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Referenced by nc_read_resources(), nc_read_top_of_low_memory(), pre_mp_init(), smm_region(), smm_region_size(), smm_region_start(), soc_after_ram_init(), and ssa_safe_config().

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

◆ iosf_bunit_write()

void iosf_bunit_write ( int  reg,
uint32_t  val 
)

Definition at line 45 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Referenced by pre_mp_init(), soc_after_ram_init(), and ssa_safe_config().

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

◆ iosf_lpss_read()

uint32_t iosf_lpss_read ( int  reg)

Definition at line 70 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_lpss_write()

void iosf_lpss_write ( int  reg,
uint32_t  val 
)

Definition at line 75 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_port58_read()

uint32_t iosf_port58_read ( int  reg)

Definition at line 80 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Referenced by soc_legacy().

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

◆ iosf_port58_write()

void iosf_port58_write ( int  reg,
uint32_t  val 
)

Definition at line 85 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Referenced by soc_legacy().

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

◆ iosf_punit_read()

uint32_t iosf_punit_read ( int  reg)

Definition at line 50 of file iosf.c.

References IOSF_READ, iosf_read_port(), and PMC.

Referenced by punit_init().

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

◆ iosf_punit_write()

void iosf_punit_write ( int  reg,
uint32_t  val 
)

Definition at line 55 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), PMC, and val.

Referenced by punit_init().

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

◆ iosf_read_port()

static uint32_t iosf_read_port ( uint32_t  cr,
int  reg 
)
static

Definition at line 19 of file iosf.c.

References IOSF_BYTE_EN, IOSF_REG, IOSF_REG_UPPER, MCR_REG, MCRX_REG, MDR_REG, read_iosf_reg(), and write_iosf_reg().

Here is the call graph for this function:

◆ iosf_scc_read()

uint32_t iosf_scc_read ( int  reg)

Definition at line 90 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_scc_write()

void iosf_scc_write ( int  reg,
uint32_t  val 
)

Definition at line 95 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_score_read()

uint32_t iosf_score_read ( int  reg)

Definition at line 60 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Referenced by baytrail_init_scc().

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

◆ iosf_score_write()

void iosf_score_write ( int  reg,
uint32_t  val 
)

Definition at line 65 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Referenced by baytrail_init_scc().

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

◆ iosf_usbphy_read()

uint32_t iosf_usbphy_read ( int  reg)

Definition at line 100 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_usbphy_write()

void iosf_usbphy_write ( int  reg,
uint32_t  val 
)

Definition at line 105 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_write_port()

static void iosf_write_port ( uint32_t  cr,
int  reg,
uint32_t  val 
)
static

Definition at line 27 of file iosf.c.

References IOSF_BYTE_EN, IOSF_REG, IOSF_REG_UPPER, MCR_REG, MCRX_REG, MDR_REG, val, and write_iosf_reg().

Here is the call graph for this function:

◆ read_iosf_reg()

static uint32_t read_iosf_reg ( int  reg)
inlinestatic

Definition at line 13 of file iosf.c.

References IOSF_PCI_DEV, and pci_s_read_config32().

Referenced by iosf_read_port().

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

◆ write_iosf_reg()

static void write_iosf_reg ( int  reg,
uint32_t  value 
)
inlinestatic

Definition at line 8 of file iosf.c.

References IOSF_PCI_DEV, pci_s_write_config32(), and value.

Referenced by iosf_read_port(), and iosf_write_port().

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