summaryrefslogtreecommitdiff
path: root/src/southbridge/amd/pi/hudson/gpio.c
blob: 03f63dac377d55f14b785aa1eaa97d0ba4ce1d05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#include <device/mmio.h>
#include "gpio.h"

int gpio_get(gpio_t gpio_num)
{
	uint32_t reg;

	reg = read32((void *)(uintptr_t)gpio_num);

	return !!(reg & GPIO_PIN_STS);
}