[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111007085114.GE21464@n2100.arm.linux.org.uk>
Date: Fri, 7 Oct 2011 09:51:14 +0100
From: Russell King - ARM Linux <linux@....linux.org.uk>
To: Eric Miao <eric.y.miao@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Jason Chagas <jason.chagas@...vell.com>,
Haojian Zhuang <haojian.zhuang@...vell.com>
Subject: Re: [PATCH 13/26] ARM: pxa: use correct __iomem annotations
On Fri, Oct 07, 2011 at 04:11:01PM +0800, Eric Miao wrote:
> To be honest, I'd really like to keep the *_VIRT_BASE definitions to be
> type independent.
>
> And have the actual register definitions to be casted to void __iomem *
> when being defined, e.g.
>
> #define APBC_REG(x) IOMEM(APBC_VIRT_BASE + (x))
>
> #define APBC_UART1 APBC_REG(0x000)
>
> Arnd, do we have some standard guidelines on this for all SoCs
> to follow? As I know, it's currently still being a mess.
It makes much more sense for the base address to be correctly typed (even
though it does mean a cast in the map_desc tables). It avoids type
problems if someone does readl(APBC_VIRT_BASE + reg) somewhere, and
also avoids type problems should someone decide to pass the base address
around.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists