summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-12-22 03:12:38 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-01 15:40:11 +0200
commit6578475d93c2584942bf58601ee0b07fd925838b (patch)
tree3a458dec26d8e00ccad429c5aaf4ba152b162287 /src/mainboard
parent9ab1c106c3ec88adfefc0dfe237e538e33f2750d (diff)
ChromeOS: Use common fill_lb_gpio()
Change-Id: I2ba7a1c2b2e6ce2c00c9a2916141bed67930ba2d Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/5586 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/bolt/chromeos.c15
-rw-r--r--src/mainboard/google/butterfly/chromeos.c2
-rw-r--r--src/mainboard/google/falco/chromeos.c15
-rw-r--r--src/mainboard/google/link/chromeos.c2
-rw-r--r--src/mainboard/google/parrot/chromeos.c2
-rw-r--r--src/mainboard/google/peppy/chromeos.c15
-rw-r--r--src/mainboard/google/pit/chromeos.c5
-rw-r--r--src/mainboard/google/rambi/chromeos.c13
-rw-r--r--src/mainboard/google/slippy/chromeos.c15
-rw-r--r--src/mainboard/google/snow/chromeos.c5
-rw-r--r--src/mainboard/google/stout/chromeos.c2
-rw-r--r--src/mainboard/intel/baskingridge/chromeos.c2
-rw-r--r--src/mainboard/intel/emeraldlake2/chromeos.c2
-rw-r--r--src/mainboard/intel/wtm2/chromeos.c15
-rw-r--r--src/mainboard/samsung/lumpy/chromeos.c2
-rw-r--r--src/mainboard/samsung/stumpy/chromeos.c2
16 files changed, 0 insertions, 114 deletions
diff --git a/src/mainboard/google/bolt/chromeos.c b/src/mainboard/google/bolt/chromeos.c
index 57241017c8..f003f42586 100644
--- a/src/mainboard/google/bolt/chromeos.c
+++ b/src/mainboard/google/bolt/chromeos.c
@@ -36,8 +36,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
static int get_lid_switch(void)
{
@@ -50,19 +48,6 @@ static int get_lid_switch(void)
#endif
}
-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;
diff --git a/src/mainboard/google/butterfly/chromeos.c b/src/mainboard/google/butterfly/chromeos.c
index 397679aa0f..8f249c641e 100644
--- a/src/mainboard/google/butterfly/chromeos.c
+++ b/src/mainboard/google/butterfly/chromeos.c
@@ -28,8 +28,6 @@
#include <ec/quanta/ene_kb3940q/ec.h>
#include "ec.h"
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
#define WP_GPIO 6
#define DEVMODE_GPIO 54
#define FORCE_RECOVERY_MODE 0
diff --git a/src/mainboard/google/falco/chromeos.c b/src/mainboard/google/falco/chromeos.c
index 780e58f2f9..0056dfdb39 100644
--- a/src/mainboard/google/falco/chromeos.c
+++ b/src/mainboard/google/falco/chromeos.c
@@ -33,8 +33,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
static int get_lid_switch(void)
{
@@ -47,19 +45,6 @@ static int get_lid_switch(void)
#endif
}
-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;
diff --git a/src/mainboard/google/link/chromeos.c b/src/mainboard/google/link/chromeos.c
index 33069b15f1..bf6d4288c5 100644
--- a/src/mainboard/google/link/chromeos.c
+++ b/src/mainboard/google/link/chromeos.c
@@ -30,8 +30,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
static int get_lid_switch(void)
{
diff --git a/src/mainboard/google/parrot/chromeos.c b/src/mainboard/google/parrot/chromeos.c
index 1e79e4bb40..fcf6374c7e 100644
--- a/src/mainboard/google/parrot/chromeos.c
+++ b/src/mainboard/google/parrot/chromeos.c
@@ -28,8 +28,6 @@
#include <ec/compal/ene932/ec.h>
#include "ec.h"
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
#ifndef __PRE_RAM__
#include <boot/coreboot_tables.h>
diff --git a/src/mainboard/google/peppy/chromeos.c b/src/mainboard/google/peppy/chromeos.c
index 780e58f2f9..0056dfdb39 100644
--- a/src/mainboard/google/peppy/chromeos.c
+++ b/src/mainboard/google/peppy/chromeos.c
@@ -33,8 +33,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
static int get_lid_switch(void)
{
@@ -47,19 +45,6 @@ static int get_lid_switch(void)
#endif
}
-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;
diff --git a/src/mainboard/google/pit/chromeos.c b/src/mainboard/google/pit/chromeos.c
index ae219bb421..08b4e99dbd 100644
--- a/src/mainboard/google/pit/chromeos.c
+++ b/src/mainboard/google/pit/chromeos.c
@@ -26,11 +26,6 @@
#include <cpu/samsung/exynos5420/cpu.h>
#include <cpu/samsung/exynos5420/gpio.h>
-enum {
- ACTIVE_LOW = 0,
- ACTIVE_HIGH = 1
-};
-
void fill_lb_gpios(struct lb_gpios *gpios)
{
int count = 0;
diff --git a/src/mainboard/google/rambi/chromeos.c b/src/mainboard/google/rambi/chromeos.c
index 636aae112b..9223858e25 100644
--- a/src/mainboard/google/rambi/chromeos.c
+++ b/src/mainboard/google/rambi/chromeos.c
@@ -36,8 +36,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
static int get_lid_switch(void)
{
@@ -51,17 +49,6 @@ static int get_lid_switch(void)
#endif
}
-static void fill_lb_gpio(struct lb_gpio *gpio, int port, int polarity,
- const char *name, int force)
-{
- memset(gpio, 0, sizeof(*gpio));
- gpio->port = port;
- gpio->polarity = polarity;
- if (force >= 0)
- gpio->value = force;
- strncpy((char *)gpio->name, name, GPIO_MAX_NAME_LENGTH);
-}
-
void fill_lb_gpios(struct lb_gpios *gpios)
{
struct lb_gpio *gpio;
diff --git a/src/mainboard/google/slippy/chromeos.c b/src/mainboard/google/slippy/chromeos.c
index 780e58f2f9..0056dfdb39 100644
--- a/src/mainboard/google/slippy/chromeos.c
+++ b/src/mainboard/google/slippy/chromeos.c
@@ -33,8 +33,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
static int get_lid_switch(void)
{
@@ -47,19 +45,6 @@ static int get_lid_switch(void)
#endif
}
-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;
diff --git a/src/mainboard/google/snow/chromeos.c b/src/mainboard/google/snow/chromeos.c
index 2b830a12ff..c525a81b9a 100644
--- a/src/mainboard/google/snow/chromeos.c
+++ b/src/mainboard/google/snow/chromeos.c
@@ -26,11 +26,6 @@
#include <cpu/samsung/exynos5250/cpu.h>
#include <cpu/samsung/exynos5250/gpio.h>
-enum {
- ACTIVE_LOW = 0,
- ACTIVE_HIGH = 1
-};
-
void fill_lb_gpios(struct lb_gpios *gpios)
{
int count = 0;
diff --git a/src/mainboard/google/stout/chromeos.c b/src/mainboard/google/stout/chromeos.c
index 297626cd84..74955de08d 100644
--- a/src/mainboard/google/stout/chromeos.c
+++ b/src/mainboard/google/stout/chromeos.c
@@ -32,8 +32,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 7
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
void fill_lb_gpios(struct lb_gpios *gpios)
{
diff --git a/src/mainboard/intel/baskingridge/chromeos.c b/src/mainboard/intel/baskingridge/chromeos.c
index 7b64f10604..7efd06528a 100644
--- a/src/mainboard/intel/baskingridge/chromeos.c
+++ b/src/mainboard/intel/baskingridge/chromeos.c
@@ -29,8 +29,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
void fill_lb_gpios(struct lb_gpios *gpios)
{
diff --git a/src/mainboard/intel/emeraldlake2/chromeos.c b/src/mainboard/intel/emeraldlake2/chromeos.c
index 2194973fb5..72adaf7008 100644
--- a/src/mainboard/intel/emeraldlake2/chromeos.c
+++ b/src/mainboard/intel/emeraldlake2/chromeos.c
@@ -28,8 +28,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
void fill_lb_gpios(struct lb_gpios *gpios)
{
diff --git a/src/mainboard/intel/wtm2/chromeos.c b/src/mainboard/intel/wtm2/chromeos.c
index a5ca4eb88b..9c4c3b4228 100644
--- a/src/mainboard/intel/wtm2/chromeos.c
+++ b/src/mainboard/intel/wtm2/chromeos.c
@@ -32,21 +32,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
-
-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)
{
diff --git a/src/mainboard/samsung/lumpy/chromeos.c b/src/mainboard/samsung/lumpy/chromeos.c
index c9fa1d973f..bdc0148aa5 100644
--- a/src/mainboard/samsung/lumpy/chromeos.c
+++ b/src/mainboard/samsung/lumpy/chromeos.c
@@ -39,8 +39,6 @@
#include <ec/smsc/mec1308/ec.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
void fill_lb_gpios(struct lb_gpios *gpios)
{
diff --git a/src/mainboard/samsung/stumpy/chromeos.c b/src/mainboard/samsung/stumpy/chromeos.c
index be1837061e..731126c04e 100644
--- a/src/mainboard/samsung/stumpy/chromeos.c
+++ b/src/mainboard/samsung/stumpy/chromeos.c
@@ -36,8 +36,6 @@
#include <boot/coreboot_tables.h>
#define GPIO_COUNT 6
-#define ACTIVE_LOW 0
-#define ACTIVE_HIGH 1
void fill_lb_gpios(struct lb_gpios *gpios)
{