public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 4/6] cfi_flash: Introduce read and write accessors
Date: Tue, 11 Dec 2007 19:59:01 +0100	[thread overview]
Message-ID: <200712111959.01940.sr@denx.de> (raw)
In-Reply-To: <20071211181317.7a9abc4e@dhcp-252-066.norway.atmel.com>

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
=====================================================================

  reply	other threads:[~2007-12-11 18:59 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-11 15:28 [U-Boot-Users] [PATCH 0/6] cfi_flash cleanups Haavard Skinnemoen
2007-12-11 15:28 ` [U-Boot-Users] [PATCH 1/6] cfi_flash: Break long lines Haavard Skinnemoen
2007-12-11 15:28   ` [U-Boot-Users] [PATCH 2/6] cfi_flash: Make some needlessly global functions static Haavard Skinnemoen
     [not found]     ` <1197386900-14570-4-git-send-email-hskinnemoen@atmel.com>
2007-12-11 15:28       ` [U-Boot-Users] [PATCH 4/6] cfi_flash: Introduce read and write accessors Haavard Skinnemoen
2007-12-11 15:28         ` [U-Boot-Users] [PATCH 5/6] Introduce map_physmem() and unmap_physmem() Haavard Skinnemoen
2007-12-11 15:28           ` [U-Boot-Users] [PATCH 6/6] cfi_flash: Use " Haavard Skinnemoen
2007-12-11 15:36             ` Kumar Gala
2007-12-11 15:43               ` Haavard Skinnemoen
2007-12-11 18:49                 ` Stefan Roese
2007-12-12  9:36                   ` Haavard Skinnemoen
2007-12-12 10:24                     ` Stefan Roese
2007-12-11 22:10             ` Wolfgang Denk
2007-12-11 22:55               ` Andrew Dyer
2007-12-12  6:09                 ` Stefan Roese
2007-12-12  9:23               ` Haavard Skinnemoen
2007-12-11 15:35         ` [U-Boot-Users] [PATCH 4/6] cfi_flash: Introduce read and write accessors Kumar Gala
2007-12-11 15:46           ` Haavard Skinnemoen
2007-12-11 16:25             ` Wolfgang Denk
2007-12-11 17:13               ` Haavard Skinnemoen
2007-12-11 18:59                 ` Stefan Roese [this message]
2007-12-11 22:05                 ` Wolfgang Denk
2007-12-12  9:31                   ` Haavard Skinnemoen
2007-12-13 11:04   ` [U-Boot-Users] [PATCH 1/6] cfi_flash: Break long lines Stefan Roese
2007-12-11 19:04 ` [U-Boot-Users] [PATCH 0/6] cfi_flash cleanups Stefan Roese
2007-12-12 10:01   ` Haavard Skinnemoen

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=200712111959.01940.sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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