coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
acpi_tables.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
acpi/acpi_gnvs.h
>
4
#include <
boardid.h
>
5
#include <soc/nvs.h>
6
#include <soc/device_nvs.h>
7
8
void
mainboard_fill_gnvs
(
struct
global_nvs
*
gnvs
)
9
{
10
/* Enable USB ports in S3 */
11
gnvs
->
s3u0
= 1;
12
gnvs
->
s3u1
= 1;
13
14
/* Disable USB ports in S5 */
15
gnvs
->
s5u0
= 0;
16
gnvs
->
s5u1
= 0;
17
18
/* Disable PMIC I2C port for ACPI for all boards except cyan */
19
struct
device_nvs
*dev_nvs =
acpi_get_device_nvs
();
20
if
(!
CONFIG
(BOARD_GOOGLE_CYAN))
21
dev_nvs->
lpss_en
[
LPSS_NVS_I2C2
] = 0;
22
23
gnvs
->
bdid
=
board_id
();
24
}
acpi_get_device_nvs
void * acpi_get_device_nvs(void)
Definition:
gnvs.c:53
acpi_gnvs.h
LPSS_NVS_I2C2
#define LPSS_NVS_I2C2
Definition:
device_nvs.h:10
boardid.h
CONFIG
@ CONFIG
Definition:
dsi_common.h:201
board_id
uint32_t board_id(void)
board_id() - Get the board version
Definition:
ec_boardid.c:6
mainboard_fill_gnvs
void mainboard_fill_gnvs(struct global_nvs *gnvs)
Definition:
acpi_tables.c:8
gnvs
struct global_nvs * gnvs
Definition:
smm_module_handler.c:100
device_nvs
Definition:
device_nvs.h:27
device_nvs::lpss_en
u8 lpss_en[14]
Definition:
device_nvs.h:29
global_nvs
Definition:
nvs.h:14
global_nvs::bdid
u8 bdid
Definition:
nvs.h:29
global_nvs::s5u1
u8 s5u1
Definition:
nvs.h:33
global_nvs::s3u0
u8 s3u0
Definition:
nvs.h:34
global_nvs::s3u1
u8 s3u1
Definition:
nvs.h:35
global_nvs::s5u0
u8 s5u0
Definition:
nvs.h:32
src
mainboard
google
cyan
acpi_tables.c
Generated by
1.9.1