coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
boardid.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <boardid.h>
5 #include "board.h"
6 #include <commonlib/bsd/cb_err.h>
7 #include <console/console.h>
8 #include <gpio.h>
9 
11 {
12  static uint32_t id = UNDEFINED_STRAPPING_ID;
13  gpio_t pins[3] = { 0 };
14  if (CONFIG(BOARD_GOOGLE_HEROBRINE_REV0)) {
15  pins[2] = GPIO(75);
16  pins[1] = GPIO(74);
17  pins[0] = GPIO(73);
18  } else {
19  pins[2] = GPIO(50);
20  pins[1] = GPIO(49);
21  pins[0] = GPIO(48);
22  }
23 
24  if (id == UNDEFINED_STRAPPING_ID)
26 
27  printk(BIOS_INFO, "BoardID :%d - "
28  "Machine model: "
29  "Qualcomm Technologies, Inc. "
30  "sc7280 platform\n", id);
31 
32  return id;
33 }
34 
36 {
37  static uint32_t id = UNDEFINED_STRAPPING_ID;
38 
39  return id;
40 }
41 
43 {
45 }
#define UNDEFINED_STRAPPING_ID
Definition: boardid.h:8
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define printk(level,...)
Definition: stdlib.h:16
@ GPIO
Definition: chip.h:84
@ CONFIG
Definition: dsi_common.h:201
uint32_t google_chromeec_get_board_sku(void)
Definition: ec_skuid.c:6
uint32_t board_id(void)
board_id() - Get the board version
Definition: boardid.c:6
static uint32_t gpio_base3_value(const gpio_t gpio[], int num_gpio)
Definition: gpio.h:63
#define BIOS_INFO
BIOS_INFO - Expected events.
Definition: loglevel.h:113
uint32_t sku_id(void)
Definition: boardid.c:65
uint32_t ram_code(void)
Definition: boardid.c:78
static struct @1213 pins[]
unsigned int uint32_t
Definition: stdint.h:14