From 08c4ce851ed7902207febb15047330e992f8db17 Mon Sep 17 00:00:00 2001 From: Richard Spiegel Date: Mon, 16 Apr 2018 16:48:55 -0700 Subject: soc/amd/stoneyridge/include/soc/gpio.h: Remove vendor code reference With the exception of code that deals directly or indirectly with AGESA, all other code should be independent of vendor code reference. Therefore, remove vendor code reference from any GPIO code. BUG=b:77999987 TEST=Build and boot grunt. Change-Id: I9ba78767a269ad6b9b06fa11993d8a12350e4bad Signed-off-by: Richard Spiegel Reviewed-on: https://review.coreboot.org/25695 Reviewed-by: Martin Roth Reviewed-by: Marc Jones Reviewed-by: Garrett Kirkendall Tested-by: build bot (Jenkins) --- src/soc/amd/stoneyridge/include/soc/gpio.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/soc/amd/stoneyridge/include') diff --git a/src/soc/amd/stoneyridge/include/soc/gpio.h b/src/soc/amd/stoneyridge/include/soc/gpio.h index e1ae5dda09..cbc99e4d31 100644 --- a/src/soc/amd/stoneyridge/include/soc/gpio.h +++ b/src/soc/amd/stoneyridge/include/soc/gpio.h @@ -46,14 +46,6 @@ #define GPIO_INT_STATUS (1 << 28) #define GPIO_WAKE_STATUS (1 << 29) -/* - * The definitions below should be used to make GPIO arrays compact and - * easy to understand. - */ -#define INPUT 0 -#define OUTPUT_H (FCH_GPIO_OUTPUT_ENABLE | FCH_GPIO_OUTPUT_VALUE) -#define OUTPUT_L FCH_GPIO_OUTPUT_ENABLE - /* GPIO_0 - GPIO_62 */ #define GPIO_BANK0_CONTROL(gpio) \ (AMD_SB_ACPI_MMIO_ADDR + 0x1500 + ((gpio) * 4)) @@ -333,11 +325,16 @@ #define GPIO_148_IOMUX_I2C1_SDA 0 #define GPIO_148_IOMUX_GPIOxx 1 -#define GPIO_OUTPUT_OUT_HIGH (FCH_GPIO_OUTPUT_ENABLE | FCH_GPIO_OUTPUT_VALUE) -#define GPIO_OUTPUT_OUT_LOW FCH_GPIO_OUTPUT_ENABLE +#define GPIO_ENABLE_OUTPUT BIT(7) +#define GPIO_OUTPUT_VALUE BIT(6) +#define GPIO_PULL_DOWN_ENABLE BIT(5) +#define GPIO_PULL_UP_ENABLE BIT(4) + +#define GPIO_OUTPUT_OUT_HIGH (GPIO_ENABLE_OUTPUT | GPIO_OUTPUT_VALUE) +#define GPIO_OUTPUT_OUT_LOW GPIO_ENABLE_OUTPUT -#define GPIO_PULL_PULL_UP FCH_GPIO_PULL_UP_ENABLE -#define GPIO_PULL_PULL_DOWN FCH_GPIO_PULL_DOWN_ENABLE +#define GPIO_PULL_PULL_UP GPIO_PULL_UP_ENABLE +#define GPIO_PULL_PULL_DOWN GPIO_PULL_DOWN_ENABLE #define GPIO_PULL_PULL_NONE 0 /* Native function pad configuration */ -- cgit v1.2.3