Re: [PATCH 1/3] omap mailbox: cleanup register definition with macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux