summaryrefslogtreecommitdiff
path: root/src/mainboard/google/jecht
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-06-30 12:40:43 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-30 21:33:05 +0200
commitea31f6333648ff25694a5e706c137052d1082aff (patch)
tree4cadf9264d5467e32683000e99f4011b8ce873a2 /src/mainboard/google/jecht
parentb5e20903700dcf9036e8a29acedc9c1df0c67f49 (diff)
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@chromium.org> Reviewed-on: http://review.coreboot.org/10723 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/google/jecht')
-rw-r--r--src/mainboard/google/jecht/chromeos.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/mainboard/google/jecht/chromeos.c b/src/mainboard/google/jecht/chromeos.c
index 415db0552d..46c9871aea 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