summaryrefslogtreecommitdiff
path: root/board/altera/common/AMDLV065D.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 /board/altera/common/AMDLV065D.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 'board/altera/common/AMDLV065D.c')
-rw-r--r--board/altera/common/AMDLV065D.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/board/altera/common/AMDLV065D.c b/board/altera/common/AMDLV065D.c
index 0fcf354..72b0a9f 100644
--- a/board/altera/common/AMDLV065D.c
+++ b/board/altera/common/AMDLV065D.c
@@ -122,12 +122,12 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
for (sect = s_first; sect <= s_last; sect++) {
if (info->protect[sect] == 0) { /* not protected */
addr2 = (unsigned char *) info->start[sect];
- writeb (addr, 0xaa);
- writeb (addr, 0x55);
- writeb (addr, 0x80);
- writeb (addr, 0xaa);
- writeb (addr, 0x55);
- writeb (addr2, 0x30);
+ writeb (0xaa, addr);
+ writeb (0x55, addr);
+ writeb (0x80, addr);
+ writeb (0xaa, addr);
+ writeb (0x55, addr);
+ writeb (0x30, addr2);
/* Now just wait for 0xff & provide some user
* feedback while we wait.
*/
@@ -169,9 +169,9 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
return (2);
}
- writeb (cmd, 0xaa);
- writeb (cmd, 0x55);
- writeb (cmd, 0xa0);
+ writeb (0xaa, cmd);
+ writeb (0x55, cmd);
+ writeb (0xa0, cmd);
writeb (dst, b);
/* Verify write */