Debian Codegraph @

src/mainboard/google/auron/variants/lulu/spd/spd.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <mainboard/google/auron/variant.h>
4 #include <gpio.h>
5
6 /* Lulu board memory configuration GPIOs */
7 #define SPD_GPIO_BIT0 13
8 #define SPD_GPIO_BIT1 9
9 #define SPD_GPIO_BIT2 47
10 #define SPD_GPIO_BIT3 8
11
12 unsigned int variant_get_spd_index(void)
13 {
14 const gpio_t gpio_vector[] = {
15 SPD_GPIO_BIT0,
16 SPD_GPIO_BIT1,
17 SPD_GPIO_BIT2,
18 SPD_GPIO_BIT3
19 };
20 return gpio_base2_value(gpio_vector, ARRAY_SIZE(gpio_vector));
21 }
22
23 bool variant_is_dual_channel(const unsigned int spd_index)
24 {
25 /* CH1 not used in 2GB configurations */
26 return !((spd_index == 0b0000) || (spd_index == 0b0011) || (spd_index == 0b1010));
27 }