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

Stefan Roese
2007-12-11T18:59:01Z

On Tuesday 11 December 2007, Haavard Skinnemoen wrote:
> > > 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 in the Linux mtd cfi driver, it looks like it boils down
to those __raw_writeb() and friends here too. So this should be a good choice
for U-Boot 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?

Best would be to add the Linux variants from my point of view. If this gets
too complicated for you, since you can't know all those platforms by heart,
just add the volatile accesses for now and add a big comment in the header.
Then the maintainers/custodians should fix this later.

But we should really try to get all this great cfi rework accepted in this
merge window.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================