IXP4xx support

Marc Kleine-Budde mkl at pengutronix.de
Sun Feb 7 05:50:22 EST 2010

Krzysztof Halasa wrote:
> I'm thinking about adding Barebox support for a certain platform using
> IXP425 (ARM, usually big-endian) CPU. This means the startup code
> (trivial, already got it working in little-endian mode), drivers for
> hardware Queue Manager, Network Processing Engines and built-in Ethernet
> interfaces (all of them easy to port from Linux).
> This also means supporting the NOR flash: the CPU has 16-bit, always
> big-endian, "value-preserving" EXP bus for connecting such devices. In
> LE mode the address has to be XORed with 2, and if it's byte-oriented
> data (i.e. not a command/response), it has to be byte-swapped. Only
> 16-bit writes can be made.
> Doing the above in the flash driver would complicate things a lot. The
> drivers currently use plain pointers to access the flash. I'm thinking
> about moving the low-level access (R/W) routines to arch code (with a
> generic defaults), and calling them via the NOR flash platform struct
> (which doesn't do anything useful ATM).

have a look at the current uboot cfi flash driver. They have read/write
functions to access the flash. By default they are macros to IIRC

From the first look, the driver looks much cleaner than the "old" one
used in barebox (modulo my bugfix from last week).

Maybe the current uboot driver should be ported to barebox before
starting improving the old one.

> The above would also permit supporting flashes which can't be mapped in
> normal CPU address space. It would be a bit slower, though.

Sure, the access macros can be mapped to something complete different.

Cheers, Marc
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/barebox/attachments/20100207/da94737d/attachment.sig>

More information about the barebox mailing list