summaryrefslogtreecommitdiff
path: root/board/bds
diff options
context:
space:
mode:
Diffstat (limited to 'board/bds')
-rw-r--r--board/bds/board.c11
-rw-r--r--board/bds/board.h15
-rw-r--r--board/bds/gpio.inc17
3 files changed, 19 insertions, 24 deletions
diff --git a/board/bds/board.c b/board/bds/board.c
index 7dc4985f9a..8f2142df09 100644
--- a/board/bds/board.c
+++ b/board/bds/board.c
@@ -38,16 +38,7 @@ const struct i2c_port_t i2c_ports[] = {
};
const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
-
-/* GPIO signal list. Must match order from enum gpio_signal. */
-const struct gpio_info gpio_list[] = {
- {"RECOVERY_L", GPIO_D, (1<<1), GPIO_PULL_UP, NULL},
- {"DEBUG_LED", GPIO_A, (1<<7), GPIO_OUT_LOW, NULL},
- /* Unimplemented signals which we need to emulate for now */
- GPIO_SIGNAL_NOT_IMPLEMENTED("WP"),
- GPIO_SIGNAL_NOT_IMPLEMENTED("ENTERING_RW"),
-};
-BUILD_ASSERT(ARRAY_SIZE(gpio_list) == GPIO_COUNT);
+#include "gpio_list.h"
/* Pins with alternate functions */
const struct gpio_alt_func gpio_alt_funcs[] = {
diff --git a/board/bds/board.h b/board/bds/board.h
index 45ed2f9b72..96171e0f57 100644
--- a/board/bds/board.h
+++ b/board/bds/board.h
@@ -43,20 +43,7 @@ enum pwm_channel {
/* Second UART port */
#define CONFIG_UART_HOST 1
-/* GPIO signal list */
-enum gpio_signal {
- GPIO_RECOVERY_L = 0, /* Recovery signal from DOWN button */
- GPIO_DEBUG_LED, /* Debug LED */
- /*
- * Signals which aren't implemented on BDS but we'll emulate anyway, to
- * make it more convenient to debug other code.
- */
- GPIO_WP, /* Write protect input */
- GPIO_ENTERING_RW, /* EC entering RW code */
-
- /* Number of GPIOs; not an actual GPIO */
- GPIO_COUNT
-};
+#include "gpio_signal.h"
/* EEPROM blocks */
#define EEPROM_BLOCK_EOPTION 1 /* EC persistent options */
diff --git a/board/bds/gpio.inc b/board/bds/gpio.inc
new file mode 100644
index 0000000000..f22d0d0d7a
--- /dev/null
+++ b/board/bds/gpio.inc
@@ -0,0 +1,17 @@
+/* -*- mode:c -*-
+ *
+ * Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Recovery signal from DOWN button */
+GPIO(RECOVERY_L, D, 1, GPIO_PULL_UP, NULL)
+GPIO(DEBUG_LED, A, 7, GPIO_OUT_LOW, NULL)
+
+/*
+ * Signals which aren't implemented on BDS but we'll emulate anyway, to
+ * make it more convenient to debug other code.
+ */
+UNIMPLEMENTED(WP) /* Write protect input */
+UNIMPLEMENTED(ENTERING_RW) /* EC entering RW code */