Hi Cheng,
Well, the documentation on the SPI is even more comprehensive and precise than anything other seen;-)))
You can find a baseline SPI driver in the acual u-boot distribution.
It´s using polling and it´s slow as hell.
Spansion got probably little more support (or they figured it out by themselves) to write an spi driver which somehow takes advantage of the obviously existing fifo in the spi controller.
see:
http://imxcommunity.org/group/spansion
The description is as incomplete as usual and I have no clue why somebody in this group tells "just follow procedure and it works" - but who cares.
In this example you see how they stuff 4 Bytes in the data register - which is the fifo ????
Programming the SPI using DMA should be straightforward -
The actual simple u-boot polling version needs 1us to stuff the next spi byte - so the clockrate doesn´t matter at all.
So I was able to "boot" the device from SPI Flash (6MB) in 30 seconds.
After applying any useful measure to improve that polling code I ended up with 8 seconds - which is still not acceptable.
The documentation for using the DMA should be somewhat complete and understandable.
rgds