[U-Boot-Users] Flash not-readable??

brian.auld at adic.com brian.auld at adic.com
Tue Mar 25 14:05:23 CET 2003


Wolfgang,

I resolved my flash problems. Thanks to your help, I confirmed that the manufacturer of this flash part varies from ebony to ebony. One of these manufacturers (STM) doesn't work. 

I added support for this manufacturer to the flash driver. I attached a patch if you want to include it in the u-boot source ... or for other having ebony problems.
 
-- Brian

<---------------------- Start of patch ------------------------>
diff -urN u-boot-0.2.0/board/ebony/flash.c u-boot-0.2.0-flash-fix/board/ebony/flash.c
--- u-boot-0.2.0/board/ebony/flash.c	Thu Feb 20 09:03:49 2003
+++ u-boot-0.2.0-flash-fix/board/ebony/flash.c	Mon Mar 24 13:06:32 2003
@@ -327,6 +327,9 @@
 			case (FLASH_WORD_SIZE)SST_MANUFACT:
 				info->flash_id = FLASH_MAN_SST;
 				break;
+			case (FLASH_WORD_SIZE)STM_MANUFACT:
+				info->flash_id = FLASH_MAN_STM;
+				break;
 			default:
 				info->flash_id = FLASH_UNKNOWN;
 				info->sector_count = 0;
@@ -349,6 +352,11 @@
 				info->sector_count = 32;
 				info->size = 0x00200000;
 				break;				/* => 2 MB		*/
+                        case (FLASH_WORD_SIZE)STM_ID_F040B:
+                                info->flash_id += FLASH_AM040;
+                                info->sector_count = 8;
+                                info->size = 0x0080000; /* => 512 ko */
+                                break;				
 			case (FLASH_WORD_SIZE)AMD_ID_F040B:
 				info->flash_id += FLASH_AM040;
 				info->sector_count = 8;
<--------------------- End of patch ----------------------------->


-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de] 
Sent: Thursday, March 20, 2003 4:16 PM
To: brian.auld at adic.com
Cc: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] Flash not-readable?? 

In message <995FF289C9D69747A09E42992644595405B236C3 at penguin.adic.com> you wrote:
> 
> I have this weird problem, or at least it appears weird.

Unfortunately you don't provide enough information,  so  I  can  only
speculate.

> What puzzles me is if there is a problem reading from flash, how does u-boot run in the first place? 

It boots and can access the flash file until it relocates itself into
RAM. When it is trying to check the flash size, it  is  running  into
trouble. Due to bugs in the flash code for this board it fails to reset the flash into read mode, so you continue to read "garbage".

> <-------- 1a Working board start ----------->
> U-Boot 0.2.0 (Feb 20 2003 - 09:46:32)
> 
> IBM PowerPC 440 Rev. C
> Board: IBM 440GP Evaluation Board (Ebony)
>         VCO: 800 MHz
>         CPU: 400 MHz
>         PLB: 133 MHz
>         OPB: 66 MHz
>         EPB: 66 MHz
> I2C:   ready
> DRAM:  I2c read: failed 4
> I2c read: failed 4
^^^^^^^^^^^^^^^^^^^^^

You do have some problems here.

> 128 MB
> FLASH:  4.5 MB

4.5 MB is obviously 2 banks.

> <-------- 1b Uncooperative board start ----------->
...
> FLASH: ## Unknown FLASH on Bank 2 - Size = 0x00000000 = 0 MB
>  4 MB

This is pretty obvious: the second flash bank (0.5 MB) was not detected,
and...

> fff80000: 20e20018 20e20018 20e20018 20e20018     ... ... ... ...
> fff80010: 20e20018 20e20018 20e20018 20e20018     ... ... ... ...
...

...the code left it in auto select mode.

You can try the following to "reset" the second flash bank:
	=> mw fff80000 00F000F0
	=> md fff80000


You may want to check if all board use the same Flash chip type  from
the same manufacturer for the second flash bank (boot flash).


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"If a computer can't directly address all the RAM you can  use,  it's
just a toy."         - anonymous comp.sys.amiga posting, non-sequitir




More information about the U-Boot mailing list