coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ec_oem.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef _MAINBOARD_EC_OEM_H
4 #define _MAINBOARD_EC_OEM_H
5 
6 #define EC_OEM_DATA 0x68
7 #define EC_OEM_SC 0x6c
8 
9 /* EC_SC input */
10 #define EC_SMI_EVT (1 << 6) // 1: SMI event pending
11 #define EC_SCI_EVT (1 << 5) // 1: SCI event pending
12 #define EC_BURST (1 << 4) // controller is in burst mode
13 #define EC_CMD (1 << 3) // 1: byte in data register is command
14  // 0: byte in data register is data
15 #define EC_IBF (1 << 1) // 1: input buffer full (data ready for ec)
16 #define EC_OBF (1 << 0) // 1: output buffer full (data ready for host)
17 /* EC_SC output */
18 #define RD_EC 0x80 // Read Embedded Controller
19 #define WR_EC 0x81 // Write Embedded Controller
20 #define BE_EC 0x82 // Burst Enable Embedded Controller
21 #define BD_EC 0x83 // Burst Disable Embedded Controller
22 #define QR_EC 0x84 // Query Embedded Controller
23 
24 int send_ec_oem_command(u8 command);
25 int send_ec_oem_data(u8 data);
26 int send_ec_oem_data_nowait(u8 data);
27 u8 recv_ec_oem_data(void);
29 int ec_oem_write(u8 addr, u8 data);
30 
31 int ec_dump_status(void);
32 int ec_oem_dump_status(void);
33 #endif
static u32 addr
Definition: cirrus.c:14
int send_ec_oem_command(u8 command)
Definition: ec_oem.c:9
u8 ec_oem_read(u8 addr)
Definition: ec_oem.c:82
int ec_oem_write(u8 addr, u8 data)
Definition: ec_oem.c:90
int send_ec_oem_data_nowait(u8 data)
Definition: ec_oem.c:50
int ec_dump_status(void)
int ec_oem_dump_status(void)
Definition: ec_oem.c:97
int send_ec_oem_data(u8 data)
Definition: ec_oem.c:29
u8 recv_ec_oem_data(void)
Definition: ec_oem.c:57
uint8_t u8
Definition: stdint.h:45