From: =?UTF-8?Q?Pawe=C5=82?= Hikiert
Date: Sun, 01 Jul 2007 12:45:28 +0200
Subject: [U-Boot-Users] [patch] additional check against flash size
(oneliner)
Message-ID: <1183286728.8102.2.camel@localhost.localdomain>
List-Id:
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: u-boot@lists.denx.de
hello
i run modified version of at91rm9200dk, without on-board 2mb flash.
u-boot code 'detects' it as as 0-bytes flash chip at address 0 (so it
seems find). but since addr2info function checks against address+size-1
it becomes 0xffffffff. i think this patch won't hurt ;)
diff -Bubrp ../src/u-boot-1.2.0/common/flash.c
u-boot-1.2.0/common/flash.c
--- ../src/u-boot-1.2.0/common/flash.c 2007-01-07 00:13:11.000000000
+0100
+++ u-boot-1.2.0/common/flash.c 2007-06-28 19:31:44.000000000 +0200
@@ -106,6 +106,7 @@ addr2info (ulong addr)
for (i=0, info=&flash_info[0]; iflash_id != FLASH_UNKNOWN &&
+ info->size > 0 &&
addr >= info->start[0] &&
/* WARNING - The '- 1' is needed if the flash
* is at the end of the address space, since
greetings
--
Pawe? Hikiert
WB Electronics