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 <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)
 
uint32_t iosf_read_port (uint32_t cr, int reg)
 
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_dunit_read (int reg)
 
uint32_t iosf_dunit_ch0_read (int reg)
 
uint32_t iosf_dunit_ch1_read (int reg)
 
void iosf_dunit_write (int reg, uint32_t val)
 
uint32_t iosf_cunit_read (int reg)
 
void iosf_cunit_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_usbphy_read (int reg)
 
void iosf_usbphy_write (int reg, uint32_t val)
 
uint32_t iosf_ushphy_read (int reg)
 
void iosf_ushphy_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_ccu_read (int reg)
 
void iosf_ccu_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_scc_read (int reg)
 
void iosf_scc_write (int reg, uint32_t val)
 
uint32_t iosf_aunit_read (int reg)
 
void iosf_aunit_write (int reg, uint32_t val)
 
uint32_t iosf_cpu_bus_read (int reg)
 
void iosf_cpu_bus_write (int reg, uint32_t val)
 
uint32_t iosf_sec_read (int reg)
 
void iosf_sec_write (int reg, uint32_t val)
 
uint32_t iosf_port45_read (int reg)
 
void iosf_port45_write (int reg, uint32_t val)
 
uint32_t iosf_port46_read (int reg)
 
void iosf_port46_write (int reg, uint32_t val)
 
uint32_t iosf_port47_read (int reg)
 
void iosf_port47_write (int reg, uint32_t val)
 
uint32_t iosf_port55_read (int reg)
 
void iosf_port55_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_port59_read (int reg)
 
void iosf_port59_write (int reg, uint32_t val)
 
uint32_t iosf_port5a_read (int reg)
 
void iosf_port5a_write (int reg, uint32_t val)
 
uint32_t iosf_porta2_read (int reg)
 
void iosf_porta2_write (int reg, uint32_t val)
 
uint32_t iosf_ssus_read (int reg)
 
void iosf_ssus_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 34 of file iosf.c.

◆ IOSF_WRITE

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

Definition at line 36 of file iosf.c.

Function Documentation

◆ iosf_aunit_read()

uint32_t iosf_aunit_read ( int  reg)

Definition at line 151 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Referenced by ssa_safe_config().

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

◆ iosf_aunit_write()

void iosf_aunit_write ( int  reg,
uint32_t  val 
)

Definition at line 156 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Referenced by ssa_safe_config().

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

◆ iosf_bunit_read()

uint32_t iosf_bunit_read ( int  reg)

Definition at line 39 of file iosf.c.

◆ iosf_bunit_write()

void iosf_bunit_write ( int  reg,
uint32_t  val 
)

Definition at line 44 of file iosf.c.

◆ iosf_ccu_read()

uint32_t iosf_ccu_read ( int  reg)

Definition at line 121 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_ccu_write()

void iosf_ccu_write ( int  reg,
uint32_t  val 
)

Definition at line 126 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_cpu_bus_read()

uint32_t iosf_cpu_bus_read ( int  reg)

Definition at line 161 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Referenced by ssa_safe_config().

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

◆ iosf_cpu_bus_write()

void iosf_cpu_bus_write ( int  reg,
uint32_t  val 
)

Definition at line 166 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Referenced by ssa_safe_config().

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

◆ iosf_cunit_read()

uint32_t iosf_cunit_read ( int  reg)

Definition at line 71 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Referenced by ssa_safe_config().

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

◆ iosf_cunit_write()

void iosf_cunit_write ( int  reg,
uint32_t  val 
)

Definition at line 76 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Referenced by ssa_safe_config().

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

◆ iosf_dunit_ch0_read()

uint32_t iosf_dunit_ch0_read ( int  reg)

Definition at line 54 of file iosf.c.

References iosf_dunit_read().

Referenced by print_dram_info().

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

◆ iosf_dunit_ch1_read()

uint32_t iosf_dunit_ch1_read ( int  reg)

Definition at line 59 of file iosf.c.

References IOSF_OP_READ_SYSMEMC, IOSF_OPCODE, IOSF_PORT, IOSF_PORT_DUNIT_CH1, and iosf_read_port().

Referenced by print_dram_info().

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

◆ iosf_dunit_read()

uint32_t iosf_dunit_read ( int  reg)

Definition at line 49 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Referenced by baytrail_enable_2x_refresh_rate(), iosf_dunit_ch0_read(), and print_dram_info().

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

◆ iosf_dunit_write()

void iosf_dunit_write ( int  reg,
uint32_t  val 
)

Definition at line 66 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Referenced by baytrail_enable_2x_refresh_rate().

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 111 of file iosf.c.

◆ iosf_lpss_write()

void iosf_lpss_write ( int  reg,
uint32_t  val 
)

Definition at line 116 of file iosf.c.

◆ iosf_port45_read()

uint32_t iosf_port45_read ( int  reg)

Definition at line 181 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_port45_write()

void iosf_port45_write ( int  reg,
uint32_t  val 
)

Definition at line 186 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_port46_read()

uint32_t iosf_port46_read ( int  reg)

Definition at line 191 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_port46_write()

void iosf_port46_write ( int  reg,
uint32_t  val 
)

Definition at line 196 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_port47_read()

uint32_t iosf_port47_read ( int  reg)

Definition at line 201 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_port47_write()

void iosf_port47_write ( int  reg,
uint32_t  val 
)

Definition at line 206 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_port55_read()

uint32_t iosf_port55_read ( int  reg)

Definition at line 211 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_port55_write()

void iosf_port55_write ( int  reg,
uint32_t  val 
)

Definition at line 216 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 221 of file iosf.c.

◆ iosf_port58_write()

void iosf_port58_write ( int  reg,
uint32_t  val 
)

Definition at line 226 of file iosf.c.

◆ iosf_port59_read()

uint32_t iosf_port59_read ( int  reg)

Definition at line 231 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_port59_write()

void iosf_port59_write ( int  reg,
uint32_t  val 
)

Definition at line 236 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_port5a_read()

uint32_t iosf_port5a_read ( int  reg)

Definition at line 241 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_port5a_write()

void iosf_port5a_write ( int  reg,
uint32_t  val 
)

Definition at line 246 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_porta2_read()

uint32_t iosf_porta2_read ( int  reg)

Definition at line 251 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_porta2_write()

void iosf_porta2_write ( int  reg,
uint32_t  val 
)

Definition at line 256 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_punit_read()

uint32_t iosf_punit_read ( int  reg)

Definition at line 81 of file iosf.c.

◆ iosf_punit_write()

void iosf_punit_write ( int  reg,
uint32_t  val 
)

Definition at line 86 of file iosf.c.

◆ iosf_read_port()

◆ iosf_scc_read()

uint32_t iosf_scc_read ( int  reg)

Definition at line 141 of file iosf.c.

◆ iosf_scc_write()

void iosf_scc_write ( int  reg,
uint32_t  val 
)

Definition at line 146 of file iosf.c.

◆ iosf_score_read()

uint32_t iosf_score_read ( int  reg)

Definition at line 131 of file iosf.c.

◆ iosf_score_write()

void iosf_score_write ( int  reg,
uint32_t  val 
)

Definition at line 136 of file iosf.c.

◆ iosf_sec_read()

uint32_t iosf_sec_read ( int  reg)

Definition at line 171 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_sec_write()

void iosf_sec_write ( int  reg,
uint32_t  val 
)

Definition at line 176 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_ssus_read()

uint32_t iosf_ssus_read ( int  reg)

Definition at line 261 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_ssus_write()

void iosf_ssus_write ( int  reg,
uint32_t  val 
)

Definition at line 266 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_usbphy_read()

uint32_t iosf_usbphy_read ( int  reg)

Definition at line 91 of file iosf.c.

◆ iosf_usbphy_write()

void iosf_usbphy_write ( int  reg,
uint32_t  val 
)

Definition at line 96 of file iosf.c.

◆ iosf_ushphy_read()

uint32_t iosf_ushphy_read ( int  reg)

Definition at line 101 of file iosf.c.

References IOSF_READ, and iosf_read_port().

Here is the call graph for this function:

◆ iosf_ushphy_write()

void iosf_ushphy_write ( int  reg,
uint32_t  val 
)

Definition at line 106 of file iosf.c.

References IOSF_WRITE, iosf_write_port(), and val.

Here is the call graph for this function:

◆ iosf_write_port()

◆ read_iosf_reg()

static uint32_t read_iosf_reg ( int  reg)
inlinestatic

Definition at line 12 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 7 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: