diff options
author | Martin Roth <martinroth@google.com> | 2018-04-02 00:16:48 -0500 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2018-04-05 15:50:07 +0000 |
commit | 99519bc0aae0e22ed66b6eb23fb0dbde2a0b8c90 (patch) | |
tree | b0f6f0f00b59fbae9e4b7e9ff88e48676febc1fd /src/mainboard | |
parent | 85c76c9bc0a0a09ae23c00b41af8d411546b706a (diff) | |
download | coreboot-99519bc0aae0e22ed66b6eb23fb0dbde2a0b8c90.tar.xz |
mainboard/google/kahlee: Update WP to active low
The WP signal to the AP isn't inverted as it is on other platforms, so
it was reporting incorrectly. Change the ACPI table to be active low,
and invert the signal when reporting it to everything else.
BUG=b:74946358
TEST=Boot grunt with battery inserted, WP signals both report 1. Remove
battery, WP_CUR reports 0, WP_BOOT still reports 1.
Change-Id: Ic1369dbda609e34b308af308880449643be6af39
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/25469
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/kahlee/chromeos.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainboard/google/kahlee/chromeos.c b/src/mainboard/google/kahlee/chromeos.c index e74e3b9970..4b0f9a200e 100644 --- a/src/mainboard/google/kahlee/chromeos.c +++ b/src/mainboard/google/kahlee/chromeos.c @@ -37,12 +37,13 @@ void fill_lb_gpios(struct lb_gpios *gpios) int get_write_protect_state(void) { - return gpio_get(CROS_WP_GPIO); + /* Write protect is active low, so invert it here */ + return !gpio_get(CROS_WP_GPIO); } static const struct cros_gpio cros_gpios[] = { CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, GPIO_DEVICE_NAME), - CROS_GPIO_WP_AH(CROS_WP_GPIO, GPIO_DEVICE_NAME), + CROS_GPIO_WP_AL(CROS_WP_GPIO, GPIO_DEVICE_NAME), }; void mainboard_chromeos_acpi_generate(void) |