diff options
author | Julius Werner <jwerner@chromium.org> | 2017-03-17 13:04:12 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2017-03-28 22:15:46 +0200 |
commit | 320edbe2ba01a1b5d9de25bc217b8dae936b8b17 (patch) | |
tree | c89406965dfc086ea449b25c545e061938bc183f /src/mainboard/google/gale | |
parent | fa8fa7dd540db7c6f363f75c12b2063c3cdc3908 (diff) |
vboot: Assume EC_SOFTWARE_SYNC and VIRTUAL_DEV_SWITCH by default
The virtualized developer switch was invented five years ago and has
been used on every vboot system ever since. We shouldn't need to specify
it again and again for every new board. This patch flips the Kconfig
logic around and replaces CONFIG_VIRTUAL_DEV_SWITCH with
CONFIG_PHYSICAL_DEV_SWITCH, so that only a few ancient boards need to
set it and it fits better with CONFIG_PHYSICAL_REC_SWITCH. (Also set the
latter for Lumpy which seems to have been omitted incorrectly, and hide
it from menuconfig since it's a hardware parameter that shouldn't be
configurable.)
Since almost all our developer switches are virtual, it doesn't make
sense for every board to pass a non-existent or non-functional developer
mode switch in the coreboot tables, so let's get rid of that. It's also
dangerously confusing for many boards to define a get_developer_mode()
function that reads an actual pin (often from a debug header) which will
not be honored by coreboot because CONFIG_PHYSICAL_DEV_SWITCH isn't set.
Therefore, this patch removes all those non-functional instances of that
function. In the future, either the board has a physical dev switch and
must define it, or it doesn't and must not.
In a similar sense (and since I'm touching so many board configs
anyway), it's annoying that we have to keep selecting EC_SOFTWARE_SYNC.
Instead, it should just be assumed by default whenever a Chrome EC is
present in the system. This way, it can also still be overridden by
menuconfig.
CQ-DEPEND=CL:459701
Change-Id: If9cbaa7df530580a97f00ef238e3d9a8a86a4a7f
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/18980
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/mainboard/google/gale')
-rw-r--r-- | src/mainboard/google/gale/Kconfig | 1 | ||||
-rw-r--r-- | src/mainboard/google/gale/chromeos.c | 8 |
2 files changed, 0 insertions, 9 deletions
diff --git a/src/mainboard/google/gale/Kconfig b/src/mainboard/google/gale/Kconfig index 01e2945baf..b6639bc5d5 100644 --- a/src/mainboard/google/gale/Kconfig +++ b/src/mainboard/google/gale/Kconfig @@ -33,7 +33,6 @@ config BOARD_SPECIFIC_OPTIONS config CHROMEOS select VBOOT_DISABLE_DEV_ON_RECOVERY - select VIRTUAL_DEV_SWITCH select WIPEOUT_SUPPORTED config BOARD_VARIANT_DK01 diff --git a/src/mainboard/google/gale/chromeos.c b/src/mainboard/google/gale/chromeos.c index 92a16b1cbe..939b061b6e 100644 --- a/src/mainboard/google/gale/chromeos.c +++ b/src/mainboard/google/gale/chromeos.c @@ -25,8 +25,6 @@ #include <timer.h> #include <vendorcode/google/chromeos/chromeos.h> -#define DEV_SW 41 -#define DEV_POL ACTIVE_LOW #define REC_POL ACTIVE_LOW #define WP_POL ACTIVE_LOW @@ -71,7 +69,6 @@ static int read_gpio(gpio_t gpio_num) void fill_lb_gpios(struct lb_gpios *gpios) { struct lb_gpio chromeos_gpios[] = { - {DEV_SW, DEV_POL, read_gpio(DEV_SW), "developer"}, {get_rec_sw_gpio_pin(), REC_POL, read_gpio(get_rec_sw_gpio_pin()), "recovery"}, {get_wp_status_gpio_pin(), WP_POL, @@ -82,11 +79,6 @@ void fill_lb_gpios(struct lb_gpios *gpios) lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); } -int get_developer_mode_switch(void) -{ - return 0; -} - /* * The recovery switch on storm is overloaded: it needs to be pressed for a * certain duration at startup to signal different requests: |