summaryrefslogtreecommitdiffstats
path: root/src/mainboard/pcengines/apu2/gpio_ftns.c
blob: 1fd6fdaac44a8a4befecba996e541b41a22a8046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: GPL-2.0-only */

#include <gpio.h>
#include "gpio_ftns.h"

int get_spd_offset(void)
{
	u8 index = 0;
	/*
	 * One SPD file contains all 4 options, determine which index to
	 * read here, then call into the standard routines.
	 */
	if (gpio_get(GPIO_49))
		index |= 1 << 0;
	if (gpio_get(GPIO_50))
		index |= 1 << 1;

	return index;
}