[coreboot-gerrit] Change in coreboot[master]: mainboard/google/kahlee: Update WP to active low

Martin Roth (Code Review) gerrit at coreboot.org
Mon Apr 2 07:18:33 CEST 2018


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/25469


Change subject: mainboard/google/kahlee: Update WP to active low
......................................................................

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 at google.com>
---
M src/mainboard/google/kahlee/chromeos.c
1 file changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/25469/1

diff --git a/src/mainboard/google/kahlee/chromeos.c b/src/mainboard/google/kahlee/chromeos.c
index e74e3b9..4b0f9a2 100644
--- a/src/mainboard/google/kahlee/chromeos.c
+++ b/src/mainboard/google/kahlee/chromeos.c
@@ -37,12 +37,13 @@
 
 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)

-- 
To view, visit https://review.coreboot.org/25469
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic1369dbda609e34b308af308880449643be6af39
Gerrit-Change-Number: 25469
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180402/b9467c00/attachment-0001.html>


More information about the coreboot-gerrit mailing list