summaryrefslogtreecommitdiff
path: root/drivers/serial/altera_uart.c
diff options
context:
space:
mode:
authorScott McNutt <smcnutt@psyent.com>2010-03-21 21:24:43 -0400
committerScott McNutt <smcnutt@psyent.com>2010-04-02 12:28:41 -0400
commit3ea0037f2337de692b5fd2b6a4449db1de3067a2 (patch)
treedc79b32082081baa60f5ef8e43ca774814e5eeba /drivers/serial/altera_uart.c
parent64da04d24ea685483f9afa07088f76931b6c0e01 (diff)
downloadu-boot-imx-3ea0037f2337de692b5fd2b6a4449db1de3067a2.zip
u-boot-imx-3ea0037f2337de692b5fd2b6a4449db1de3067a2.tar.gz
u-boot-imx-3ea0037f2337de692b5fd2b6a4449db1de3067a2.tar.bz2
nios2: Fix outx/writex parameter order in io.h
The outx/writex macros were using writex(addr, val) rather than the standard writex(val, addr), resulting in incompatibilty with architecture independent components. This change set uses standard parameter order. Signed-off-by: Scott McNutt <smcnutt@psyent.com>
Diffstat (limited to 'drivers/serial/altera_uart.c')
-rw-r--r--drivers/serial/altera_uart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 995e374..045f119 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -50,7 +50,7 @@ void serial_setbrg (void)
unsigned div;
div = (CONFIG_SYS_CLK_FREQ/gd->baudrate)-1;
- writel (&uart->divisor,div);
+ writel (div, &uart->divisor);
return;
}
@@ -71,7 +71,7 @@ void serial_putc (char c)
serial_putc ('\r');
while ((readl (&uart->status) & NIOS_UART_TRDY) == 0)
WATCHDOG_RESET ();
- writel (&uart->txdata,(unsigned char)c);
+ writel ((unsigned char)c, &uart->txdata);
}
void serial_puts (const char *s)