[PATCH 4/4] ARM: Xilinx: base header files and assembly macros
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Feb 8 09:30:32 EST 2011
On Tue, Feb 08, 2011 at 07:08:14AM -0700, John Linn wrote:
> > -----Original Message-----
> > From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
> > Sent: Tuesday, February 08, 2011 1:27 AM
> > To: John Linn
> > Cc: linux-arm-kernel at lists.infradead.org; catalin.marinas at arm.com;
> glikely at secretlab.ca
> > Subject: Re: [PATCH 4/4] ARM: Xilinx: base header files and assembly
> macros
> >
> > On Mon, Feb 07, 2011 at 05:14:13PM -0700, John Linn wrote:
> > > I'm assuming you meant to change all addresses of devices (#defines)
> to
> > > use the IOMEM.
> > >
> > > I did that and it's ok. You also have to cast them to ints when
> putting
> > > the addresses into
> > > the resource for a platform device.
> >
> > Hang on. The reason I mentioned it was because you were passing some
> > of these into readl() et.al. readl() takes the mapped cookie, not the
> > physical address.
> >
> > Physical addresses should be integer like, virtual addresses should be
> > pointer like.
>
> Thanks for clarifying.
>
> It seems like it's better to leave the #defines without IOMEM, then use
> IOMEM where a variable,
> such as the address of the timer, is initialized with the #define.
>
> I see what you mean with regard to readl taking the cookie but yet
> physical addresses are also needed.
readl does not take physical addresses. Ever.
I can't work out what's going on here at the moment, and until I do I don't
see any justification to merging this as long as there is confusion between
what is a physical address and what isn't.
More information about the linux-arm-kernel
mailing list