coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ramstage.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <baseboard/variants.h>
4 #include <boardid.h>
5 #include <device/device.h>
7 #include <fw_config.h>
8 #include <soc/soc_chip.h>
9 
10 static void ext_vr_update(void)
11 {
13  if (fw_config_probe(FW_CONFIG(EXT_VR, EXT_VR_ABSENT)))
15 }
16 
18 {
19  uint32_t board_version = board_id();
20  struct device *lte_usb2 = DEV_PTR(lte_usb2);
22  struct acpi_gpio lte_reset_gpio = ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_H0);
23 
24  /* board version 9 is drawper EVT */
25  if (board_version > 9)
26  return;
27 
28  if (lte_usb2 == NULL)
29  return;
30 
31  config = config_of(lte_usb2);
32  config->reset_gpio = lte_reset_gpio;
33  ext_vr_update();
34 }
#define ACPI_GPIO_OUTPUT_ACTIVE_LOW(gpio)
Definition: acpi_device.h:208
#define GPP_H0
uint32_t board_id(void)
board_id() - Get the board version
Definition: ec_boardid.c:6
#define FW_CONFIG(__field, __option)
Definition: fw_config.h:28
#define DEV_PTR(_alias)
Definition: device.h:403
static DEVTREE_CONST void * config_of(const struct device *dev)
Definition: device.h:382
#define config_of_soc()
Definition: device.h:394
bool fw_config_probe(const struct fw_config *match)
Definition: fw_config.c:62
void variant_devtree_update(void)
Definition: ramstage.c:63
enum board_config config
Definition: memory.c:448
static void ext_vr_update(void)
Definition: ramstage.c:10
#define NULL
Definition: stddef.h:19
unsigned int uint32_t
Definition: stdint.h:14
Definition: device.h:107