[PATCH, RFC] remove slowport mode setting from ixp2000 map driver
Lennert Buytenhek
buytenh at wantstofly.org
Wed Feb 23 10:23:24 EST 2005
On Wed, Feb 23, 2005 at 11:26:44AM -0000, Mialkowski, Andrzej wrote:
> Lennert,
Hi,
> I'm OK with this change I just not caught that you are moving
> this setting to other place in ixp2000 global code.
Ok, great. Can you commit it, or can someone else do that?
> Little surprise for
> me is that you are saying that you have(seen?) problem with access to
> devices when FRM=0, I never noticed that. This may of course happen in
> some hardware implementations but this means that there is no access to
> devices when executing from flash :(.
There is, but it's somewhat tricky -- you have to keep byteswapping
in mind, and the slowport might do more reads than you expect it to.
I have a byte-addressable device on my slowport region #0 which has
byte-sized registers. The first four registers of the device are
normally '31 13 19 00'. When the xscale runs in big-endian, I get
this:
word read halfword reads byte reads
SP_FRM=0 00191331 0019 1331 00 19 13 31
SP_FRM=1 31313131 3113 1900 31 13 19 00
In SP_FRM=0, the output still looks 'fixable'.
But note that when SP_FRM=0 and you're doing a byte or halfword read,
what actually happens is that the slowport does four byte reads, combines
that to a word using little-endian ordering (00191331), presents that
word to the xscale, and the xscale then picks one of the {byte,halfword}s
from that word.
So, even if you do only a single byte read, it can still be doing four
byte reads on the slowport. This can obviously confuse attached devices.
cheers,
Lennert
More information about the linux-mtd
mailing list