xref: /aosp_15_r20/external/coreboot/src/mainboard/pcengines/apu2/gpio_ftns.c (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <gpio.h>
4 #include "gpio_ftns.h"
5 
get_spd_offset(void)6 int get_spd_offset(void)
7 {
8 	u8 index = 0;
9 	/*
10 	 * One SPD file contains all 4 options, determine which index to
11 	 * read here, then call into the standard routines.
12 	 */
13 	if (gpio_get(GPIO_49))
14 		index |= 1 << 0;
15 	if (gpio_get(GPIO_50))
16 		index |= 1 << 1;
17 
18 	return index;
19 }
20