summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/armv7/omap3
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-10-26 14:03:08 -0400
committerTom Rini <trini@ti.com>2014-10-26 14:03:08 -0400
commit84a6df09c78bc9e9cbc6265d99c9097f5f1079f2 (patch)
tree3b2bf1b3689e9aad0d20f5a69ada168cae3cc769 /arch/arm/cpu/armv7/omap3
parentc69ecd9722af22d50295eff81d0b9cd5b8adc2e0 (diff)
parentc2ded962d4703a3f9522553004db4a6fe540f7e6 (diff)
downloadblackbird-obmc-uboot-84a6df09c78bc9e9cbc6265d99c9097f5f1079f2.tar.gz
blackbird-obmc-uboot-84a6df09c78bc9e9cbc6265d99c9097f5f1079f2.zip
Merge git://git.denx.de/u-boot-dm
Fix a trivial conflict over adding <dm.h> Conflicts: arch/arm/cpu/armv7/omap3/board.c Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/omap3')
-rw-r--r--arch/arm/cpu/armv7/omap3/board.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/omap3/board.c b/arch/arm/cpu/armv7/omap3/board.c
index a1c5b09916..c942fe67ee 100644
--- a/arch/arm/cpu/armv7/omap3/board.c
+++ b/arch/arm/cpu/armv7/omap3/board.c
@@ -17,6 +17,7 @@
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
+#include <dm.h>
#include <mmc.h>
#include <spl.h>
#include <asm/io.h>
@@ -24,7 +25,7 @@
#include <asm/arch/mem.h>
#include <asm/cache.h>
#include <asm/armv7.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
#include <asm/omap_common.h>
#include <asm/arch/mmc_host_def.h>
#include <i2c.h>
@@ -39,6 +40,27 @@ static void omap3_setup_aux_cr(void);
static void omap3_invalidate_l2_cache_secure(void);
#endif
+#ifdef CONFIG_DM_GPIO
+static const struct omap_gpio_platdata omap34xx_gpio[] = {
+ { 0, OMAP34XX_GPIO1_BASE, METHOD_GPIO_24XX },
+ { 1, OMAP34XX_GPIO2_BASE, METHOD_GPIO_24XX },
+ { 2, OMAP34XX_GPIO3_BASE, METHOD_GPIO_24XX },
+ { 3, OMAP34XX_GPIO4_BASE, METHOD_GPIO_24XX },
+ { 4, OMAP34XX_GPIO5_BASE, METHOD_GPIO_24XX },
+ { 5, OMAP34XX_GPIO6_BASE, METHOD_GPIO_24XX },
+};
+
+U_BOOT_DEVICES(am33xx_gpios) = {
+ { "gpio_omap", &omap34xx_gpio[0] },
+ { "gpio_omap", &omap34xx_gpio[1] },
+ { "gpio_omap", &omap34xx_gpio[2] },
+ { "gpio_omap", &omap34xx_gpio[3] },
+ { "gpio_omap", &omap34xx_gpio[4] },
+ { "gpio_omap", &omap34xx_gpio[5] },
+};
+
+#else
+
static const struct gpio_bank gpio_bank_34xx[6] = {
{ (void *)OMAP34XX_GPIO1_BASE, METHOD_GPIO_24XX },
{ (void *)OMAP34XX_GPIO2_BASE, METHOD_GPIO_24XX },
@@ -50,6 +72,8 @@ static const struct gpio_bank gpio_bank_34xx[6] = {
const struct gpio_bank *const omap_gpio_bank = gpio_bank_34xx;
+#endif
+
#ifdef CONFIG_SPL_BUILD
/*
* We use static variables because global data is not ready yet.
OpenPOWER on IntegriCloud