From d7897b97a9be84a039c8d48c3ff47f6edce544e2 Mon Sep 17 00:00:00 2001 From: Alexandru M Stan Date: Wed, 3 Feb 2016 17:28:38 -0800 Subject: [PATCH] rialto: Remove developer mode switch The developer mode gpio switch on rialto is always hardcoded (through a resistor) as developer mode. We need to ignore it to allow transitions to verified mode with the virtual developer mode stuff. This was not needed in master due to CL:261588, but this is a more semantic way to do it. BRANCH=veyron BUG=chrome-os-partner:46150, chrome-os-partner:43022 TEST=We can now exit dev mode on rialto Change-Id: If11d752d58a5f26fc270ef01b529dad18b4cce46 Signed-off-by: Alexandru M Stan Reviewed-on: https://chromium-review.googlesource.com/325546 Reviewed-by: Julius Werner --- src/mainboard/google/veyron_rialto/chromeos.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mainboard/google/veyron_rialto/chromeos.c b/src/mainboard/google/veyron_rialto/chromeos.c index 267c9359bc..4baf876e0f 100644 --- a/src/mainboard/google/veyron_rialto/chromeos.c +++ b/src/mainboard/google/veyron_rialto/chromeos.c @@ -29,7 +29,6 @@ #define GPIO_POWER GPIO(0, A, 5) #define GPIO_RECOVERY_SERVO GPIO(0, B, 1) #define GPIO_RECOVERY_PUSHKEY GPIO(7, B, 1) -#define GPIO_DEVELOPER_SWITCH GPIO(7, B, 2) void setup_chromeos_gpios(void) @@ -38,7 +37,6 @@ void setup_chromeos_gpios(void) gpio_input(GPIO_POWER); gpio_input_pullup(GPIO_RECOVERY_SERVO); gpio_input_pullup(GPIO_RECOVERY_PUSHKEY); - gpio_input(GPIO_DEVELOPER_SWITCH); // board has pull up/down resistor. } void fill_lb_gpios(struct lb_gpios *gpios) @@ -73,7 +71,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) count++; /* Developer: GPIO active high */ - gpios->gpios[count].port = GPIO_DEVELOPER_SWITCH.raw; + 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", @@ -96,8 +94,7 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_developer_mode_switch(void) { - // GPIO_DEVELOPER_SWITCH is active high. - return gpio_get(GPIO_DEVELOPER_SWITCH); + return 0; } int get_recovery_mode_switch(void)