From 320edbe2ba01a1b5d9de25bc217b8dae936b8b17 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Fri, 17 Mar 2017 13:04:12 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/18980 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/google/foster/Kconfig | 1 - src/mainboard/google/foster/chromeos.c | 13 ------------- 2 files changed, 14 deletions(-) (limited to 'src/mainboard/google/foster') diff --git a/src/mainboard/google/foster/Kconfig b/src/mainboard/google/foster/Kconfig index 3f02e68c13..c408ca1f9d 100644 --- a/src/mainboard/google/foster/Kconfig +++ b/src/mainboard/google/foster/Kconfig @@ -28,7 +28,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy config CHROMEOS select VBOOT_VBNV_FLASH - select VIRTUAL_DEV_SWITCH config MAINBOARD_DIR string diff --git a/src/mainboard/google/foster/chromeos.c b/src/mainboard/google/foster/chromeos.c index e04aff17bf..3f86c29f22 100644 --- a/src/mainboard/google/foster/chromeos.c +++ b/src/mainboard/google/foster/chromeos.c @@ -52,14 +52,6 @@ void fill_lb_gpios(struct lb_gpios *gpios) GPIO_MAX_NAME_LENGTH); count++; - /* Developer: virtual GPIO active high */ - gpios->gpios[count].port = -1; - gpios->gpios[count].polarity = ACTIVE_HIGH; - gpios->gpios[count].value = get_developer_mode_switch(); - strncpy((char *)gpios->gpios[count].name, "developer", - GPIO_MAX_NAME_LENGTH); - count++; - /* TODO: Reset: active low (output) */ gpios->gpios[count].port = GPIO(I5); gpios->gpios[count].polarity = ACTIVE_LOW; @@ -74,11 +66,6 @@ void fill_lb_gpios(struct lb_gpios *gpios) printk(BIOS_ERR, "Added %d GPIOS size %d\n", count, gpios->size); } -int get_developer_mode_switch(void) -{ - return 0; -} - int get_recovery_mode_switch(void) { #if CONFIG_EC_GOOGLE_CHROMEEC -- cgit v1.2.3