[U-Boot] Non standard CFI detection tweaks

Stefan Roese sr at denx.de
Mon Jul 19 11:34:32 CEST 2010


Hi Rogan,

On Tuesday 13 July 2010 22:00:37 Rogan Dawes wrote:
> I'm trying to add support for my D-Link DNS323 (Orion5x-based) to
> U-Boot, building on the efforts of Albert Aribaud.
> 
> One place where I am struggling is with the detection of the flash chip.
> 
> The flash part is a 8 MB Spansion S29GL064M90TFIR4, and the data sheet
> can be found at:
> 
> http://www.spansion.com/Support/Datasheets/s29gl-m_00_b8_e.pdf
> 
> It says:
> > This device enters the CFI Query mode when the system writes the CFI
> > Query command, 98h, to address 55h, any time the device is ready to
> > read array data.
> 
> Testing this from the command line, however, shows that this is in fact
> NOT true. In fact, the write needs to occur at aah, not 55h.

This is most likely because of the 8bit width (byte address) vs. 16bit width 
(word address) modes.

How is your FLASH chip connected to your CPU? In 16bit wide mode (which is 
more common)?
 
> This may be influenced by the following paragraph from the manual:
> > Depending on the model number, the devices have an 8-bit wide data
> > bus only, 16-bit wide data bus only, or a 16-bit wide data bus that
> > can also function as an 8-bit wide data bus by using the BYTE#
> > input.
> 
> And:
> > R4 = x8/x16
> 
> Looking at the debug logs from cfi_flash.c, I see the following output:
> 
> fwc addr ff8000aa cmd 98 9898 16bit x 8 bit
> is= cmd 51(Q) addr ff800020 is= ffff 5151
> 
> These lines are the closest to doing what appears to be needed for this
> part, in that the address being written to is correct, the address being
> read from is correct, the expected result is correct. The only thing
> that is not correct is the command to enter QRY mode.
> 
> For this particular chip, the command is:
> 
> mw.w 0xff8000aa 9800 (rather than 9898)
> 
> (FWIW mw.b 0xff8000aa 98 also works fine to enter QRY mode)

Hmmm. Again my question: Are you using byte- or word-mode?
 
> Having done that, the QRY results are present at 0xff800020:
> 
> md.b ff800020 20
> ff800020: 51 51 52 52 59 59 02 02 00 00 40 40 00 00 00 00 QQRRYY....@@....
> ff800030: 00 00 00 00 00 00 27 27 36 36 00 00 00 00 04 04 ......''66......
> 
> Do you have any suggestions on the best way to modify cfi_flash.c to
> detect this chip?

Not right now, sorry.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de


More information about the U-Boot mailing list