[coreboot-gerrit] New patch to review for coreboot: google/jecht: Fix compiling GPIO table code

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue Jun 30 12:41:55 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10723

-gerrit

commit 717b37c21e28269c264cc9c05c0aa11cc310d4fd
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Tue Jun 30 12:40:43 2015 +0200

    google/jecht: Fix compiling GPIO table code
    
    A lot changed here between Chrome OS and upstream, and these changes are
    needed to reflect that.
    
    Change-Id: I7195861465388d0f6a7cb540ebf4e410e38c260a
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
 src/mainboard/google/jecht/chromeos.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/mainboard/google/jecht/chromeos.c b/src/mainboard/google/jecht/chromeos.c
index 415db05..46c9871 100644
--- a/src/mainboard/google/jecht/chromeos.c
+++ b/src/mainboard/google/jecht/chromeos.c
@@ -39,19 +39,6 @@
 
 #define GPIO_COUNT	6
 
-static void fill_lb_gpio(struct lb_gpio *gpio, int num,
-			 int polarity, const char *name, int force)
-{
-	memset(gpio, 0, sizeof(*gpio));
-	gpio->port = num;
-	gpio->polarity = polarity;
-	if (force >= 0)
-		gpio->value = force;
-	else if (num >= 0)
-		gpio->value = get_gpio(num);
-	strncpy((char *)gpio->name, name, GPIO_MAX_NAME_LENGTH);
-}
-
 void fill_lb_gpios(struct lb_gpios *gpios)
 {
 	struct lb_gpio *gpio;
@@ -60,14 +47,15 @@ void fill_lb_gpios(struct lb_gpios *gpios)
 	gpios->count = GPIO_COUNT;
 
 	gpio = gpios->gpios;
-	fill_lb_gpio(gpio++, GPIO_SPI_WP, ACTIVE_HIGH, "write protect", 0);
+	fill_lb_gpio(gpio++, GPIO_SPI_WP, ACTIVE_HIGH, "write protect",
+		     get_gpio(GPIO_SPI_WP));
 	fill_lb_gpio(gpio++, GPIO_REC_MODE, ACTIVE_LOW, "recovery",
 		     get_recovery_mode_switch());
 	fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "developer",
 		     get_developer_mode_switch());
 	fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid", 1);
 	fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
-	fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", oprom_is_loaded);
+	fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
 }
 #endif
 



More information about the coreboot-gerrit mailing list