diff options
author | Scott McNutt <smcnutt@psyent.com> | 2010-03-21 21:24:43 -0400 |
---|---|---|
committer | Scott McNutt <smcnutt@psyent.com> | 2010-04-02 12:28:41 -0400 |
commit | 3ea0037f2337de692b5fd2b6a4449db1de3067a2 (patch) | |
tree | dc79b32082081baa60f5ef8e43ca774814e5eeba /drivers/serial | |
parent | 64da04d24ea685483f9afa07088f76931b6c0e01 (diff) | |
download | u-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')
-rw-r--r-- | drivers/serial/altera_jtag_uart.c | 2 | ||||
-rw-r--r-- | drivers/serial/altera_uart.c | 4 | ||||
-rw-r--r-- | drivers/serial/opencores_yanu.c | 12 |
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c index 9eccaa0..fb28aa9 100644 --- a/drivers/serial/altera_jtag_uart.c +++ b/drivers/serial/altera_jtag_uart.c @@ -40,7 +40,7 @@ void serial_putc (char c) { while (NIOS_JTAG_WSPACE ( readl (&jtag->control)) == 0) WATCHDOG_RESET (); - writel (&jtag->data, (unsigned char)c); + writel ((unsigned char)c, &jtag->data); } void serial_puts (const char *s) 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) diff --git a/drivers/serial/opencores_yanu.c b/drivers/serial/opencores_yanu.c index dacda53..f18f7f4 100644 --- a/drivers/serial/opencores_yanu.c +++ b/drivers/serial/opencores_yanu.c @@ -61,7 +61,7 @@ void serial_setbrg (void) ((unsigned)CONFIG_SYS_CLK_FREQ >> k); baud = best_m + best_n * YANU_BAUDE; - writel(&uart->baud, baud); + writel(baud, &uart->baud); return; } @@ -92,7 +92,7 @@ void serial_setbrg (void) ((unsigned)CONFIG_SYS_CLK_FREQ >> k); baud = best_m + best_n * YANU_BAUDE; - writel(&uart->baud, baud); + writel(baud, &uart->baud); return; } @@ -113,7 +113,7 @@ int serial_init (void) YANU_ACTION_RPE | YANU_ACTION_RFE | YANU_ACTION_RFIFO_CLEAR | YANU_ACTION_TFIFO_CLEAR; - writel(&uart->action, action); + writel(action, &uart->action); /* control register cleanup */ /* no interrupts enabled */ @@ -127,7 +127,7 @@ int serial_init (void) control |= YANU_CONTROL_RDYDLY * YANU_RXFIFO_DLY; control |= YANU_CONTROL_TXTHR * YANU_TXFIFO_THR; - writel(&uart->control, control); + writel(control, &uart->control); /* to set baud rate */ serial_setbrg(); @@ -156,7 +156,7 @@ void serial_putc (char c) WATCHDOG_RESET (); } - writel(&uart->data, (unsigned char)c); + writel((unsigned char)c, &uart->data); } void serial_puts (const char *s) @@ -182,7 +182,7 @@ int serial_getc (void) WATCHDOG_RESET (); /* first we pull the char */ - writel(&uart->action, YANU_ACTION_RFIFO_PULL); + writel(YANU_ACTION_RFIFO_PULL, &uart->action); return(readl(&uart->data) & YANU_DATA_CHAR_MASK); } |