Re: [U-Boot] Can not erase first 2 sectors on flash

Thanks for your advice!! When I try to erase across flash bank, I get error message before. "Error: cannot span across banks when they are mapped in reverse order"
Now I fix the order of banks. And I can erase sector across flash bank now.
But I still found that I can not erase first two sector.
On Mon, Jun 14, 2010 at 4:35 PM, Detlev Zundel dzu@denx.de wrote:
Hi Chen Wen,
you should use the u-boot@lists.denx.de address for the emailing list. -owner only reaches the moderators of the list.
I have a platform modify from powerpc 405EP(Taihu evb). I try to port u-boot from Taihu evb by using "taihu_config".
There are 4M+4M flash on the board, but I found that I can not erase
flash
from ff800000--ff803fff.I had try "protect off all" and "erase all", but still don't work.
just like this : => era ff800000 ff803fff
.. done Erased 2 sectors => md ff800000 ff800000: 27051956 682e4eec 4c070a61 00168502 '..Vh.N.L..a.... ff800010: 00000000 00000000 ad640a83 05070201 .........d...... ff800020: 4c696e75 782d322e 362e3332 2e330000 Linux-2.6.32.3.. ff800030: 00000000 00000000 00000000 00000000 ................ ff800040: 1f8b0808 600a074c 0203766d 6c696e75 ....`..L..vmlinu ff800050: 782e6269 6e2e3136 39363100 e45b0f70 x.bin.16961..[.p ff800060: 14559aff 7a7a0213 08cb0881 0d24988e .U..zz.......$..
"erase" command works every where on flash besides "ff800000--ff803fff" Thus I can still erase "ff800000--ff803fff" by using a JTAG. Is there anything wrong in my config(in attachment) ?
This is my flinfo
==================================================================================
Bank # 1: CFI conformant FLASH (16 x 16) Size: 4 MB in 71 Sectors AMD Standard command set, Manufacturer ID: 0xC2, Device ID: 0x22A8 Erase timeout: 16384 ms, write timeout: 1 ms
Sector Start Addresses: FFC00000 FFC02000 FFC04000 FFC06000
FFC08000
FFC0A000 FFC0C000 FFC0E000 FFC10000
FFC20000
FFC30000 FFC40000 FFC50000 FFC60000
FFC70000
FFC80000 FFC90000 FFCA0000 FFCB0000
FFCC0000
FFCD0000 FFCE0000 FFCF0000 FFD00000
FFD10000
FFD20000 FFD30000 FFD40000 FFD50000
FFD60000
FFD70000 FFD80000 FFD90000 FFDA0000
FFDB0000
FFDC0000 FFDD0000 FFDE0000 FFDF0000
FFE00000
FFE10000 FFE20000 FFE30000 FFE40000
FFE50000
FFE60000 FFE70000 FFE80000 FFE90000
FFEA0000
FFEB0000 FFEC0000 FFED0000 FFEE0000
FFEF0000
FFF00000 FFF10000 FFF20000 FFF30000
FFF40000
FFF50000 FFF60000 FFF70000 FFF80000
FFF90000
FFFA0000 RO FFFB0000 RO FFFC0000 RO FFFD0000 RO
FFFE0000 RO
FFFF0000 RO
Bank # 2: CFI conformant FLASH (16 x 16) Size: 4 MB in 71 Sectors AMD Standard command set, Manufacturer ID: 0xC2, Device ID: 0x22A8 Erase timeout: 16384 ms, write timeout: 1 ms
Sector Start Addresses: FF800000 FF802000 FF804000 FF806000
FF808000
FF80A000 FF80C000 FF80E000 FF810000
FF820000
FF830000 FF840000 FF850000 FF860000
FF870000
FF880000 FF890000 FF8A0000 FF8B0000
FF8C0000
FF8D0000 FF8E0000 FF8F0000 FF900000
FF910000
FF920000 FF930000 FF940000 FF950000
FF960000
FF970000 FF980000 FF990000 FF9A0000
FF9B0000
FF9C0000 FF9D0000 FF9E0000 FF9F0000
FFA00000
FFA10000 FFA20000 FFA30000 FFA40000
FFA50000
FFA60000 FFA70000 FFA80000 FFA90000
FFAA0000
FFAB0000 FFAC0000 FFAD0000 FFAE0000
FFAF0000
FFB00000 FFB10000 FFB20000 FFB30000
FFB40000
FFB50000 FFB60000 FFB70000 FFB80000
FFB90000
FFBA0000 FFBB0000 FFBC0000 FFBD0000
FFBE0000
FFBF0000 =>
==================================================================================
It seems the second flash bank is mapped _behind_ the first one. It may well be that the code does not expect such a situation, so try to reverse this.
Cheers Detlev
-- Als ich entführt wurde, begannen meine Eltern aktiv zu werden. Sie vermieteten mein Zimmer. -- Woody Allen -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

Hello Chen,
Thanks for your advice!! When I try to erase across flash bank, I get error message before. "Error: cannot span across banks when they are mapped in reverse order"
Now I fix the order of banks. And I can erase sector across flash bank now.
Excellent.
But I still found that I can not erase first two sector.
Ok, now I have to ask the ever-repeating questions - can you tell us more about the version of U-Boot you are using and the actual Flash chip that you use? Maybe the flash chip has some kind of write protection feature which needs to be taken car of?
Cheers Detlev

Dear Sir: Version:U-Boot 2010.06-rc2-00006-g28ccd77-dirty (Jun 24 2010 - 20:35:40) (from git) Flash:Flash Type: MXIC Flash MX29GL128E, per bank 128Mbits.
and...I do some test..
After u-boot enter main_loop, I can not write data to flash via trace32.
But I load my simple trace32 script, I can write data to flash via trace 32. simple initial of trace32: ========================================= D.S DCR:0xF9 %LONG %BE 000000019 ; CPC0_PCI, PerWE, PAE D.S DCR:0xF6 %LONG %BE 0 gosub IEBC "EBC0_B0AP" 0x10 007869200 gosub IEBC "EBC0_B0CR" 0x00 0FF09A000 ; 16MB @FE000000 ========================================= When I verify the value of "EBC and CPC0_PCI" register. u-boot and simple script fill the same value on "EBC and CPC0_PCI"
I am trying to find out what registers protect flash from writing.
And thank you that give much hints to me.
On Tue, Jun 15, 2010 at 3:54 PM, Detlev Zundel dzu@denx.de wrote:
Hello Chen,
Thanks for your advice!! When I try to erase across flash bank, I get error message before. "Error: cannot span across banks when they are mapped in reverse order"
Now I fix the order of banks. And I can erase sector across flash bank now.
Excellent.
But I still found that I can not erase first two sector.
Ok, now I have to ask the ever-repeating questions - can you tell us more about the version of U-Boot you are using and the actual Flash chip that you use? Maybe the flash chip has some kind of write protection feature which needs to be taken car of?
Cheers Detlev
-- Aktiengesellschaft: raffinierte Einrichtung zur persönlichen Bereicherung ohne persönliche Verantwortung. -- Ambrose Bierce -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu@denx.de

Dear Chen Wen,
In message AANLkTinSedp4src5LFcmlraDSRsx_lCDiCCZoRR841go@mail.gmail.com you wrote:
But I load my simple trace32 script, I can write data to flash via trace 32. simple initial of trace32: ========================================= D.S DCR:0xF9 %LONG %BE 000000019 ; CPC0_PCI, PerWE, PAE D.S DCR:0xF6 %LONG %BE 0 gosub IEBC "EBC0_B0AP" 0x10 007869200 gosub IEBC "EBC0_B0CR" 0x00 0FF09A000 ; 16MB @FE000000 ========================================= When I verify the value of "EBC and CPC0_PCI" register. u-boot and simple script fill the same value on "EBC and CPC0_PCI"
I am trying to find out what registers protect flash from writing.
PerWE? with "WE" as in "Write Enable" ?
Best regards,
Wolfgang Denk

Yes. After I verify from 405 ep user manul again. "WE" means "Write Enable"
PerWE? with "WE" as in "Write Enable" ?
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de If there was anything that depressed him more than his own cynicism, it was that quite often it still wasn't as cynical as real life. - Terry Pratchett, _Guards! Guards!_ _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

I find that GPIO and PerCS(CS0:flash0 , CS1:flash1) share some pins on PPC 405EP.After I configure GPIO output status , everything is ok now!
Thank for your help again.
On Fri, Jun 25, 2010 at 9:20 AM, Chen Wen chenpc@cs.nctu.edu.tw wrote:
Yes. After I verify from 405 ep user manul again. "WE" means "Write Enable"
PerWE? with "WE" as in "Write Enable" ?
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de If there was anything that depressed him more than his own cynicism, it was that quite often it still wasn't as cynical as real life. - Terry Pratchett, _Guards! Guards!_ _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
participants (3)
-
Chen Wen
-
Detlev Zundel
-
Wolfgang Denk