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

Arnd Bergmann arnd at arndb.de
Sat Sep 29 05:45:08 EST 2007


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.

	Arnd <><



More information about the Linuxppc-dev mailing list