[coreboot] New patch to review for coreboot: 9ccae34 Google/snow: update the GPIO emulation.

Ronald G. Minnich (rminnich@gmail.com) gerrit at coreboot.org
Wed Feb 27 19:12:56 CET 2013


Ronald G. Minnich (rminnich at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2538

-gerrit

commit 9ccae34b1bf959792244d0d767ed8cda7613e4c1
Author: Ronald G. Minnich <rminnich at gmail.com>
Date:   Wed Feb 27 10:12:03 2013 -0800

    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 at gmail.com>
---
 src/mainboard/google/snow/chromeos.c | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/src/mainboard/google/snow/chromeos.c b/src/mainboard/google/snow/chromeos.c
index 5f8e631..fd2006c 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);
 



More information about the coreboot mailing list