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

Grant Likely grant.likely at secretlab.ca
Wed Oct 3 01:12:39 EST 2007


On 10/2/07, Peter Korsgaard <jacmet at sunsite.dk> wrote:
> >>>>> "Grant" == Grant Likely <grant.likely at secretlab.ca> 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 c)
>  Grant> +{
>  Grant> +       while ((in_be32(reg_base + 0x8) & 0x08) != 0); /* spin */
>  Grant> +       out_be32(reg_base + 0x4, c);
>
> RX, TX, STATUS and CONTROL defines for the registers would be nice for
> readability.

Good idea, I'll add a patch for that

g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195



More information about the Linuxppc-dev mailing list