diff options
author | Scott McNutt <smcnutt@psyent.com> | 2010-03-22 01:24:43 (GMT) |
---|---|---|
committer | Scott McNutt <smcnutt@psyent.com> | 2010-04-02 16:28:41 (GMT) |
commit | 3ea0037f2337de692b5fd2b6a4449db1de3067a2 (patch) | |
tree | dc79b32082081baa60f5ef8e43ca774814e5eeba /cpu/nios2/epcs.c | |
parent | 64da04d24ea685483f9afa07088f76931b6c0e01 (diff) | |
download | u-boot-3ea0037f2337de692b5fd2b6a4449db1de3067a2.tar.xz |
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 'cpu/nios2/epcs.c')
-rw-r--r-- | cpu/nios2/epcs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpu/nios2/epcs.c b/cpu/nios2/epcs.c index a2e3fe3..ab7d746 100644 --- a/cpu/nios2/epcs.c +++ b/cpu/nios2/epcs.c @@ -85,7 +85,7 @@ static int epcs_cs (int assert) if (assert) { tmp = readl (&epcs->control); - writel (&epcs->control, tmp | NIOS_SPI_SSO); + writel (tmp | NIOS_SPI_SSO, &epcs->control); } else { /* Let all bits shift out */ start = get_timer (0); @@ -93,7 +93,7 @@ static int epcs_cs (int assert) if (get_timer (start) > EPCS_TIMEOUT) return (-1); tmp = readl (&epcs->control); - writel (&epcs->control, tmp & ~NIOS_SPI_SSO); + writel (tmp & ~NIOS_SPI_SSO, &epcs->control); } return (0); } @@ -106,7 +106,7 @@ static int epcs_tx (unsigned char c) while ((readl (&epcs->status) & NIOS_SPI_TRDY) == 0) if (get_timer (start) > EPCS_TIMEOUT) return (-1); - writel (&epcs->txdata, c); + writel (c, &epcs->txdata); return (0); } |