diff options
author | Simon Glass <sjg@chromium.org> | 2012-05-08 10:39:27 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2012-05-08 11:31:52 -0700 |
commit | 42842e437848a29cff276715aaef6ee2ebc75584 (patch) | |
tree | ca66b90301ba820c72ffc8d216ce2d87c977f0ad | |
parent | 5b2fa92369a87ee48a5fd43cb53a62af810ace6c (diff) | |
download | chrome-ec-42842e437848a29cff276715aaef6ee2ebc75584.tar.gz |
Move gpio list into gpio.h header file
This is referenced by various files, so should be in the gpio.h header.
BUG=none
TEST=manual:
build and boot on daisy, see that USB download still works
build on all platforms
Change-Id: If579c975ef6c82988b9e411eeaa97c950d9efce4
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | chip/lm4/gpio.c | 4 | ||||
-rw-r--r-- | chip/stm32/gpio-stm32f100.c | 3 | ||||
-rw-r--r-- | chip/stm32/gpio-stm32l15x.c | 3 | ||||
-rw-r--r-- | chip/stm32/keyboard_scan.c | 2 | ||||
-rw-r--r-- | common/gpio_commands.c | 4 | ||||
-rw-r--r-- | include/gpio.h | 3 |
6 files changed, 3 insertions, 16 deletions
diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c index fedfedc6e8..52eb28775a 100644 --- a/chip/lm4/gpio.c +++ b/chip/lm4/gpio.c @@ -24,10 +24,6 @@ static const uint32_t gpio_bases[] = { }; -/* Signal information from board.c. Must match order from enum gpio_signal. */ -extern const struct gpio_info gpio_list[GPIO_COUNT]; - - /* Find the index of a GPIO port base address (LM4_GPIO_[A-Q]); this is used by * the clock gating registers. Returns the index, or -1 if no match. */ static int find_gpio_port_index(uint32_t port_base) diff --git a/chip/stm32/gpio-stm32f100.c b/chip/stm32/gpio-stm32f100.c index db4c918ae2..2dad777f80 100644 --- a/chip/stm32/gpio-stm32f100.c +++ b/chip/stm32/gpio-stm32f100.c @@ -17,9 +17,6 @@ #define CPUTS(outstr) cputs(CC_GPIO, outstr) #define CPRINTF(format, args...) cprintf(CC_GPIO, format, ## args) -/* Signal information from board.c. Must match order from enum gpio_signal. */ -extern const struct gpio_info gpio_list[GPIO_COUNT]; - /* For each EXTI bit, record which GPIO entry is using it */ static const struct gpio_info *exti_events[16]; diff --git a/chip/stm32/gpio-stm32l15x.c b/chip/stm32/gpio-stm32l15x.c index cd07e61361..3b04e69438 100644 --- a/chip/stm32/gpio-stm32l15x.c +++ b/chip/stm32/gpio-stm32l15x.c @@ -17,9 +17,6 @@ #define CPUTS(outstr) cputs(CC_GPIO, outstr) #define CPRINTF(format, args...) cprintf(CC_GPIO, format, ## args) -/* Signal information from board.c. Must match order from enum gpio_signal. */ -extern const struct gpio_info gpio_list[GPIO_COUNT]; - /* For each EXTI bit, record which GPIO entry is using it */ static const struct gpio_info *exti_events[16]; diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c index 5dd6a9b436..b3d340172e 100644 --- a/chip/stm32/keyboard_scan.c +++ b/chip/stm32/keyboard_scan.c @@ -23,8 +23,6 @@ #define CPUTS(outstr) cputs(CC_KEYSCAN, outstr) #define CPRINTF(format, args...) cprintf(CC_KEYSCAN, format, ## args) -extern const struct gpio_info gpio_list[]; - /* used for select_column() */ enum COL_INDEX { COL_ASSERT_ALL = -2, diff --git a/common/gpio_commands.c b/common/gpio_commands.c index c1f444a0c7..1f32cc2e5e 100644 --- a/common/gpio_commands.c +++ b/common/gpio_commands.c @@ -11,10 +11,6 @@ #include "util.h" -/* Signal information from board.c. Must match order from enum gpio_signal. */ -extern const struct gpio_info gpio_list[GPIO_COUNT]; - - /* Find a GPIO signal by name. Returns the signal index, or GPIO_COUNT if * no match. */ static enum gpio_signal find_signal_by_name(const char *name) diff --git a/include/gpio.h b/include/gpio.h index b3bd4258f4..bb19c91a6f 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -51,6 +51,9 @@ struct gpio_info { void (*irq_handler)(enum gpio_signal signal); }; +/* Signal information from board.c. Must match order from enum gpio_signal. */ +extern const struct gpio_info gpio_list[GPIO_COUNT]; + /* Macro for signals which don't exist */ #define GPIO_SIGNAL_NOT_IMPLEMENTED(name) {name, LM4_GPIO_A, 0, 0, NULL} |