coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gsbi.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: ISC */
2 
3 #ifndef __GSBI_H_
4 #define __GSBI_H_
5 
6 /* GSBI Registers */
7 #define GSBI_CTRL_REG(base) ((base) + 0x0)
8 
9 #define GSBI_CTRL_REG_PROTOCOL_CODE_S 4
10 #define GSBI_PROTOCOL_CODE_I2C 0x2
11 #define GSBI_PROTOCOL_CODE_SPI 0x3
12 #define GSBI_PROTOCOL_CODE_UART_FLOW 0x4
13 #define GSBI_PROTOCOL_CODE_I2C_UART 0x6
14 
15 #define GSBI_HCLK_CTL_S 4
16 #define GSBI_HCLK_CTL_CLK_ENA 0x1
17 
18 typedef enum {
19  GSBI_ID_1 = 1,
26 } gsbi_id_t;
27 
28 typedef enum {
34 
35 typedef enum {
43 
45 int gsbi_init_board(gsbi_id_t gsbi_id);
46 
47 #endif
gsbi_id_t
Definition: gsbi.h:18
@ GSBI_ID_2
Definition: gsbi.h:20
@ GSBI_ID_1
Definition: gsbi.h:19
@ GSBI_ID_5
Definition: gsbi.h:23
@ GSBI_ID_6
Definition: gsbi.h:24
@ GSBI_ID_7
Definition: gsbi.h:25
@ GSBI_ID_3
Definition: gsbi.h:21
@ GSBI_ID_4
Definition: gsbi.h:22
int gsbi_init_board(gsbi_id_t gsbi_id)
Definition: gsbi.c:9
gsbi_return_t
Definition: gsbi.h:28
@ GSBI_ERROR
Definition: gsbi.h:31
@ GSBI_UNSUPPORTED
Definition: gsbi.h:32
@ GSBI_SUCCESS
Definition: gsbi.h:29
@ GSBI_ID_ERROR
Definition: gsbi.h:30
gsbi_protocol_t
Definition: gsbi.h:35
@ GSBI_PROTO_I2C_ONLY
Definition: gsbi.h:37
@ GSBI_PROTO_UART_FLOW_CTL
Definition: gsbi.h:39
@ GSBI_PROTO_I2C_UART
Definition: gsbi.h:41
@ GSBI_PROTO_UIM
Definition: gsbi.h:40
@ GSBI_PROTO_SPI_ONLY
Definition: gsbi.h:38
@ GSBI_PROTO_I2C_UIM
Definition: gsbi.h:36
gsbi_return_t gsbi_init(gsbi_id_t gsbi_id, gsbi_protocol_t protocol)
Definition: gsbi.c:31