summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2007-01-15 13:41:04 +0100
committerWolfgang Denk <wd@denx.de>2007-01-15 13:41:04 +0100
commitf11033e739017c5c4eac55f859b8b222ee8d602c (patch)
tree4b07b98f378e685c096937c2aeca06e006698af7 /drivers
parentddd4123336aad881f50dc34892ac150cfa8143fe (diff)
parentca43ba18e910206ef8063e4b22d282630bff3fd2 (diff)
downloadblackbird-obmc-uboot-f11033e739017c5c4eac55f859b8b222ee8d602c.tar.gz
blackbird-obmc-uboot-f11033e739017c5c4eac55f859b8b222ee8d602c.zip
Merge with /home/hs/SC3/u-boot
Some code cleanup.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cfi_flash.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c
index 2699cce859..8dc44997b8 100644
--- a/drivers/cfi_flash.c
+++ b/drivers/cfi_flash.c
@@ -40,6 +40,10 @@
#include <environment.h>
#ifdef CFG_FLASH_CFI_DRIVER
+#if defined(CONFIG_SOLIDCARD3)
+#define __LITTLE_ENDIAN
+#endif
+
/*
* This file implements a Common Flash Interface (CFI) driver for U-Boot.
* The width of the port and the width of the chips are determined at initialization.
@@ -867,7 +871,7 @@ static void flash_add_byte (flash_info_t * info, cfiword_t * cword, uchar c)
cword->c = c;
break;
case FLASH_CFI_16BIT:
-#if defined(__LITTLE_ENDIAN)
+#if defined(__LITTLE_ENDIAN) && !defined(CONFIG_SOLIDCARD3)
w = c;
w <<= 8;
cword->w = (cword->w >> 8) | w;
@@ -1359,7 +1363,6 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest,
ctladdr.cp = flash_make_addr (info, 0, 0);
cptr.cp = (uchar *) dest;
-
/* Check if Flash is (sufficiently) erased */
switch (info->portwidth) {
case FLASH_CFI_8BIT:
@@ -1531,4 +1534,9 @@ static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp,
}
}
#endif /* CFG_FLASH_USE_BUFFER_WRITE */
+
+#if defined(CONFIG_SOLIDCARD3)
+#undef __LITTLE_ENDIAN
+#endif
+
#endif /* CFG_FLASH_CFI */
OpenPOWER on IntegriCloud