summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-02-27 10:12:03 -0800
committerRonald G. Minnich <rminnich@gmail.com>2013-02-27 19:27:45 +0100
commiteeb36326b9402aaa009c0a672c3b3ecb80300297 (patch)
tree75f370a1004403a5f7c9e510c4b58d9334ff2a2c /src
parentfc14874352a07a11d91f59ae24e0b162b85821c8 (diff)
Google/snow: update the GPIO emulation.
Add two more GPIOs (total 6) as needed by the Google Snow laptop. These are faking out settings for now. This code is tested and working. Change-Id: I2077ffb8b85958eefdf54e19763d57cc1178ce89 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/2538 Reviewed-by: Peter Stuge <peter@stuge.se> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/snow/chromeos.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/mainboard/google/snow/chromeos.c b/src/mainboard/google/snow/chromeos.c
index 5f8e6312d5..fd2006c751 100644
--- a/src/mainboard/google/snow/chromeos.c
+++ b/src/mainboard/google/snow/chromeos.c
@@ -34,7 +34,7 @@
#include <boot/coreboot_tables.h>
#include <arch/coreboot_tables.h>
-#define GPIO_COUNT 4
+#define GPIO_COUNT 6
void fill_lb_gpios(struct lb_gpios *gpios)
{
@@ -55,18 +55,30 @@ void fill_lb_gpios(struct lb_gpios *gpios)
gpios->gpios[1].value = 0;
strncpy((char *)gpios->gpios[1].name,"recovery", GPIO_MAX_NAME_LENGTH);
- /* Developer: virtual GPIO active high */
+ /* Lid: the "switch" comes from the EC */
gpios->gpios[2].port = -1;
gpios->gpios[2].polarity = ACTIVE_HIGH;
- gpios->gpios[2].value = 1;
- strncpy((char *)gpios->gpios[2].name,"developer",
- GPIO_MAX_NAME_LENGTH);
+ gpios->gpios[2].value = 0;
+ strncpy((char *)gpios->gpios[2].name,"lid", GPIO_MAX_NAME_LENGTH);
- /* Was VGA Option ROM loaded? */
- gpios->gpios[3].port = -1; /* Indicate that this is a pseudo GPIO */
+ /* Power: hardcoded as not pressed */
+ gpios->gpios[3].port = -1;
gpios->gpios[3].polarity = ACTIVE_HIGH;
gpios->gpios[3].value = 0;
- strncpy((char *)gpios->gpios[3].name,"oprom", GPIO_MAX_NAME_LENGTH);
+ strncpy((char *)gpios->gpios[3].name,"power", GPIO_MAX_NAME_LENGTH);
+
+ /* Developer: virtual GPIO active high */
+ gpios->gpios[4].port = -1;
+ gpios->gpios[4].polarity = ACTIVE_HIGH;
+ gpios->gpios[4].value = 0;
+ strncpy((char *)gpios->gpios[4].name,"developer",
+ GPIO_MAX_NAME_LENGTH);
+
+ /* Was VGA Option ROM loaded? */
+ gpios->gpios[5].port = -1; /* Indicate that this is a pseudo GPIO */
+ gpios->gpios[5].polarity = ACTIVE_HIGH;
+ gpios->gpios[5].value = 0;
+ strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
printk(BIOS_ERR, "Added %d GPIOS size %d\n", GPIO_COUNT, gpios->size);