Skip to contentSkip to conversation

Can not erase first 2 sectors on flash

U-Boot Chen Wen 3 participants 6 messages Jun 14, 2010 – Jul 5, 2010 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Chen Wen

author
#2 lore raw

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.

Quoted 127 lines · Detlev Zundel

Hi Chen Wen,

you should use the u-boot at lists.denx.de address for the emailing list. -owner only reaches the moderators of the list.

Quoted 4 lines

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

Quoted 18 lines

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.......$..

Quoted 8 lines

"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

==================================================================================

Quoted 6 lines

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

Quoted 1 line

FFC0A000 FFC0C000 FFC0E000 FFC10000

FFC20000

Quoted 1 line

FFC30000 FFC40000 FFC50000 FFC60000

FFC70000

Quoted 1 line

FFC80000 FFC90000 FFCA0000 FFCB0000

FFCC0000

Quoted 1 line

FFCD0000 FFCE0000 FFCF0000 FFD00000

FFD10000

Quoted 1 line

FFD20000 FFD30000 FFD40000 FFD50000

FFD60000

Quoted 1 line

FFD70000 FFD80000 FFD90000 FFDA0000

FFDB0000

Quoted 1 line

FFDC0000 FFDD0000 FFDE0000 FFDF0000

FFE00000

Quoted 1 line

FFE10000 FFE20000 FFE30000 FFE40000

FFE50000

Quoted 1 line

FFE60000 FFE70000 FFE80000 FFE90000

FFEA0000

Quoted 1 line

FFEB0000 FFEC0000 FFED0000 FFEE0000

FFEF0000

Quoted 1 line

FFF00000 FFF10000 FFF20000 FFF30000

FFF40000

Quoted 1 line

FFF50000 FFF60000 FFF70000 FFF80000

FFF90000

Quoted 1 line

FFFA0000 RO FFFB0000 RO FFFC0000 RO FFFD0000 RO

FFFE0000 RO

Quoted 8 lines

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

Quoted 1 line

FF80A000 FF80C000 FF80E000 FF810000

FF820000

Quoted 1 line

FF830000 FF840000 FF850000 FF860000

FF870000

Quoted 1 line

FF880000 FF890000 FF8A0000 FF8B0000

FF8C0000

Quoted 1 line

FF8D0000 FF8E0000 FF8F0000 FF900000

FF910000

Quoted 1 line

FF920000 FF930000 FF940000 FF950000

FF960000

Quoted 1 line

FF970000 FF980000 FF990000 FF9A0000

FF9B0000

Quoted 1 line

FF9C0000 FF9D0000 FF9E0000 FF9F0000

FFA00000

Quoted 1 line

FFA10000 FFA20000 FFA30000 FFA40000

FFA50000

Quoted 1 line

FFA60000 FFA70000 FFA80000 FFA90000

FFAA0000

Quoted 1 line

FFAB0000 FFAC0000 FFAD0000 FFAE0000

FFAF0000

Quoted 1 line

FFB00000 FFB10000 FFB20000 FFB30000

FFB40000

Quoted 1 line

FFB50000 FFB60000 FFB70000 FFB80000

FFB90000

Quoted 1 line

FFBA0000 FFBB0000 FFBC0000 FFBD0000

FFBE0000

Quoted 3 lines

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 at denx.de

#3 lore raw

Hello Chen,

Quoted 6 lines

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.

Quoted 1 line

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

Signature · 7 lines
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 at denx.de
author
#4 lore raw

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.

Quoted 32 lines · Detlev Zundel

Hello Chen,

Quoted 6 lines

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.

Quoted 1 line

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 at denx.de

#5 lore raw

Dear Chen Wen,

Quoted 6 lines · In message <[email protected]> you…

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

Quoted 7 lines
 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

Signature · 6 lines
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 at 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!_
author
#6 lore raw

Yes.
After I verify from 405 ep user manul again.
"WE" means "Write Enable"

Quoted 19 lines

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 at 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 at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

author
#7 lore raw

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.

Quoted 25 lines · Chen Wen

Yes.
After I verify from 405 ep user manul again.
"WE" means "Write Enable"

Quoted 18 lines

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 at 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 at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot