From: Felipe Balbi <me@felipebalbi.com>
To: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/3] omap mailbox: cleanup register definition with macro
Date: Sat, 22 Nov 2008 13:55:01 +0200 [thread overview]
Message-ID: <20081122115500.GB6289@frodo> (raw)
In-Reply-To: <1227313717-26399-1-git-send-email-Hiroshi.DOYU@nokia.com>
On Sat, Nov 22, 2008 at 02:28:35AM +0200, Hiroshi DOYU wrote:
> +static unsigned long mbox_base;
shouldn't this be __void iomem *mbox_base ?
Then you would need a patch like this (not even compile tested):
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 22546d0..7aa68e5 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -48,7 +48,7 @@
#define MAILBOX_IRQSTATUS_3 0x118
#define MAILBOX_IRQENABLE_3 0x11c
-static unsigned long mbox_base;
+static void __iomem *mbox_base;
#define MAILBOX_IRQ_NOTFULL(n) (1 << (2 * (n) + 1))
#define MAILBOX_IRQ_NEWMSG(n) (1 << (2 * (n)))
@@ -75,12 +75,12 @@ static void omap2_mbox_enable_irq(struct omap_mbox *mbox,
static inline unsigned int mbox_read_reg(unsigned int reg)
{
- return __raw_readl((void __iomem *)(mbox_base + reg));
+ return __raw_readl(mbox_base + reg);
}
static inline void mbox_write_reg(unsigned int val, unsigned int reg)
{
- __raw_writel(val, (void __iomem *)(mbox_base + reg));
+ __raw_writel(val, (mbox_base + reg));
}
/* Mailbox H/W preparations */
@@ -268,7 +268,7 @@ static int __init omap2_mbox_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "invalid mem resource\n");
return -ENODEV;
}
- mbox_base = res->start;
+ mbox_base = ioremap(res->start, res->end - res->start);
/* DSP IRQ */
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
--
balbi
prev parent reply other threads:[~2008-11-22 11:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-22 0:28 [PATCH 1/3] omap mailbox: cleanup register definition with macro Hiroshi DOYU
2008-11-22 0:28 ` [PATCH 2/3] omap mailbox: add initial omap3 support Hiroshi DOYU
2008-11-22 0:28 ` [PATCH 3/3] omap mailbox: print hardware revision Hiroshi DOYU
2008-11-22 11:57 ` [PATCH 2/3] omap mailbox: add initial omap3 support Felipe Balbi
2008-11-22 21:09 ` Hiroshi DOYU
2008-11-22 11:55 ` Felipe Balbi [this message]
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=20081122115500.GB6289@frodo \
--to=me@felipebalbi.com \
--cc=Hiroshi.DOYU@nokia.com \
--cc=linux-omap@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.