summaryrefslogtreecommitdiff
path: root/common/cmd_ide.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@fifi.denx.de>2006-06-16 17:32:31 +0200
committerWolfgang Denk <wd@fifi.denx.de>2006-06-16 17:32:31 +0200
commit0c32d96ddd7309b86ff92dfc1f3694908f174cf6 (patch)
tree1136126a58dfc4f89043f65532673128dc3c9b4f /common/cmd_ide.c
parentc12cffc543df621c162ba26e012c7f4ab0af496e (diff)
Add support for gth2 board
Patch by Thomas Lange, Aug 11 2005
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 41621ba982b..a4155029a7b 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
}