[U-Boot-Users] is there a bug in cfi_flash.c
Yuli Barcohen
yuli at arabellasw.com
Wed Jun 8 14:26:24 CEST 2005
Yusuf> There might be a bug in the code for reading status register
Yusuf> in cfi_flash driver. In the function "flash_isset" it's
Yusuf> directly read as reading from memory. But in intel's data
Yusuf> sheet (for 28F640C3T) reading status register is described as
Yusuf> below.
Yusuf> Read Status Register
Yusuf> The status register indicates the status of device
Yusuf> operations, and the
Yusuf> success/failure of that
Yusuf> operation. The Read Status Register (0x70) command causes
Yusuf> subsequent
Yusuf> reads to output data from
Yusuf> the status register until another command is issued. To
Yusuf> return to
Yusuf> reading from the array, issue a
Yusuf> Read Array (0xFF) command.
Yusuf> So before reading for SR, "Read Status Register" (0x70)
Yusuf> command must be written to the flash.
After write/erase/protect operations, flash is already in "read status"
mode so no additional command is necessary.
Yusuf> But I think this driver is beeing used by several boards. So
Yusuf> if this driver is tested and it's working, I should be
Yusuf> missing something?
On Intel flashes, it's very simple to issue commands and see results by
using md/mw U-Boot commands. You are trying to unprotect sector at
0xFF000000. So try:
md ff000000
mw.l ff000000 60606060
mw.l ff000000 d0d0d0d0
md ff000000
First md should show the flash contents, second md should show status on
one half of the bus (80808080 if there were no errors) and the flash
contents on another half. If this does not work, you either have got
flash write access problem (check the WE# line) or the flash must be
accessed by single 64-bit write. In the latter case, CFI driver won't
work.
--
========================================================================
Yuli Barcohen | Phone +972-9-765-1788 | Software Project Leader
yuli at arabellasw.com | Fax +972-9-765-7494 | Arabella Software, Israel
========================================================================
More information about the U-Boot
mailing list