mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Krzysztof Halasa <khc@pm.waw.pl>
Cc: barebox@lists.infradead.org
Subject: Re: IXP4xx support
Date: Sun, 07 Feb 2010 11:50:22 +0100	[thread overview]
Message-ID: <4B6E9AEE.7040506@pengutronix.de> (raw)
In-Reply-To: <m33a1eoz9h.fsf@intrepid.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 1927 bytes --]

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
__raw_read,write.

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   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2010-02-07 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-06 21:00 Krzysztof Halasa
2010-02-07 10:50 ` Marc Kleine-Budde [this message]
2010-02-07 18:44   ` Flash drivers, was: " Krzysztof Halasa
2010-02-08 10:06     ` Sascha Hauer
2010-02-11 22:29       ` Krzysztof Halasa
2010-02-08 13:40   ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B6E9AEE.7040506@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=khc@pm.waw.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox