summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2015-08-20 09:54:18 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-08-29 07:21:30 +0000
commita58cf01a1fd545c01b036f9abaf354440822f043 (patch)
tree210ef5bc7f21d12f697e2964acda2465d67f8928
parent08a6fd309f9396fc7bdcbdc9608661da3a8c94a7 (diff)
google/glados: Export GPIO for EC_IN_RW
Export the proper GPIO for EC_IN_RW so it can be picked up and used by depthcharge/vboot. BUG=chrome-os-partner:43072 BRANCH=none TEST=build and boot on glados P2 Change-Id: I32d338ef424086ec9701900e976bd0dffe4637a0 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Original-Commit-Id: dd983c84de0c3b896b20d38438a3285cfcaf7e56 Original-Change-Id: I77f7d3a0c0d733302b81273d96026d39b001ed19 Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/294712 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/11418 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--src/mainboard/google/glados/chromeos.c14
-rw-r--r--src/mainboard/google/glados/gpio.h3
2 files changed, 10 insertions, 7 deletions
diff --git a/src/mainboard/google/glados/chromeos.c b/src/mainboard/google/glados/chromeos.c
index 13d0fcef8f..dba1cbbb7f 100644
--- a/src/mainboard/google/glados/chromeos.c
+++ b/src/mainboard/google/glados/chromeos.c
@@ -35,16 +35,11 @@
#if ENV_RAMSTAGE
#include <boot/coreboot_tables.h>
-#define GPIO_COUNT 6
-
void fill_lb_gpios(struct lb_gpios *gpios)
{
- struct lb_gpio *gpio;
-
- gpios->size = sizeof(*gpios) + (GPIO_COUNT * sizeof(struct lb_gpio));
- gpios->count = GPIO_COUNT;
+ struct lb_gpio *start_gpio = gpios->gpios;
+ struct lb_gpio *gpio = start_gpio;
- gpio = gpios->gpios;
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "write protect",
get_write_protect_state());
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "recovery",
@@ -55,6 +50,11 @@ void fill_lb_gpios(struct lb_gpios *gpios)
get_lid_switch());
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
+ fill_lb_gpio(gpio++, GPIO_EC_IN_RW, ACTIVE_HIGH, "EC in RW",
+ gpio_get(GPIO_EC_IN_RW));
+
+ gpios->count = gpio - start_gpio;
+ gpios->size = sizeof(*gpios) + (gpios->count * sizeof(*gpio));
}
#endif /* ENV_RAMSTAGE */
diff --git a/src/mainboard/google/glados/gpio.h b/src/mainboard/google/glados/gpio.h
index fc5ffffbac..c4d3d920d8 100644
--- a/src/mainboard/google/glados/gpio.h
+++ b/src/mainboard/google/glados/gpio.h
@@ -23,6 +23,9 @@
#include <soc/gpe.h>
#include <soc/gpio.h>
+/* EC in RW */
+#define GPIO_EC_IN_RW GPP_C6
+
/* BIOS Flash Write Protect */
#define GPIO_PCH_WP GPP_C23