* [U-Boot] Flash not Erased
@ 2013-06-19 15:35 Jan Schunke
2013-06-20 6:00 ` Stefan Roese
0 siblings, 1 reply; 3+ messages in thread
From: Jan Schunke @ 2013-06-19 15:35 UTC (permalink / raw)
To: u-boot
Hello,
I am trying to compile my own U-Boot for microblaze.
Version:
U-Boot 2013.01-dirty (Jun 19 2013 - 16:26:51)
microblazeel-xilinx-linux-gnu-gcc (crosstool-NG 1.15.3) 4.6.4 20120924
(prerelease)
GNU ld (crosstool-NG 1.15.3) 2.22.90.20121010
I have demo where Flash access works fine.
Verion:
U-Boot 2012.10 (Feb 13 2013 - 20:16:43)
microblazeel-xilinx-linux-gnu-gcc (crosstool-NG 1.15.3) 4.6.2 20111018
(prerelease)
GNU ld (crosstool-NG 1.15.3) 2.21.53.20110813
When I use my own u-boot and try to write to flash I always get
"Flash not erased"
it seems to be a problem that my flash is x16 but recognized as x8.
Are there any Config variables to set the mode to x16?
Below are some snippets to show the behavior
..........................................................................................
SHF-U-Boot> saveenv
Saving Environment to Flash...
Protect off 44B40000 ... 44B5FFFF
Un-Protecting sectors 90..90 in bank 1
fwc addr 44b40000 cmd 50 50 8bit x 8 bit
fwc addr 44b40000 cmd 60 60 8bit x 8 bit
fwc addr 44b40000 cmd d0 d0 8bit x 8 bit
fwc addr 44b40000 cmd 70 70 8bit x 8 bit
flash_is_busy: 0
fwc addr 44b40000 cmd ff ff 8bit x 8 bit
. done
Un-Protected 1 sectors
EXPORT table = bfc3b2cc, htab.size = 79, htab.filled = 13, size = 131068
Unsorted: n=13
0: bff80070 ==> ipaddr => 192.168.2.246
1: bff80084 ==> hostname => U-BOOT_BSP
2: bff800c0 ==> baudrate => 115200
3: bff80200 ==> bootdelay => 4
4: bff80228 ==> serverip => 192.168.0.1
5: bff80264 ==> ethaddr => 00:50:C2:2E:E1:0A
6: bff802f0 ==> fileaddr => BA000000
7: bff80390 ==> bootfile => k7mmp/u-boot-s.bin
8: bff803e0 ==> ethact => Xelite.40e00000
9: bff804d0 ==> gatewayip => 192.168.0.1
10: bff80584 ==> filesize => 353D0
11: bff80638 ==> mtdids => nor0=physmap-flash-0
12: bff8064c ==> mtdparts =>
mtdparts=physmap-flash-0:11M(fpga),256K(boot),128K(bootenv),128K(config),12M(image),0M(spare)
Erasing Flash...Erase Flash from 0x44b40000 to 0x44b5ffff in Bank # 1
flash_erase: erasing sectors 90 to 90
fwc addr 44b40000 cmd 50 50 8bit x 8 bit
fwc addr 44b40000 cmd 20 20 8bit x 8 bit
fwc addr 44b40000 cmd d0 d0 8bit x 8 bit
flash_is_busy: 1
...
flash_is_busy: 1
flash_is_busy: 0
fwc addr 44b40000 cmd ff ff 8bit x 8 bit
. done
Erased 1 sectors
Writing to Flash... flash_write_cfiword: 8-bit 0x92
fwc addr 44000000 cmd 50 50 8bit x 8 bit
fwc addr 44000000 cmd 40 40 8bit x 8 bit
flash_is_busy: 1
flash_is_busy: 0
fwc addr 44b40000 cmd ff ff 8bit x 8 bit
flash_write_cfiword: 8-bit 0xe8
Flash not Erased
Protecting sectors 90..90 in bank 1
fwc addr 44b40000 cmd 50 50 8bit x 8 bit
fwc addr 44b40000 cmd 60 60 8bit x 8 bit
fwc addr 44b40000 cmd 1 1 8bit x 8 bit
fwc addr 44b40000 cmd 70 70 8bit x 8 bit
flash_is_busy: 0
fwc addr 44b40000 cmd ff ff 8bit x 8 bit
. done
Protected 1 sectors
Command failed, result=1SHF-U-Boot>
..........................................................................................
Now I try th co command to get more info
..........................................................................................
SHF-U-Boot> md 0xba000000
ba000000: b8b40008 80000000 20a50100 e8c50000 ........... ....
ba000010: e8e50004 e9250008 20a5000c 00860000 ......%.... ....
ba000020: 20e70003 90e70041 90e70041 81400000 ... A...A..... at .
ba000030: bc070018 c9055000 d9065000 214a0004 .....P...P....J!
ba000040: b810fff0 20e7ffff 00844800 98082000 ....... .H... ..
ba000050: 00000000 00000000 00000000 00000000 ................
SHF-U-Boot> cp BA000000 44B00000 D4F5
Copy to Flash... flash_write_cfiword: 8-bit 0x08
fwc addr 44000000 cmd 50 50 8bit x 8 bit
fwc addr 44000000 cmd 40 40 8bit x 8 bit
flash_is_busy: 1
flash_is_busy: 0
fwc addr 44b00000 cmd ff ff 8bit x 8 bit
flash_write_cfiword: 8-bit 0x00
fwc addr 44000000 cmd 50 50 8bit x 8 bit
fwc addr 44000000 cmd 40 40 8bit x 8 bit
flash_is_busy: 1
flash_is_busy: 0
fwc addr 44b00000 cmd ff ff 8bit x 8 bit
flash_write_cfiword: 8-bit 0xb4
fwc addr 44000000 cmd 50 50 8bit x 8 bit
fwc addr 44000000 cmd 40 40 8bit x 8 bit
flash_is_busy: 1
flash_is_busy: 0
fwc addr 44b00000 cmd ff ff 8bit x 8 bit
flash_write_cfiword: 8-bit 0xb8
Flash not Erased
Command failed, result=1SHF-U-Boot> md 44B00000
44b00000: b4b40000 ffffffff ffffffff ffffffff ................
44b00010: ffffffff ffffffff ffffffff ffffffff ................
44b00020: ffffffff ffffffff ffffffff ffffffff .....Verion of working
demo:
U-Boot 2012.10 (Feb 13 2013 - 20:16:43)
microblazeel-xilinx-linux-gnu-gcc (crosstool-NG 1.15.3) 4.6.2 20111018
(prerelease)
GNU ld (crosstool-NG 1.15.3) 2.21.53.20110813
Version of non working:
U-Boot 2013.01-dirty (Jun 19 2013 - 16:26:51)
microblazeel-xilinx-linux-gnu-gcc (crosstool-NG 1.15.3) 4.6.4 20120924
(prerelease)
GNU ld (crosstool-NG 1.15.3) 2.22.90.20121010...........--
..........................................................................................
As you can see the first byte (b4) seems to have been tranfered twice.
fli tells me that I have an 8 x 8 Flash but the working demo reports a
16 x 16 which is what I would expect.
Non working fli
..........................................................................................
SHF-U-Boot> fli
Bank # 1: CFI conformant flash (8 x 8) Size: 64 MB in 515 Sectors
Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x60
Erase timeout: 4096 ms, write timeout: 2 ms
Buffer write timeout: 5 ms, buffer size: 1024 bytes
Sector Start Addresses:
44000000 RO 44020000 RO 44040000 RO 44060000 RO
44080000 RO
440A0000 RO 440C0000 RO 440E0000 RO 44100000 RO
44120000 RO
44140000 RO 44160000 RO 44180000 RO 441A0000 RO
441C0000 RO
.........................................................................................
Working fli
..........................................................................................
Bank # 1: CFI conformant flash (16 x 16) Size: 64 MB in 515 Sectors
Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x8960
Erase timeout: 4096 ms, write timeout: 2 ms
Buffer write timeout: 5 ms, buffer size: 1024 bytes
..........................................................................................
Any ideas?
Thanks in advance
Jan
*******************************************************
Jan-Hendrik Schunke
Entwickler / Developer
SHF Communication Technologies AG
Wilhelm-v.-Siemens-Str. 23 D; 12277 Berlin, Germany
E-Mail: schunke at shf.de
Phone: +49-(0)30- 77 20 51-0 direct: -45
Fax: +49-(0)30- 75 31 07 8
Web: www.shf.de
*******************************************************
Sitz der Gesellschaft/Registered Office: Berlin;
Registergericht/Register Court: AG Berlin-Charlottenburg HRB 72633;
Vorstand/Executive Board: Dr. Frank Hieronymi, Dr. Lars Klapproth;
Aufsichtsratsvorsitzender/Chairman of the Supervisory Board: Dr. Walter
L. Rust.
Diese E-Mail enth?lt vertrauliche und/oder rechtlich gesch?tzte
Informationen und ist ausschlie?lich f?r den bezeichneten Adressaten
oder dessen Vertreter bestimmt. Wenn Sie nicht der richtige Adressat
sind oder diese E-Mail irrt?mlich erhalten haben, informieren Sie bitte
sofort den Absender und vernichten Sie diese Mail. Jede Form der
Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe durch
andere Empf?nger ist unzul?ssig.
This e-mail may contain confidential and/or privileged information and
is intended solely for the addressee or a representative there of. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail.
Access to, publishing and copying of the information by a third party is
unauthorised.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Flash not Erased
2013-06-19 15:35 [U-Boot] Flash not Erased Jan Schunke
@ 2013-06-20 6:00 ` Stefan Roese
2013-06-20 7:50 ` Jan Schunke
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2013-06-20 6:00 UTC (permalink / raw)
To: u-boot
Hi Jan,
On 19.06.2013 17:35, Jan Schunke wrote:
> I am trying to compile my own U-Boot for microblaze.
> Version:
> U-Boot 2013.01-dirty (Jun 19 2013 - 16:26:51)
> microblazeel-xilinx-linux-gnu-gcc (crosstool-NG 1.15.3) 4.6.4 20120924
> (prerelease)
> GNU ld (crosstool-NG 1.15.3) 2.22.90.20121010
>
> I have demo where Flash access works fine.
> Verion:
> U-Boot 2012.10 (Feb 13 2013 - 20:16:43)
> microblazeel-xilinx-linux-gnu-gcc (crosstool-NG 1.15.3) 4.6.2 20111018
> (prerelease)
> GNU ld (crosstool-NG 1.15.3) 2.21.53.20110813
>
>
> When I use my own u-boot and try to write to flash I always get
>
> "Flash not erased"
>
> it seems to be a problem that my flash is x16 but recognized as x8.
>
> Are there any Config variables to set the mode to x16?
This is a known problem. Those chips connected in x8 mode are known to
currently not work correctly with the common CFI NOR flash driver. Could
you please try the following patch:
http://patchwork.ozlabs.org/patch/249707/
And let us know if this fixes the problem?
Thanks,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: office at denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Flash not Erased
2013-06-20 6:00 ` Stefan Roese
@ 2013-06-20 7:50 ` Jan Schunke
0 siblings, 0 replies; 3+ messages in thread
From: Jan Schunke @ 2013-06-20 7:50 UTC (permalink / raw)
To: u-boot
Hello,
it turns out that setting
#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT
solves my problem because it skips x8 detection.
I took me some time because I have not found it anywhere in the README.
Thanks for your help.
Jan
On 20.06.2013 08:00, Stefan Roese wrote:
> Hi Jan,
>
> On 19.06.2013 17:35, Jan Schunke wrote:
>> I am trying to compile my own U-Boot for microblaze.
>> Version:
>> U-Boot 2013.01-dirty (Jun 19 2013 - 16:26:51)
>> microblazeel-xilinx-linux-gnu-gcc (crosstool-NG 1.15.3) 4.6.4 20120924
>> (prerelease)
>> GNU ld (crosstool-NG 1.15.3) 2.22.90.20121010
>>
>> I have demo where Flash access works fine.
>> Verion:
>> U-Boot 2012.10 (Feb 13 2013 - 20:16:43)
>> microblazeel-xilinx-linux-gnu-gcc (crosstool-NG 1.15.3) 4.6.2 20111018
>> (prerelease)
>> GNU ld (crosstool-NG 1.15.3) 2.21.53.20110813
>>
>>
>> When I use my own u-boot and try to write to flash I always get
>>
>> "Flash not erased"
>>
>> it seems to be a problem that my flash is x16 but recognized as x8.
>>
>> Are there any Config variables to set the mode to x16?
>
> This is a known problem. Those chips connected in x8 mode are known to
> currently not work correctly with the common CFI NOR flash driver. Could
> you please try the following patch:
>
> http://patchwork.ozlabs.org/patch/249707/
>
> And let us know if this fixes the problem?
>
> Thanks,
> Stefan
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: office at denx.de
>
--
*******************************************************
Jan-Hendrik Schunke
Entwickler / Developer
SHF Communication Technologies AG
Wilhelm-v.-Siemens-Str. 23 D; 12277 Berlin, Germany
E-Mail: schunke at shf.de
Phone: +49-(0)30- 77 20 51-0 direct: -45
Fax: +49-(0)30- 75 31 07 8
Web: www.shf.de
*******************************************************
Sitz der Gesellschaft/Registered Office: Berlin;
Registergericht/Register Court: AG Berlin-Charlottenburg HRB 72633;
Vorstand/Executive Board: Dr. Frank Hieronymi, Dr. Lars Klapproth;
Aufsichtsratsvorsitzender/Chairman of the Supervisory Board: Dr. Walter
L. Rust.
Diese E-Mail enth?lt vertrauliche und/oder rechtlich gesch?tzte
Informationen und ist ausschlie?lich f?r den bezeichneten Adressaten
oder dessen Vertreter bestimmt. Wenn Sie nicht der richtige Adressat
sind oder diese E-Mail irrt?mlich erhalten haben, informieren Sie bitte
sofort den Absender und vernichten Sie diese Mail. Jede Form der
Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe durch
andere Empf?nger ist unzul?ssig.
This e-mail may contain confidential and/or privileged information and
is intended solely for the addressee or a representative there of. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail.
Access to, publishing and copying of the information by a third party is
unauthorised.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-20 7:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-19 15:35 [U-Boot] Flash not Erased Jan Schunke
2013-06-20 6:00 ` Stefan Roese
2013-06-20 7:50 ` Jan Schunke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox