From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/9] ARM i.MX25 IIM: switch IIM support to use resources
Date: Thu, 28 Jul 2011 09:59:40 +0200 [thread overview]
Message-ID: <1311839985-11285-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1311839985-11285-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-imx/imx25.c | 39 +++++----------------------------------
1 files changed, 5 insertions(+), 34 deletions(-)
diff --git a/arch/arm/mach-imx/imx25.c b/arch/arm/mach-imx/imx25.c
index 37eafaf..75ec8c7 100644
--- a/arch/arm/mach-imx/imx25.c
+++ b/arch/arm/mach-imx/imx25.c
@@ -20,6 +20,7 @@
#include <mach/imx-regs.h>
#include <mach/iim.h>
#include <asm/io.h>
+#include <sizes.h>
#include "gpio.h"
@@ -53,41 +54,11 @@ static struct imx_iim_platform_data imx25_iim_pdata = {
.mac_addr_base = IIM_MAC_ADDR,
};
-static struct device_d imx25_iim_dev = {
- .id = -1,
- .name = "imx_iim",
- .map_base = IMX_IIM_BASE,
- .platform_data = &imx25_iim_pdata,
-};
-
-static struct device_d imx25_iim_bank0_dev = {
- .name = "imx_iim_bank",
- .id = 0,
- .map_base = IIM_BANK0_BASE,
- .size = IIM_BANK_SIZE,
-};
-
-static struct device_d imx25_iim_bank1_dev = {
- .name = "imx_iim_bank",
- .id = 1,
- .map_base = IIM_BANK1_BASE,
- .size = IIM_BANK_SIZE,
-};
-
-static struct device_d imx25_iim_bank2_dev = {
- .name = "imx_iim_bank",
- .id = 2,
- .map_base = IIM_BANK2_BASE,
- .size = IIM_BANK_SIZE,
-};
-
-static int imx25_iim_init(void)
+static int imx25_init(void)
{
- register_device(&imx25_iim_dev);
- register_device(&imx25_iim_bank0_dev);
- register_device(&imx25_iim_bank1_dev);
- register_device(&imx25_iim_bank2_dev);
+ add_generic_device("imx_iim", 0, NULL, IMX_IIM_BASE, SZ_4K,
+ IORESOURCE_MEM, &imx25_iim_pdata);
return 0;
}
-coredevice_initcall(imx25_iim_init);
+coredevice_initcall(imx25_init);
--
1.7.5.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2011-07-28 7:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 7:59 i.MX IIM module rework Sascha Hauer
2011-07-28 7:59 ` [PATCH 1/9] ARM i.MX: IIM rework Sascha Hauer
2011-07-28 7:59 ` [PATCH 2/9] ARM i.MX IIM: add support for more SoCs Sascha Hauer
2011-07-28 7:59 ` [PATCH 3/9] ARM i.MX IIM: Make explicit sensing the default Sascha Hauer
2011-07-28 7:59 ` Sascha Hauer [this message]
2011-07-28 7:59 ` [PATCH 5/9] ARM i.MX35: Add IIM support Sascha Hauer
2011-07-28 7:59 ` [PATCH 6/9] ARM i.MX31: " Sascha Hauer
2011-07-28 7:59 ` [PATCH 7/9] ARM i.MX51: " Sascha Hauer
2011-07-28 7:59 ` [PATCH 8/9] ARM i.MX IIM: switch to resources Sascha Hauer
2011-07-28 7:59 ` [PATCH 9/9] ARM i.MX27: Add IIM support Sascha Hauer
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=1311839985-11285-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@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