coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smbus.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SMBHSTSTAT   0x0
 
#define SMBHST_STAT_FAILED   (1 << 4)
 
#define SMBHST_STAT_COLLISION   (1 << 3)
 
#define SMBHST_STAT_ERROR   (1 << 2)
 
#define SMBHST_STAT_INTERRUPT   (1 << 1)
 
#define SMBHST_STAT_BUSY   (1 << 0)
 
#define SMBHST_STAT_CLEAR   0xff
 
#define SMBHST_STAT_VAL_BITS   0x1f
 
#define SMBHST_STAT_ERROR_BITS   0x1c
 
#define SMBSLVSTAT   0x1
 
#define SMBSLV_STAT_ALERT   (1 << 5)
 
#define SMBSLV_STAT_SHADOW2   (1 << 4)
 
#define SMBSLV_STAT_SHADOW1   (1 << 3)
 
#define SMBSLV_STAT_SLV_STS   (1 << 2)
 
#define SMBSLV_STAT_SLV_INIT   (1 << 1)
 
#define SMBSLV_STAT_SLV_BUSY   (1 << 0)
 
#define SMBSLV_STAT_CLEAR   0x1f
 
#define SMBHSTCTRL   0x2
 
#define SMBHST_CTRL_RST   (1 << 7)
 
#define SMBHST_CTRL_STRT   (1 << 6)
 
#define SMBHST_CTRL_QCK_RW   (0x0 << 2)
 
#define SMBHST_CTRL_BTE_RW   (0x1 << 2)
 
#define SMBHST_CTRL_BDT_RW   (0x2 << 2)
 
#define SMBHST_CTRL_WDT_RW   (0x3 << 2)
 
#define SMBHST_CTRL_BLK_RW   (0x5 << 2)
 
#define SMBHST_CTRL_MODE_BITS   (0x7 << 2)
 
#define SMBHST_CTRL_KILL   (1 << 1)
 
#define SMBHST_CTRL_IEN   (1 << 0)
 
#define SMBHSTCMD   0x3
 
#define SMBHSTADDR   0x4
 
#define SMBHSTDAT0   0x5
 
#define SMBHSTDAT1   0x6
 
#define SMBHSTBLKDAT   0x7
 
#define SMBSLVCTRL   0x8
 
#define SMBSLVCMD_SHADOW   0x9
 
#define SMBSLVEVT   0xa
 
#define SMBSLVDAT   0xc
 
#define SMBTIMING   0xe
 

Functions

void fch_smbus_init (void)
 

Macro Definition Documentation

◆ SMBHST_CTRL_BDT_RW

#define SMBHST_CTRL_BDT_RW   (0x2 << 2)

Definition at line 31 of file smbus.h.

◆ SMBHST_CTRL_BLK_RW

#define SMBHST_CTRL_BLK_RW   (0x5 << 2)

Definition at line 33 of file smbus.h.

◆ SMBHST_CTRL_BTE_RW

#define SMBHST_CTRL_BTE_RW   (0x1 << 2)

Definition at line 30 of file smbus.h.

◆ SMBHST_CTRL_IEN

#define SMBHST_CTRL_IEN   (1 << 0)

Definition at line 36 of file smbus.h.

◆ SMBHST_CTRL_KILL

#define SMBHST_CTRL_KILL   (1 << 1)

Definition at line 35 of file smbus.h.

◆ SMBHST_CTRL_MODE_BITS

#define SMBHST_CTRL_MODE_BITS   (0x7 << 2)

Definition at line 34 of file smbus.h.

◆ SMBHST_CTRL_QCK_RW

#define SMBHST_CTRL_QCK_RW   (0x0 << 2)

Definition at line 29 of file smbus.h.

◆ SMBHST_CTRL_RST

#define SMBHST_CTRL_RST   (1 << 7)

Definition at line 27 of file smbus.h.

◆ SMBHST_CTRL_STRT

#define SMBHST_CTRL_STRT   (1 << 6)

Definition at line 28 of file smbus.h.

◆ SMBHST_CTRL_WDT_RW

#define SMBHST_CTRL_WDT_RW   (0x3 << 2)

Definition at line 32 of file smbus.h.

◆ SMBHST_STAT_BUSY

#define SMBHST_STAT_BUSY   (1 << 0)

Definition at line 12 of file smbus.h.

◆ SMBHST_STAT_CLEAR

#define SMBHST_STAT_CLEAR   0xff

Definition at line 13 of file smbus.h.

◆ SMBHST_STAT_COLLISION

#define SMBHST_STAT_COLLISION   (1 << 3)

Definition at line 9 of file smbus.h.

◆ SMBHST_STAT_ERROR

#define SMBHST_STAT_ERROR   (1 << 2)

Definition at line 10 of file smbus.h.

◆ SMBHST_STAT_ERROR_BITS

#define SMBHST_STAT_ERROR_BITS   0x1c

Definition at line 15 of file smbus.h.

◆ SMBHST_STAT_FAILED

#define SMBHST_STAT_FAILED   (1 << 4)

Definition at line 8 of file smbus.h.

◆ SMBHST_STAT_INTERRUPT

#define SMBHST_STAT_INTERRUPT   (1 << 1)

Definition at line 11 of file smbus.h.

◆ SMBHST_STAT_VAL_BITS

#define SMBHST_STAT_VAL_BITS   0x1f

Definition at line 14 of file smbus.h.

◆ SMBHSTADDR

#define SMBHSTADDR   0x4

Definition at line 39 of file smbus.h.

◆ SMBHSTBLKDAT

#define SMBHSTBLKDAT   0x7

Definition at line 42 of file smbus.h.

◆ SMBHSTCMD

#define SMBHSTCMD   0x3

Definition at line 38 of file smbus.h.

◆ SMBHSTCTRL

#define SMBHSTCTRL   0x2

Definition at line 26 of file smbus.h.

◆ SMBHSTDAT0

#define SMBHSTDAT0   0x5

Definition at line 40 of file smbus.h.

◆ SMBHSTDAT1

#define SMBHSTDAT1   0x6

Definition at line 41 of file smbus.h.

◆ SMBHSTSTAT

#define SMBHSTSTAT   0x0

Definition at line 7 of file smbus.h.

◆ SMBSLV_STAT_ALERT

#define SMBSLV_STAT_ALERT   (1 << 5)

Definition at line 18 of file smbus.h.

◆ SMBSLV_STAT_CLEAR

#define SMBSLV_STAT_CLEAR   0x1f

Definition at line 24 of file smbus.h.

◆ SMBSLV_STAT_SHADOW1

#define SMBSLV_STAT_SHADOW1   (1 << 3)

Definition at line 20 of file smbus.h.

◆ SMBSLV_STAT_SHADOW2

#define SMBSLV_STAT_SHADOW2   (1 << 4)

Definition at line 19 of file smbus.h.

◆ SMBSLV_STAT_SLV_BUSY

#define SMBSLV_STAT_SLV_BUSY   (1 << 0)

Definition at line 23 of file smbus.h.

◆ SMBSLV_STAT_SLV_INIT

#define SMBSLV_STAT_SLV_INIT   (1 << 1)

Definition at line 22 of file smbus.h.

◆ SMBSLV_STAT_SLV_STS

#define SMBSLV_STAT_SLV_STS   (1 << 2)

Definition at line 21 of file smbus.h.

◆ SMBSLVCMD_SHADOW

#define SMBSLVCMD_SHADOW   0x9

Definition at line 44 of file smbus.h.

◆ SMBSLVCTRL

#define SMBSLVCTRL   0x8

Definition at line 43 of file smbus.h.

◆ SMBSLVDAT

#define SMBSLVDAT   0xc

Definition at line 46 of file smbus.h.

◆ SMBSLVEVT

#define SMBSLVEVT   0xa

Definition at line 45 of file smbus.h.

◆ SMBSLVSTAT

#define SMBSLVSTAT   0x1

Definition at line 17 of file smbus.h.

◆ SMBTIMING

#define SMBTIMING   0xe

Definition at line 47 of file smbus.h.

Function Documentation

◆ fch_smbus_init()

void fch_smbus_init ( void  )

Definition at line 18 of file smbus_early_fch.c.

References asf_write8(), fch_smbus_enable_decode(), SMB_BASE_ADDR, SMBHST_STAT_CLEAR, SMBHSTSTAT, SMBSLV_STAT_CLEAR, SMBSLVSTAT, SMBTIMING, and smbus_write8().

Referenced by bootblock_fch_early_init(), and fch_pre_init().

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