coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
variant.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef VARIANT_H
4 #define VARIANT_H
5 
6 #include <gpio.h>
7 #include <variant/gpio.h>
8 
9 /* Need to update for Drallion with right SKU IDs*/
10 typedef struct {
11  int id;
12  const char *name;
13 } sku_info;
14 
15 const static sku_info skus[] = {
16  // Drallion 360
17  { .id = 1, .name = "sku1" },
18  // Drallion
19  { .id = 2, .name = "sku2" },
20  // Drallion 360 signed
21  { .id = 3, .name = "sku3" },
22  // Drallion signed
23  { .id = 4, .name = "sku4" },
24 };
25 
26 /* Return memory SKU for the variant */
27 int variant_memory_sku(void);
28 
29 /* Check if the device has a 360 sensor board present */
30 static inline int has_360_sensor_board(void)
31 {
32  return gpio_get(SENSOR_DET_360) == 0;
33 }
34 
35 #endif
const char * name
Definition: mmu.c:92
#define SENSOR_DET_360
Definition: variant.h:9
static const sku_info skus[]
Definition: variant.h:15
static int has_360_sensor_board(void)
Definition: variant.h:30
int variant_memory_sku(void)
Definition: memory.c:74
int gpio_get(gpio_t gpio)
Definition: gpio.c:166
int id
Definition: variants.h:23