From ad7f98cb0163d0ef2b0e6f75d334cdbd6faf846c Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Sat, 2 Feb 2013 17:02:36 -0800 Subject: exynos/s5p: Add helper function for reading a single MVL3 GPIO This adds a helper function to read only a single GPIO which uses 3-state logic. Examples of this typically include board straps which are used to provide mainboard-specific information at the hardware- level, such as board revision or configuration options. This is part of a larger clean-up effort for Snow. We may want to genericise this for other CPUs in the future. Change-Id: Ic44f5e589cda89b419a07eca246847e9ce7dcd8d Signed-off-by: David Hendricks Reviewed-on: http://review.coreboot.org/2266 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/cpu/samsung/exynos5250/gpio.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cpu/samsung/exynos5250/gpio.h') diff --git a/src/cpu/samsung/exynos5250/gpio.h b/src/cpu/samsung/exynos5250/gpio.h index 7606262062..12143849f5 100644 --- a/src/cpu/samsung/exynos5250/gpio.h +++ b/src/cpu/samsung/exynos5250/gpio.h @@ -477,6 +477,15 @@ void gpio_set_rate(int gpio, int mode); */ int gpio_decode_number(unsigned gpio_list[], int count); +/* + * similar to gpio_decode_number, but reads only a single GPIO + * + * @param gpio GPIO to read + * @return -1 if the value cannot be determined. Otherwise returns + * the corresponding MVL3 enum value. + */ +int gpio_read_mvl3(unsigned gpio); + void gpio_info(void); #endif /* EXYNOS5250_GPIO_H_ */ -- cgit v1.2.3