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

Go to the source code of this file.

Macros

#define EC_TIMEOUT   0xfff
 
#define EC_MAILBOX_COMMAND   0x82
 
#define EC_MAILBOX_DATA   0x84
 
#define EC_MAILBOX_DATA_H   0x85
 
#define EC_RAM_READ   0x88
 
#define EC_RAM_WRITE   0x89
 

Functions

int send_ec_command (u8 command)
 
int send_ec_command_data (u8 command, u8 data)
 
u8 read_ec_command_byte (u8 command)
 
u8 ec_read (u8 addr)
 
int ec_write (u8 addr, u8 data)
 
void ec_set_bit (u8 addr, u8 bit)
 
void ec_clr_bit (u8 addr, u8 bit)
 
void ec_set_ports (u16 cmd_reg, u16 data_reg)
 

Macro Definition Documentation

◆ EC_MAILBOX_COMMAND

#define EC_MAILBOX_COMMAND   0x82

Definition at line 11 of file ec.h.

◆ EC_MAILBOX_DATA

#define EC_MAILBOX_DATA   0x84

Definition at line 12 of file ec.h.

◆ EC_MAILBOX_DATA_H

#define EC_MAILBOX_DATA_H   0x85

Definition at line 13 of file ec.h.

◆ EC_RAM_READ

#define EC_RAM_READ   0x88

Definition at line 14 of file ec.h.

◆ EC_RAM_WRITE

#define EC_RAM_WRITE   0x89

Definition at line 15 of file ec.h.

◆ EC_TIMEOUT

#define EC_TIMEOUT   0xfff

Definition at line 10 of file ec.h.

Function Documentation

◆ ec_clr_bit()

void ec_clr_bit ( u8  addr,
u8  bit 
)

◆ ec_read()

◆ ec_set_bit()

◆ ec_set_ports()

void ec_set_ports ( u16  cmd_reg,
u16  data_reg 
)

Definition at line 143 of file ec.c.

References ec_cmd_reg, ec_data_reg, and ENV_STAGE_HAS_DATA_SECTION.

Referenced by chausie_ec_init(), mainboard_smi_apmc(), mainboard_smi_gpi(), and wilco_ec_init().

Here is the caller graph for this function:

◆ ec_write()

◆ read_ec_command_byte()

u8 read_ec_command_byte ( u8  command)

Definition at line 65 of file ec.c.

References __ec_read(), EC_MAILBOX_DATA, and send_ec_command().

Referenced by mainboard_smi_ec().

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

◆ send_ec_command()

◆ send_ec_command_data()

int send_ec_command_data ( u8  command,
u8  data 
)

Definition at line 56 of file ec.c.

References __ec_write(), EC_MAILBOX_COMMAND, EC_MAILBOX_DATA, and ec_ready().

Referenced by ec_read(), and lumpy_ec_init().

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