[U-Boot-Users] [PATCH] fix cfi_flash on LE systems
Ladislav Michl
ladis at linux-mips.org
Wed Jun 9 15:44:29 CEST 2004
Hi,
cfi_flash is missing inclusion of asm/byteorder.h, thus
__LITTLE_ENDIAN is undefined and driver is broken for LE systems.
Once there turn printf into debug as I guess it ought to be.
ladis
Index: drivers/cfi_flash.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/drivers/cfi_flash.c,v
retrieving revision 1.8
diff -u -r1.8 cfi_flash.c
--- drivers/cfi_flash.c 23 Mar 2004 22:14:28 -0000 1.8
+++ drivers/cfi_flash.c 9 Jun 2004 13:24:35 -0000
@@ -46,6 +46,7 @@
#include <common.h>
#include <asm/processor.h>
+#include <asm/byteorder.h>
#include <linux/byteorder/swab.h>
#ifdef CFG_FLASH_CFI_DRIVER
@@ -1038,7 +1039,7 @@
(tmp & 0xffff) ? ((tmp & 0xffff) * 256) : 128;
tmp >>= 16;
erase_region_count = (tmp & 0xffff) + 1;
- printf ("erase_region_count = %d erase_region_size = %d\n",
+ debug ("erase_region_count = %d erase_region_size = %d\n",
erase_region_count, erase_region_size);
for (j = 0; j < erase_region_count; j++) {
info->start[sect_cnt] = sector;
More information about the U-Boot
mailing list