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: Iaf1cac6e90b6c931100e9d1b6735684fac86b8a8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 93db63f419f596160ce2459eb70b3218cc83c09e
Original-Change-Id: I687877e5bb89679d0133bed24e2480216c384a1c
Original-Signed-off-by: David Hendricks <dhendrix@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/228322
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: http://review.coreboot.org/9413
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
David Hendricks 2014-11-05 14:05:56 -08:00 committed by Patrick Georgi
parent 21db62eb0e
commit 3b11de80a4
6 changed files with 10 additions and 13 deletions

View File

@ -1114,22 +1114,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 three states: pulled down (0),
pulled up (1), or not connected (2)
endmenu
# These probably belong somewhere else, but they are needed somewhere.

View File

@ -92,7 +92,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
romstage-y += cbmem_common.c dynamic_cbmem.c

View File

@ -34,7 +34,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select SPI_FLASH
select SPI_FLASH_FAST_READ_DUAL_OUTPUT_3B
select VIRTUAL_DEV_SWITCH
select TERTIARY_BOARD_ID
config MAINBOARD_DIR
string

View File

@ -34,7 +34,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select BOARD_ROMSIZE_KB_1024
select SPI_FLASH
select SPI_FLASH_FAST_READ_DUAL_OUTPUT_3B
select TERTIARY_BOARD_ID
select VIRTUAL_DEV_SWITCH
config MAINBOARD_DIR

View File

@ -31,7 +31,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select MAINBOARD_HAS_BOOTBLOCK_INIT
select BOARD_ROMSIZE_KB_4096
select VIRTUAL_DEV_SWITCH
select TERTIARY_BOARD_ID
select ARCH_SPINTABLE
config MAINBOARD_DIR

View File

@ -28,7 +28,6 @@ config BOARD_SPECIFIC_OPTIONS
select MAINBOARD_HAS_BOOTBLOCK_INIT
select SPI_FLASH
select SPI_FLASH_SPANSION
select TERTIARY_BOARD_ID
config BOARD_VARIANT_AP148
bool "pick this to build an image for ap148"