mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 8/9] ARM i.MX IIM: switch to resources
Date: Thu, 28 Jul 2011 09:59:44 +0200	[thread overview]
Message-ID: <1311839985-11285-9-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/iim.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-imx/iim.c b/arch/arm/mach-imx/iim.c
index 69e78ff..852f75b 100644
--- a/arch/arm/mach-imx/iim.c
+++ b/arch/arm/mach-imx/iim.c
@@ -226,14 +226,14 @@ static int imx_iim_blow_enable_set(struct device_d *dev, struct param_d *param,
 	return dev_param_set_generic(dev, param, blow_enable ? "1" : "0");
 }
 
-static int imx_iim_add_bank(struct device_d *dev, int num)
+static int imx_iim_add_bank(struct device_d *dev, void __iomem *base, int num)
 {
 	struct iim_priv *priv;
 	struct cdev *cdev;
 
 	priv = xzalloc(sizeof (*priv));
 
-	priv->base	= (void __iomem *)dev->map_base;
+	priv->base	= base;
 	priv->bankbase	= priv->base + 0x800 + 0x400 * num;
 	priv->bank	= num;
 	priv->banksize	= 32;
@@ -254,12 +254,15 @@ static int imx_iim_probe(struct device_d *dev)
 	struct imx_iim_platform_data *pdata = dev->platform_data;
 	int err;
 	int i;
+	void __iomem *base;
+
+	base = dev_request_mem_region(dev, 0);
 
 	if (pdata)
 		mac_addr_base = pdata->mac_addr_base;
 
 	for (i = 0; i < 8; i++) {
-		imx_iim_add_bank(dev, i);
+		imx_iim_add_bank(dev, base, i);
 	}
 
 #ifdef CONFIG_IMX_IIM_FUSE_BLOW
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  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 ` [PATCH 4/9] ARM i.MX25 IIM: switch IIM support to use resources Sascha Hauer
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 ` Sascha Hauer [this message]
2011-07-28  7:59 ` [PATCH 9/9] ARM i.MX27: " 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-9-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