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,
20
GSBI_ID_2
,
21
GSBI_ID_3
,
22
GSBI_ID_4
,
23
GSBI_ID_5
,
24
GSBI_ID_6
,
25
GSBI_ID_7
,
26
}
gsbi_id_t
;
27
28
typedef
enum
{
29
GSBI_SUCCESS
= 0,
30
GSBI_ID_ERROR
,
31
GSBI_ERROR
,
32
GSBI_UNSUPPORTED
33
}
gsbi_return_t
;
34
35
typedef
enum
{
36
GSBI_PROTO_I2C_UIM
= 1,
37
GSBI_PROTO_I2C_ONLY
,
38
GSBI_PROTO_SPI_ONLY
,
39
GSBI_PROTO_UART_FLOW_CTL
,
40
GSBI_PROTO_UIM
,
41
GSBI_PROTO_I2C_UART
,
42
}
gsbi_protocol_t
;
43
44
gsbi_return_t
gsbi_init
(
gsbi_id_t
gsbi_id,
gsbi_protocol_t
protocol);
45
int
gsbi_init_board
(
gsbi_id_t
gsbi_id);
46
47
#endif
gsbi_id_t
gsbi_id_t
Definition:
gsbi.h:18
GSBI_ID_2
@ GSBI_ID_2
Definition:
gsbi.h:20
GSBI_ID_1
@ GSBI_ID_1
Definition:
gsbi.h:19
GSBI_ID_5
@ GSBI_ID_5
Definition:
gsbi.h:23
GSBI_ID_6
@ GSBI_ID_6
Definition:
gsbi.h:24
GSBI_ID_7
@ GSBI_ID_7
Definition:
gsbi.h:25
GSBI_ID_3
@ GSBI_ID_3
Definition:
gsbi.h:21
GSBI_ID_4
@ GSBI_ID_4
Definition:
gsbi.h:22
gsbi_init_board
int gsbi_init_board(gsbi_id_t gsbi_id)
Definition:
gsbi.c:9
gsbi_return_t
gsbi_return_t
Definition:
gsbi.h:28
GSBI_ERROR
@ GSBI_ERROR
Definition:
gsbi.h:31
GSBI_UNSUPPORTED
@ GSBI_UNSUPPORTED
Definition:
gsbi.h:32
GSBI_SUCCESS
@ GSBI_SUCCESS
Definition:
gsbi.h:29
GSBI_ID_ERROR
@ GSBI_ID_ERROR
Definition:
gsbi.h:30
gsbi_protocol_t
gsbi_protocol_t
Definition:
gsbi.h:35
GSBI_PROTO_I2C_ONLY
@ GSBI_PROTO_I2C_ONLY
Definition:
gsbi.h:37
GSBI_PROTO_UART_FLOW_CTL
@ GSBI_PROTO_UART_FLOW_CTL
Definition:
gsbi.h:39
GSBI_PROTO_I2C_UART
@ GSBI_PROTO_I2C_UART
Definition:
gsbi.h:41
GSBI_PROTO_UIM
@ GSBI_PROTO_UIM
Definition:
gsbi.h:40
GSBI_PROTO_SPI_ONLY
@ GSBI_PROTO_SPI_ONLY
Definition:
gsbi.h:38
GSBI_PROTO_I2C_UIM
@ GSBI_PROTO_I2C_UIM
Definition:
gsbi.h:36
gsbi_init
gsbi_return_t gsbi_init(gsbi_id_t gsbi_id, gsbi_protocol_t protocol)
Definition:
gsbi.c:31
src
soc
qualcomm
ipq806x
include
soc
gsbi.h
Generated by
1.9.1