From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Subject: [PATCH v2 04/11] ARM i.MX21: add imx-gpio devices
Date: Mon, 3 Sep 2012 10:18:11 +0200 [thread overview]
Message-ID: <1346660298-18148-5-git-send-email-s.trumtrar@pengutronix.de> (raw)
In-Reply-To: <1346660298-18148-1-git-send-email-s.trumtrar@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
arch/arm/mach-imx/Kconfig | 1 +
arch/arm/mach-imx/imx21.c | 22 +++++++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 112dcb1..c069ae8 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -153,6 +153,7 @@ config ARCH_IMX1
config ARCH_IMX21
bool "i.MX21"
+ select GPIOLIB
select CPU_ARM926T
config ARCH_IMX25
diff --git a/arch/arm/mach-imx/imx21.c b/arch/arm/mach-imx/imx21.c
index bbef33d..264477a 100644
--- a/arch/arm/mach-imx/imx21.c
+++ b/arch/arm/mach-imx/imx21.c
@@ -28,14 +28,18 @@ int imx_silicon_revision(void)
return CID;
}
-void *imx_gpio_base[] = {
- (void *)0x10015000,
- (void *)0x10015100,
- (void *)0x10015200,
- (void *)0x10015300,
- (void *)0x10015400,
- (void *)0x10015500,
-};
+static int imx21_init(void)
+{
+ add_generic_device("imx_iim", 0, NULL, MX51_IIM_BASE_ADDR, SZ_4K,
+ IORESOURCE_MEM, NULL);
-int imx_gpio_count = ARRAY_SIZE(imx_gpio_base) * 32;
+ add_generic_device("imx-gpio", 0, NULL, 0x10015000, 0x100, IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 1, NULL, 0x10015100, 0x100, IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 2, NULL, 0x10015200, 0x100, IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 3, NULL, 0x10015300, 0x100, IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 4, NULL, 0x10015400, 0x100, IORESOURCE_MEM, NULL);
+ add_generic_device("imx-gpio", 5, NULL, 0x10015500, 0x100, IORESOURCE_MEM, NULL);
+ return 0;
+}
+coredevice_initcall(imx21_init);
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-09-03 8:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 8:18 [PATCH v2 00/11] ARM i.MX: add gpiolib support Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 01/11] " Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 02/11] ARM i.MX: switch to " Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 03/11] ARM i.MX1: add imx-gpio devices Steffen Trumtrar
2012-09-03 8:18 ` Steffen Trumtrar [this message]
2012-09-03 8:18 ` [PATCH v2 05/11] ARM i.MX25: " Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 06/11] ARM i.MX27: " Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 07/11] ARM i.MX31: " Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 08/11] ARM i.MX35: " Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 09/11] ARM i.MX51: " Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 10/11] ARM i.MX53: " Steffen Trumtrar
2012-09-03 8:18 ` [PATCH v2 11/11] ARM i.MX6: " Steffen Trumtrar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346660298-18148-5-git-send-email-s.trumtrar@pengutronix.de \
--to=s.trumtrar@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox