[PATCH 03/12] ARM: AM33xx: Add gpio support

Teresa Gámez t.gamez at phytec.de
Mon Jul 8 09:17:01 EDT 2013


Register GPIO banks for AM33xx boards.

Signed-off-by: Teresa Gámez <t.gamez at phytec.de>
---
 arch/arm/mach-omap/am33xx_generic.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap/am33xx_generic.c b/arch/arm/mach-omap/am33xx_generic.c
index 9806fbe..ac99035 100644
--- a/arch/arm/mach-omap/am33xx_generic.c
+++ b/arch/arm/mach-omap/am33xx_generic.c
@@ -141,3 +141,17 @@ const struct gpmc_config am33xx_nand_cfg = {
 	.base = 0x08000000,
 	.size = GPMC_SIZE_16M,
 };
+
+static int am33xx_gpio_init(void)
+{
+	add_generic_device("omap-gpio", 0, NULL, AM33XX_GPIO0_BASE,
+				0xf00, IORESOURCE_MEM, NULL);
+	add_generic_device("omap-gpio", 1, NULL, AM33XX_GPIO1_BASE,
+				0xf00, IORESOURCE_MEM, NULL);
+	add_generic_device("omap-gpio", 2, NULL, AM33XX_GPIO2_BASE,
+				0xf00, IORESOURCE_MEM, NULL);
+	add_generic_device("omap-gpio", 3, NULL, AM33XX_GPIO3_BASE,
+				0xf00, IORESOURCE_MEM, NULL);
+	return 0;
+}
+coredevice_initcall(am33xx_gpio_init);
-- 
1.7.0.4




More information about the barebox mailing list