microblaze: usable uart16550 for big endian systems

As a result of the commit 6833260 the uart16550 driver
is broken for Microblaze big endian systems, because of
the missing 3 byte offset. Other than as described, not
all U-Boot BSP will treat properly the 3 byte offset.

This why prefer to mask out the 3 byte offset in general
and setup correct _REG_SIZE value depending on edianess.

Signed-off-by: Stephan Linz <linz@li-pro.net>
Tested-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
Stephan Linz 2011-11-24 12:32:52 +00:00 committed by Wolfgang Denk
parent 94f6142957
commit 1de55ef105
1 changed files with 6 additions and 2 deletions

View File

@ -41,10 +41,14 @@
#elif XILINX_UART16550_BASEADDR
# define CONFIG_SYS_NS16550 1
# define CONFIG_SYS_NS16550_SERIAL
# define CONFIG_SYS_NS16550_REG_SIZE -4
# if defined(__MICROBLAZEEL__)
# define CONFIG_SYS_NS16550_REG_SIZE -4
# else
# define CONFIG_SYS_NS16550_REG_SIZE 4
# endif
# define CONFIG_CONS_INDEX 1
# define CONFIG_SYS_NS16550_COM1 \
(XILINX_UART16550_BASEADDR + 0x1000)
((XILINX_UART16550_BASEADDR & ~0xF) + 0x1000)
# define CONFIG_SYS_NS16550_CLK XILINX_UART16550_CLOCK_HZ
# define CONFIG_BAUDRATE 115200