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 
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 }
void * acpi_get_device_nvs(void)
Definition: gnvs.c:53
#define LPSS_NVS_I2C2
Definition: device_nvs.h:10
@ CONFIG
Definition: dsi_common.h:201
uint32_t board_id(void)
board_id() - Get the board version
Definition: ec_boardid.c:6
void mainboard_fill_gnvs(struct global_nvs *gnvs)
Definition: acpi_tables.c:8
struct global_nvs * gnvs
u8 lpss_en[14]
Definition: device_nvs.h:29
Definition: nvs.h:14
u8 bdid
Definition: nvs.h:29
u8 s5u1
Definition: nvs.h:33
u8 s3u0
Definition: nvs.h:34
u8 s3u1
Definition: nvs.h:35
u8 s5u0
Definition: nvs.h:32