summaryrefslogtreecommitdiff
path: root/common/cmd_ide.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-06-26 10:02:52 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-06-26 10:02:52 +0200
commitf0e3d2b42268a9ed8d28c50c662eeba08379ceab (patch)
treeac713d8a69dee7e80af82ff3b3d5b6b3062c5ee7 /common/cmd_ide.c
parent386eda022473394ad8f36b86f2bdc9b4cb816291 (diff)
parentf73e73ba0e422e6f79030d77286dd57becaee16f (diff)
downloadu-boot-imx-f0e3d2b42268a9ed8d28c50c662eeba08379ceab.zip
u-boot-imx-f0e3d2b42268a9ed8d28c50c662eeba08379ceab.tar.gz
u-boot-imx-f0e3d2b42268a9ed8d28c50c662eeba08379ceab.tar.bz2
Merge with /home/wd/git/u-boot/master
Diffstat (limited to 'common/cmd_ide.c')
-rw-r--r--common/cmd_ide.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 41621ba..a415502 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -855,7 +855,7 @@ output_data_short(int dev, ulong *sect_buf, int words)
/* We only need to swap data if we are running on a big endian cpu. */
/* But Au1x00 cpu:s already swaps data in big endian mode! */
-#if defined(__LITTLE_ENDIAN) || defined(CONFIG_AU1X00)
+#if defined(__LITTLE_ENDIAN) || ( defined(CONFIG_AU1X00) && !defined(CONFIG_GTH2) )
#define input_swap_data(x,y,z) input_data(x,y,z)
#else
static void
@@ -881,8 +881,13 @@ input_swap_data(int dev, ulong *sect_buf, int words)
debug("in input swap data base for read is %lx\n", (unsigned long) pbuf);
while (words--) {
+#ifdef __MIPS__
+ *dbuf++ = swab16p((u16*)pbuf);
+ *dbuf++ = swab16p((u16*)pbuf);
+#else
*dbuf++ = ld_le16(pbuf);
*dbuf++ = ld_le16(pbuf);
+#endif /* !MIPS */
}
#endif
}