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

Go to the source code of this file.

Macros

#define EC_INDEX_IO_PORT   0x1200
 
#define EC_INDEX_IO_HIGH_ADDR_PORT   (EC_INDEX_IO_PORT + 1)
 
#define EC_INDEX_IO_LOW_ADDR_PORT   (EC_INDEX_IO_PORT + 2)
 
#define EC_INDEX_IO_DATA_PORT   (EC_INDEX_IO_PORT + 3)
 

Functions

uint8_t ec_cmd_90_read (uint8_t addr)
 
void ec_cmd_91_write (uint8_t addr, uint8_t data)
 
uint8_t ec_cmd_94_query (void)
 
uint8_t ec_idx_read (uint16_t addr)
 
void ec_idx_write (uint16_t addr, uint8_t data)
 
uint16_t read_ec_adc_converter (uint8_t adc)
 

Macro Definition Documentation

◆ EC_INDEX_IO_DATA_PORT

#define EC_INDEX_IO_DATA_PORT   (EC_INDEX_IO_PORT + 3)

Definition at line 30 of file ec.c.

◆ EC_INDEX_IO_HIGH_ADDR_PORT

#define EC_INDEX_IO_HIGH_ADDR_PORT   (EC_INDEX_IO_PORT + 1)

Definition at line 28 of file ec.c.

◆ EC_INDEX_IO_LOW_ADDR_PORT

#define EC_INDEX_IO_LOW_ADDR_PORT   (EC_INDEX_IO_PORT + 2)

Definition at line 29 of file ec.c.

◆ EC_INDEX_IO_PORT

#define EC_INDEX_IO_PORT   0x1200

Definition at line 27 of file ec.c.

Function Documentation

◆ ec_cmd_90_read()

uint8_t ec_cmd_90_read ( uint8_t  addr)

Definition at line 32 of file ec.c.

References addr, recv_ec_data(), send_ec_command(), and send_ec_data().

Referenced by ec_init(), and ec_requests_time().

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

◆ ec_cmd_91_write()

void ec_cmd_91_write ( uint8_t  addr,
uint8_t  data 
)

Definition at line 40 of file ec.c.

References addr, send_ec_command(), and send_ec_data().

Referenced by ec_init().

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

◆ ec_cmd_94_query()

uint8_t ec_cmd_94_query ( void  )

Definition at line 48 of file ec.c.

References recv_ec_data(), and send_ec_command().

Here is the call graph for this function:

◆ ec_idx_read()

uint8_t ec_idx_read ( uint16_t  addr)

Definition at line 54 of file ec.c.

References addr, EC_INDEX_IO_DATA_PORT, EC_INDEX_IO_HIGH_ADDR_PORT, EC_INDEX_IO_LOW_ADDR_PORT, inb(), and outb().

Referenced by read_ec_adc_converter().

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

◆ ec_idx_write()

void ec_idx_write ( uint16_t  addr,
uint8_t  data 
)

Definition at line 61 of file ec.c.

References addr, EC_INDEX_IO_DATA_PORT, EC_INDEX_IO_HIGH_ADDR_PORT, EC_INDEX_IO_LOW_ADDR_PORT, and outb().

Referenced by read_ec_adc_converter().

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

◆ read_ec_adc_converter()

uint16_t read_ec_adc_converter ( uint8_t  adc)

Definition at line 69 of file ec.c.

References ec_idx_read(), and ec_idx_write().

Referenced by board_detect().

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