public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb•de>
To: Josh Boyer <jwboyer@linux•vnet.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@lists•ozlabs.org>
Subject: Re: mmio_nvram.c users ?
Date: Sun, 30 May 2010 02:54:22 +0200	[thread overview]
Message-ID: <201005300254.22984.arnd@arndb.de> (raw)
In-Reply-To: <20100529134143.GL24511@zod.rchland.ibm.com>

On Saturday 29 May 2010, Josh Boyer wrote:
> On Sat, May 29, 2010 at 01:45:04PM +1000, Benjamin Herrenschmidt wrote:
> >On Tue, 2010-05-25 at 07:00 -0400, Josh Boyer wrote:
> >> On Tue, May 25, 2010 at 05:43:59PM +1000, Benjamin Herrenschmidt wrote:
> >> >Hi folks !
> >> >
> >> >Anybody aware of anything other than Cell using that driver ?
> >> >
> >> >I'd like to make it a platform driver instead of having something that
> >> >pokes at anything that has a "device_type" set to "nvram" (which is
> >> >gross and bogus). But I need to know what platforms to fixup...
> >> 
> >> Why bother?  You could just use either drivers/mtd/devices/{phram.c or slram.c}
> >> and get the same functionality at that point, couldn't you?
> >
> >Won't that break existing userspace ?
> 
> Probably.  Maybe we shouldn't have duplicated a driver in our platform code to
> begin with.

The reason we have the driver is so that we're able to use the kernel
internal functions for arch/powerpc/kernel/nvram_64.c on it, which
operated on the well-defined interface for partitions inside of the
nvram memory.

mtd/phram provides a completely different abstraction, which is normally
used for block- or file system based access. They also both have
the character device, but that's not really the main point.

The part that is unfortunate is the device_type matching in the driver,
which was a result of clueluess firmware and Linux developers (i.e. me)
at the time.

	Arnd

  parent reply	other threads:[~2010-05-30  0:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  7:43 mmio_nvram.c users ? Benjamin Herrenschmidt
2010-05-25  8:41 ` Adrian Reber
2010-05-25  8:43 ` Martyn Welch
2010-05-25 11:00 ` Josh Boyer
2010-05-29  3:45   ` Benjamin Herrenschmidt
2010-05-29 13:41     ` Josh Boyer
2010-05-29 23:15       ` Benjamin Herrenschmidt
2010-05-30  0:54       ` Arnd Bergmann [this message]
2010-05-30  5:13         ` Benjamin Herrenschmidt

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=201005300254.22984.arnd@arndb.de \
    --to=arnd@arndb$(echo .)de \
    --cc=jwboyer@linux$(echo .)vnet.ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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