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>
4 #include <soc/sdram.h>
5 
6 #include "gpio.h"
7 
9 {
10  static int id = -1;
11 
12  if (id < 0) {
13  gpio_t gpio[] = {[1] = BD_ID1, [0] = BD_ID0}; /* ID0 is LSB */
14 
16  }
17 
18  return id;
19 }
20 
22 {
23  return sdram_get_ram_code();
24 }
#define ARRAY_SIZE(a)
Definition: helpers.h:12
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
uint32_t ram_code(void)
Definition: boardid.c:78
@ BD_ID0
Definition: gpio.h:31
@ BD_ID1
Definition: gpio.h:32
uint32_t sdram_get_ram_code(void)
Definition: sdram.c:601
unsigned int uint32_t
Definition: stdint.h:14
Definition: pinmux.c:36