Re: uart and big-endian targets

2009-01-20 Thread M. Warner Losh
In message: <20090120.133113.-1630673491@bsdimp.com> "M. Warner Losh" writes: : In message: <4976297c.7020...@bluezbox.com> : Oleksandr Tymoshenko writes: : : Yesterday I ran into a "problem" with uart(4) on big-endian MIPS : : board. uart code treats registers as

Re: uart and big-endian targets

2009-01-20 Thread M. Warner Losh
In message: <4976297c.7020...@bluezbox.com> Oleksandr Tymoshenko writes: : Yesterday I ran into a "problem" with uart(4) on big-endian MIPS : board. uart code treats registers as bytes and reads/writes them using : bus_space_read_1/bus_space_write_1. To handle word-aligned registe

uart and big-endian targets

2009-01-20 Thread Oleksandr Tymoshenko
Yesterday I ran into a "problem" with uart(4) on big-endian MIPS board. uart code treats registers as bytes and reads/writes them using bus_space_read_1/bus_space_write_1. To handle word-aligned registers we have regshft in uart_bas structure. It works for little-endian flags where lowest byte