From 93db63f419f596160ce2459eb70b3218cc83c09e Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Wed, 5 Nov 2014 14:05:56 -0800 Subject: [PATCH] gpio: decouple tristate gpio support from board ID This deprecates TERTIARY_BOARD_ID. Instead, a board will set BOARD_ID_SUPPORT (the ones affected already do) which will set GENERIC_GPIO_SUPPORT and compile the generic GPIO library. The user is expected to handle the details of how the ID is encoded. BUG=none BRANCH=none TEST=Compiled for peppy, nyan*, storm, and pinky Change-Id: I687877e5bb89679d0133bed24e2480216c384a1c Signed-off-by: David Hendricks Reviewed-on: https://chromium-review.googlesource.com/228322 Reviewed-by: Julius Werner --- src/Kconfig | 17 +++++++++-------- src/lib/Makefile.inc | 2 +- src/mainboard/google/nyan_big/Kconfig | 1 - src/mainboard/google/nyan_blaze/Kconfig | 1 - src/mainboard/google/rush_ryu/Kconfig | 1 - src/mainboard/google/storm/Kconfig | 1 - 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/Kconfig b/src/Kconfig index 14876fe057..ce7406de66 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -1070,22 +1070,23 @@ config DEBUG_COVERAGE If enabled, the code coverage hooks in coreboot will output some information about the coverage data that is dumped. +config GENERIC_GPIO_LIB + bool "Build generic GPIO library" + default n + help + If enabled, compile the generic GPIO library. A "generic" GPIO + implies configurability usually found on SoCs, particularly the + ability to control internal pull resistors. + config BOARD_ID_SUPPORT bool "Discover board ID and store it in coreboot table" default n + select GENERIC_GPIO_LIB help If enabled, coreboot discovers the board id of the hardware it is running on and reports it through the coreboot table to the rest of the system. -config TERTIARY_BOARD_ID - bool "Interpret board ID GPIOs as tertiary inputs" - default n - depends on BOARD_ID_SUPPORT - help - Consider each GPIO as being in one of thee states: pulled down (0), - pulled up (1), or not connected (2) - endmenu # These probably belong somewhere else, but they are needed somewhere. diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc index 1761a89c22..a2093cf799 100644 --- a/src/lib/Makefile.inc +++ b/src/lib/Makefile.inc @@ -102,7 +102,7 @@ ramstage-$(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) += edid.c ramstage-y += memrange.c ramstage-$(CONFIG_COOP_MULTITASKING) += thread.c ramstage-$(CONFIG_TIMER_QUEUE) += timer_queue.c -ramstage-$(CONFIG_TERTIARY_BOARD_ID) += gpio.c +ramstage-$(CONFIG_GENERIC_GPIO_LIB) += gpio.c ramstage-$(CONFIG_GENERIC_UDELAY) += timer.c # The CBMEM implementations are chosen based on CONFIG_DYNAMIC_CBMEM. diff --git a/src/mainboard/google/nyan_big/Kconfig b/src/mainboard/google/nyan_big/Kconfig index 36a5757208..b01dd84208 100644 --- a/src/mainboard/google/nyan_big/Kconfig +++ b/src/mainboard/google/nyan_big/Kconfig @@ -33,7 +33,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy select SPI_FLASH select SPI_FLASH_FAST_READ_DUAL_OUTPUT_3B select TEGRA124_MODEL_CD570M - select TERTIARY_BOARD_ID select VIRTUAL_DEV_SWITCH config MAINBOARD_DIR diff --git a/src/mainboard/google/nyan_blaze/Kconfig b/src/mainboard/google/nyan_blaze/Kconfig index 7bea2d41a0..e85a633fde 100644 --- a/src/mainboard/google/nyan_blaze/Kconfig +++ b/src/mainboard/google/nyan_blaze/Kconfig @@ -33,7 +33,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy select MAINBOARD_DO_NATIVE_VGA_INIT select SPI_FLASH select SPI_FLASH_FAST_READ_DUAL_OUTPUT_3B - select TERTIARY_BOARD_ID select VIRTUAL_DEV_SWITCH config MAINBOARD_DIR diff --git a/src/mainboard/google/rush_ryu/Kconfig b/src/mainboard/google/rush_ryu/Kconfig index 1c85c8d01f..93f5eeab66 100644 --- a/src/mainboard/google/rush_ryu/Kconfig +++ b/src/mainboard/google/rush_ryu/Kconfig @@ -32,7 +32,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy select SOC_NVIDIA_TEGRA132 select MAINBOARD_HAS_BOOTBLOCK_INIT select VIRTUAL_DEV_SWITCH - select TERTIARY_BOARD_ID select ARCH_SPINTABLE config MAINBOARD_DIR diff --git a/src/mainboard/google/storm/Kconfig b/src/mainboard/google/storm/Kconfig index 2dff7cf7ea..7d75d7a6d5 100644 --- a/src/mainboard/google/storm/Kconfig +++ b/src/mainboard/google/storm/Kconfig @@ -28,7 +28,6 @@ config BOARD_SPECIFIC_OPTIONS select SOC_QC_IPQ806X select SPI_FLASH select SPI_FLASH_SPANSION - select TERTIARY_BOARD_ID config BOARD_VARIANT_AP148 bool "pick this to build an image for ap148"