summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/stout
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google/stout')
-rw-r--r--src/mainboard/google/stout/chromeos.c5
-rw-r--r--src/mainboard/google/stout/onboard.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mainboard/google/stout/chromeos.c b/src/mainboard/google/stout/chromeos.c
index e68093f5923f..6bbc640aeaf8 100644
--- a/src/mainboard/google/stout/chromeos.c
+++ b/src/mainboard/google/stout/chromeos.c
@@ -12,6 +12,7 @@
#include <vendorcode/google/chromeos/chromeos.h>
#include "ec.h"
#include <ec/quanta/it8518/ec.h>
+#include "onboard.h"
void fill_lb_gpios(struct lb_gpios *gpios)
{
@@ -35,7 +36,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
int get_write_protect_state(void)
{
- return !get_gpio(7);
+ return !get_gpio(GPIO_SPI_WP);
}
int get_lid_switch(void)
@@ -77,7 +78,7 @@ int get_recovery_mode_switch(void)
static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AH(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
CROS_GPIO_REC_AH(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME),
- CROS_GPIO_WP_AL(7, CROS_GPIO_DEVICE_NAME),
+ CROS_GPIO_WP_AL(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME),
};
void mainboard_chromeos_acpi_generate(void)
diff --git a/src/mainboard/google/stout/onboard.h b/src/mainboard/google/stout/onboard.h
index a31dffd4cd76..2f9b92d14bf0 100644
--- a/src/mainboard/google/stout/onboard.h
+++ b/src/mainboard/google/stout/onboard.h
@@ -11,4 +11,7 @@
#define XHCI_PREBOOT 0 // No PreOS boot support
#define XHCI_STREAMS 1 // Sure, lets have streams
+/* Write protect is active low */
+#define GPIO_SPI_WP 7
+
#endif