Debian Codegraph @

src/mainboard/google/brya/variants/nereid/memory.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 #include <baseboard/variants.h>
4 #include <boardid.h>
5 #include <gpio.h>
6
7 int variant_memory_sku(void)
8 {
9 /*
10 * The memory straps in the P0 build don't match those generated by
11 * spd_tools, so override the memory ID to 0.
12 */
13 if (board_id() == 0)
14 return 0;
15
16 /*
17 * Memory configuration board straps
18 * GPIO_MEM_CONFIG_0 GPP_E1
19 * GPIO_MEM_CONFIG_1 GPP_E2
20 * GPIO_MEM_CONFIG_2 GPP_E3
21 */
22 gpio_t spd_gpios[] = {
23 GPP_E1,
24 GPP_E2,
25 GPP_E3,
26 };
27
28 return gpio_base2_value(spd_gpios, ARRAY_SIZE(spd_gpios));
29 }