[U-Boot-Users] [PATCH 4/6] cfi_flash: Introduce read and write accessors

Haavard Skinnemoen
2007-12-11T17:13:17Z

On Tue, 11 Dec 2007 17:25:22 +0100
Wolfgang Denk <wd@denx.de> wrote:

> In message <20071211164644.6430849a@dhcp-252-066.norway.atmel.com> you wrote:
> > On Tue, 11 Dec 2007 09:35:21 -0600
> > Kumar Gala <galak@kernel.crashing.org> wrote:
> >
> > > should these not use in/out macros from asm/io.h?
> >
> > That would probably be better. It's just that I'm having a hard time
> > finding a set of macros that
> > a) is available on all architectures
> > b) don't do any byte swapping or other tricks
> >
> > __raw_writeb() and friends would satisfy b) but not a)...
>
> Then we eventually should implement these for the missing
> architetures.
>
> Kumar is right. We definitely must use the "real" accessor functions.

Yeah, I agree too.

From a quick glance, m68k, powerpc, nios and nios2 lack these
functions. Anything special I need to know about those architectures,
or should I just grab them from Linux or use volatile?

Haavard