
On 3/24/06, Wolfgang Denk wrote:
you wrote:
I have a question about erasing flash sectors, please tell me what steps I did wrong,
...
If I want to erase sector from 20020000 to 20090000 for example, I use
I'm not sure if you mean what you say. For me, this sounds as if you ant to erase the area up to (and probably NOT including) 20090000, but ...
"erase 20020000 2009ffff" to erase flash, it seems to be ok from erase mess=
This obviously erases the next sector, too, i. e. far beyond 20090000.
Thank you very much for your quick reply :-) You're right, I should erase to 20090000.
But when I use "flinfo" command to see whether those sectors are erased or not, it shows the same above message: Bank # 1: SGS Thomson PSD4256G (1 M, uniform sector) Size: 1 MB in 16 Sectors Sector Start Addresses: 20000000 (RO) 20010000 (RO) 20020000 20030000 20040000 20050000 20060000 20070000 20080000 20090000 200A0000 E 200B0000 E 200C0000 E 200D0000 E 200E0000 E 200F0000 (RO)
If I understand correct, sectors from 20020000 to 20090000 should be displayed (E), but those aren't. I don't know what step I did wrong.
Use "md" to verify if the sectors have been erased. If they are, then check why you get a bad display; if they are not erased, fix your flash driver.
After using "md", I see my linux kernel is loaded. As you mentioned, I should fix my flash driver. My flash driver is based on board/atc/flash.c, I think the problem is the function flash_erase(). Since I'm not an expert, would you give me some hints? Thanks in advance.
Can you use the CFI-driver?
Yes, I'll use that, thanks. Besides, I noticed if I use u-boot 1.1.3, the boot prompt display:
U-Boot 1.1.3 (Mar 24 2006 - 01:59:06)
U-Boot code: A3F00000 -> A3F2252C BSS: -> A3F5738C RAM Configuration: Bank #0: a0000000 64 MB Flash: 2 MB
If I use git to download u-boot current source code, the boot prompt display:
U-Boot 1.1.4 (Mar 24 2006 - 02:32:06)
DRAM: 64 MB Flash: 2 MB
I copy the same board/ and my board.h into current source code. Is that normal output? Thanks again.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de Our universe is a fragile house of atoms, held together by the mortar of cause-and-effect. One magician would be two too many. - Terry Pratchett, _The Dark Side of the Sun_
Best regards, Joe.