
Alex BASTOS writes:
Yuli> 8-bit AMD/Spansion flashes are supported by current Yuli> driver. The patch would, in fact, break support for many such Yuli> flashes (29F016D, for example). Only in a special case of Yuli> 16-bit flash configured to work in 8-bit mode (29DL640D in Yuli> 8-bot mode, for example), such a change in command address can Yuli> be needed but IMHO this should be handled in run-time Yuli> according to CFI info.
Alex> Ummm, such a change is needed at least by S29GLxxxM flashes,
It's exactly the case which I mentioned: dual-mode (x8/x16) flash in 8-bit mode.
Alex> but I didn't know anything about 29F016D. Sorry about that. Alex> Any suggestion as info from to CFI which would select the Alex> correct command addresses?
There is a field in CFI information table which specifies flash interface (offset 0x50 in 8-bit mode, page 53 of S29GLxxxM data sheet). If the flash is x8/x16 and the driver detected that it's in 8-bit mode, this means that it's the above mentioned special case. I'd add a couple of fields to U-Boot's CFI flash structure to hold the addresses. Then simple shift would provide correct addresses.