[U-Boot-Users] mpc8xx Problem writing to flash

Hello people,
I am relatively a new U-Boot and Linux user. First of all I have to port U-Boot to my custom board. I am using a MPC866. The board starts as follows:
U-Boot 1.1.6 (Jul 23 2007 - 13:14:06)
CPU: MPC866xxxZPnnA at 75 MHz [15.0...133.0 MHz]
4 kB I-Cache 4 kB D-Cache FEC present
Board: SM_CPU866 Telvent
DRAM: 4 MB
FLASH: 8 MB
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
=>
I read the FAQ about this message in www.denx.de, but it seems not to be OK, because after typing "saveenv", I got the following:
Saving Environment to Flash...
Un-Protected 1 sectors
Un-Protected 1 sectors
Erasing Flash...
done
Erased 1 sectors
Writing to Flash... Timeout writing to Flash
Protected 1 sectors
Protected 1 sectors
The timeout out for the Flash is big enough (500 ms, although I also tried with 1500 ms). I reused an "flash.c" code from a reference board of U-Boot, which includes my same Flash chip (Intel 28F160C3B).
Any idea how could I solve it?
Thanks in advance,
Raúl Moreno
***********Internet Email Confidentiality Footer************* This email and any files transmitted with it are confidential and intended solely for the use of the organization or individual to whom they are addressed. It is expressly forbidden to retransmit or copy email and/or this attached files without our permission . If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it.

Hi Raul,
I am relatively a new U-Boot and Linux user. First of all I have to port U-Boot to my custom board. I am using a MPC866. The board starts as follows:
[...]
The timeout out for the Flash is big enough (500 ms, although I also tried with 1500 ms). I reused an "flash.c" code from a reference board of U-Boot, which includes my same Flash chip (Intel 28F160C3B).
If you are doing a new board port, please don't (mis-)use one of the older custom flash drivers but use the CFI driver when applicable.
Any idea how could I solve it?
As your flash looks CFI conformant, I would suggest you try this.
Cheers Detlev
participants (2)
-
Detlev Zundel
-
raul.moreno@telvent.abengoa.com