summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu J. Poirier <mathieu.poirier@linaro.org>2011-02-14 15:38:50 -0700
committerMathieu J. Poirier <mathieu.poirier@linaro.org>2011-02-14 15:38:50 -0700
commit95bc71442a8024ef4024ab7e0a240359bb00c7d1 (patch)
treea11b5d4efe975f1193608445686923c6d93d79f1
parentf6511b73f2376a7498f1000e18acffcd3e4248c7 (diff)
Splitting pin configuration for snowball and hrefs.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
-rw-r--r--board/st/u8500/u8500.c40
1 files changed, 23 insertions, 17 deletions
diff --git a/board/st/u8500/u8500.c b/board/st/u8500/u8500.c
index 3b5fdfdd9..0e0aec11a 100644
--- a/board/st/u8500/u8500.c
+++ b/board/st/u8500/u8500.c
@@ -71,19 +71,6 @@ pin_cfg_t gpio_cfg_common[] = {
GPIO27_MC0_DAT2 | PIN_INPUT_PULLUP,
GPIO28_MC0_DAT3 | PIN_INPUT_PULLUP,
- /* MMC2 (POP eMMC) */
- GPIO128_MC2_CLK | PIN_OUTPUT_LOW,
- GPIO129_MC2_CMD | PIN_INPUT_PULLUP,
- GPIO130_MC2_FBCLK | PIN_INPUT_NOPULL,
- GPIO131_MC2_DAT0 | PIN_INPUT_PULLUP,
- GPIO132_MC2_DAT1 | PIN_INPUT_PULLUP,
- GPIO133_MC2_DAT2 | PIN_INPUT_PULLUP,
- GPIO134_MC2_DAT3 | PIN_INPUT_PULLUP,
- GPIO135_MC2_DAT4 | PIN_INPUT_PULLUP,
- GPIO136_MC2_DAT5 | PIN_INPUT_PULLUP,
- GPIO137_MC2_DAT6 | PIN_INPUT_PULLUP,
- GPIO138_MC2_DAT7 | PIN_INPUT_PULLUP,
-
/* MMC4 (On-board eMMC) */
GPIO197_MC4_DAT3 | PIN_INPUT_PULLUP,
GPIO198_MC4_DAT2 | PIN_INPUT_PULLUP,
@@ -122,6 +109,24 @@ pin_cfg_t gpio_cfg_common[] = {
};
/*
+ * Default for href boards.
+ */
+pin_cfg_t gpio_cfg_default[] = {
+ /* MMC2 (POP eMMC) */
+ GPIO128_MC2_CLK | PIN_OUTPUT_LOW,
+ GPIO129_MC2_CMD | PIN_INPUT_PULLUP,
+ GPIO130_MC2_FBCLK | PIN_INPUT_NOPULL,
+ GPIO131_MC2_DAT0 | PIN_INPUT_PULLUP,
+ GPIO132_MC2_DAT1 | PIN_INPUT_PULLUP,
+ GPIO133_MC2_DAT2 | PIN_INPUT_PULLUP,
+ GPIO134_MC2_DAT3 | PIN_INPUT_PULLUP,
+ GPIO135_MC2_DAT4 | PIN_INPUT_PULLUP,
+ GPIO136_MC2_DAT5 | PIN_INPUT_PULLUP,
+ GPIO137_MC2_DAT6 | PIN_INPUT_PULLUP,
+ GPIO138_MC2_DAT7 | PIN_INPUT_PULLUP,
+};
+
+/*
* GPIO pin config for HREF+ V60 board.
* Contains additional settings to common mop500 settings above.
*/
@@ -215,6 +220,11 @@ int board_init(void)
/* Configure GPIO pins needed by U-boot */
db8500_gpio_config_pins(gpio_cfg_common, ARRAY_SIZE(gpio_cfg_common));
+
+ if (u8500_is_snowball())
+ db8500_gpio_config_pins(gpio_cfg_common, ARRAY_SIZE(gpio_cfg_snowball));
+ else
+ db8500_gpio_config_pins(gpio_cfg_common, ARRAY_SIZE(gpio_cfg_default));
return 0;
}
@@ -351,10 +361,6 @@ static void probe_href(void)
board_id = BOARD_ID_HREF;
} else if(u8500_is_snowball()) {
gd->bd->bi_arch_number = MACH_TYPE_SNOWBALL;
-
- db8500_gpio_config_pins(gpio_cfg_snowball,
- ARRAY_SIZE(gpio_cfg_snowball));
-
board_id = BOARD_ID_SNOWBALL;
} else{
/* No GPIOE => HREF+ 2.0 V60 or later */