lkml.org 
[lkml]   [2011]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V3 3/4] ARM: Xilinx: base header files and assembly macros
Date
On Thursday 17 February 2011, John Linn wrote:
> > > +
> > > +#define UART_FIFO_WRITE(base, value) \
> > > + (*(volatile unsigned int *)((base) + UART_FIFO_OFFSET) =
> (value))
> > > +
> > > +#define UART_STATUS(base) \
> > > + (*(volatile unsigned int *)((base) + UART_SR_OFFSET))
> >
> > You could probably make these static inline functions in the header
> and
> > use __raw_{readl,writel}() to make this a little cleaner.
> >
>
> I had considered that, but it wasn't clear to me at the time what the
> compressor could use or not.
>
> I'll give it a try as I agree that's cleaner.

Actually, for correctness you should use the regular readl/writel, not
the __raw_ versions, which can result in reordered or partial accesses
on the bus.

Arnd


\
 
 \ /
  Last update: 2011-02-17 15:43    [W:2.090 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site