Skip to contentSkip to conversation

fix cfi_flash on LE systems

PATCH New Ladislav Michl 2 participants 2 messages Jun 9, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix cfi_flash on LE systems

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

cfi_flash.c +2 -1
diff -u -r1.8 cfi_flash.c
@@ -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;
#1 lore raw

PATCH 1/1 fix cfi_flash on LE systems

Quoted 4 lines · In message <20040609134429.GA6663@umax645sx> you wrote:

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.

Both patches were checked in just today.

Sorry it took so long.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Accident: A condition in which presence of mind is good, but  absence
of body is better.