On Monday 04 October 2010 09:40:37 Jonas Bonn wrote:
Looks good in principle, the only possible problem I can see is if you
have both little-endian and big-endian wishbone devices in the same
system, which I assume could happen at some point.
If you want to be able to handle that cleanly, you should pass the device
into the accessor function as well.
It would also be good to provide a matching wb_iomap() function that
returns an iomem token you can use here (see pci_iomap).
A more complex implementation would detect the endianess at wb_iomap
time and return a token that encodes the endianess, which the regular
ioread/iowrite multiplexors can handle then. You probably don't need
to go that far, unless you expect wishbone to become ubiquitous in
the near future.
Arnd
--