Re: [PATCH 01/18] Virtex: Add uartlite bootwrapper driver

2007-10-02 Thread Grant Likely
On 10/2/07, Peter Korsgaard <[EMAIL PROTECTED]> wrote: > > "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: > > Hi, > > Grant> +static int uartlite_open(void) > Grant> +{ > Grant> + /* Clear the RX FIFO */ > Grant> + out_be32(reg_base + 0x0C, 0x2); > Grant> + return 0;

Re: [PATCH 01/18] Virtex: Add uartlite bootwrapper driver

2007-10-02 Thread Peter Korsgaard
> "Grant" == Grant Likely <[EMAIL PROTECTED]> writes: Hi, Grant> +static int uartlite_open(void) Grant> +{ Grant> + /* Clear the RX FIFO */ Grant> + out_be32(reg_base + 0x0C, 0x2); Grant> + return 0; Grant> +} Grant> + Grant> +static void uartlite_putc(unsigned char

Re: [PATCH 01/18] Virtex: Add uartlite bootwrapper driver

2007-09-28 Thread Arnd Bergmann
On Friday 28 September 2007, Josh Boyer wrote: > > > Is cpu_relax even implemented in the bootwrapper? > > No.  And it doesn't need to be :) I think I should learn to read subject lines. You are of course both right. Arnd <>< ___ Linuxppc-dev

Re: [PATCH 01/18] Virtex: Add uartlite bootwrapper driver

2007-09-28 Thread Josh Boyer
On Fri, 28 Sep 2007 14:04:04 -0600 "Grant Likely" <[EMAIL PROTECTED]> wrote: > On 9/28/07, Arnd Bergmann <[EMAIL PROTECTED]> wrote: > > On Friday 28 September 2007, Grant Likely wrote: > > > +static void uartlite_putc(unsigned char c) > > > +{ > > > +while ((in_be32(reg_base + 0x8) & 0x08) != 0);

Re: [PATCH 01/18] Virtex: Add uartlite bootwrapper driver

2007-09-28 Thread Grant Likely
On 9/28/07, Arnd Bergmann <[EMAIL PROTECTED]> wrote: > On Friday 28 September 2007, Grant Likely wrote: > > +static void uartlite_putc(unsigned char c) > > +{ > > +while ((in_be32(reg_base + 0x8) & 0x08) != 0); /* spin */ > > +out_be32(reg_base + 0x4, c); > > +} > > When coding a spin-loop, it's be

Re: [PATCH 01/18] Virtex: Add uartlite bootwrapper driver

2007-09-28 Thread Arnd Bergmann
On Friday 28 September 2007, Grant Likely wrote: > +static void uartlite_putc(unsigned char c) > +{ > +   while ((in_be32(reg_base + 0x8) & 0x08) != 0); /* spin */ > +   out_be32(reg_base + 0x4, c); > +} When coding a spin-loop, it's better to do a cpu_relax() between each attempt.

[PATCH 01/18] Virtex: Add uartlite bootwrapper driver

2007-09-28 Thread Grant Likely
From: Grant Likely <[EMAIL PROTECTED]> Signed-off-by: Grant Likely <[EMAIL PROTECTED]> --- arch/powerpc/boot/Makefile |2 + arch/powerpc/boot/ops.h |1 + arch/powerpc/boot/serial.c |2 + arch/powerpc/boot/uartlite.c | 64 ++ 4 files