public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, Josh Boyer <jwboyer@jdub.homelinux.org>,
	linux-mtd@lists.infradead.org, Arnd Bergmann <arnd@arndb.de>,
	linuxppc-embedded@ozlabs.org
Subject: Re: [RFC] Adding MTD to device tree
Date: Sat, 12 Aug 2006 20:19:32 +0400	[thread overview]
Message-ID: <44DDFF94.3090402@ru.mvista.com> (raw)
In-Reply-To: <001C3287-87E7-4DF9-AB4E-E1448EC20518@kernel.crashing.org>

Hello.

Segher Boessenkool wrote:

>>>   Required properties:
>>>    - device_type : one of "nand-flash", "nor-flash", or "rom".

    I thought about having the separate device types initially, then I decided 
that all the differences can be handled on the driver level...

>>There are more than just those kinds of MTDs.  There's dataflash,
>>AG-AND, NVRAM, ioremappable DRAM, etc.  I'd prefer it to just be  
>>called "flash".  See more below.

> Existing firmwares call it "rom", "nvram", "flash".  All of those
> are easy; and I have really no opinion how all the weirdo nand-flash
> etc. interfaces should be handled.

> device_type communicates to the device-tree consumer what other
> properties to expect in this node -- it does not indicate the exact
> programming model of the device itself.

    Erm, IIUC the exact set of properties is defined by the node name (or the 
"compatible" property). The device type defines some mandatory set of 
properties/methods but there may be some specific...

> I suspect for most nand-flash you can get away with a device_type
> of "nand-flash"; for some you might have to specify something more
> detailed.

    Hm, not sure that you need to be so much detailed with the device type.
The original OF spec. had device type "block" signifying any kind of blocked 
storage device.

>>>    - model : an identifier for the actual controller chip used.

>>Meaning what exactly?  Lots of NOR flash doesn't have a "controller".

> Lots of those chips from different vendors are pin-compatible as well,
> so you cannot really hardcode one specific model number.  I don't see
> this information being very useful anyway.  Instead, in most cases, the
> information you're really after is the programming interface for the
> device.  And that goes...

    This property might be marked optional still.

>>>    - compatible : Should be the name of the MTD driver. For
>>>      type "rom", this is most likely "physmap".

>>This I agree with, but Sergei already had this.  And since you're
>>specifying the name of the MTD driver, that typically already knows  
>>what
>>type of chip it's talking to.

> "compatible" contains a list, most specific first.  So for example
> for a NOR-flash it could be "jedec-flash,nor-flash,flash" or whatnot.
> (Btw: no comma's, but 0-chars in the actual properties!)

    The "compatible" prop (as well as "name") should define which driver to 
select according to spec. (the Generic Names spec. delegates this role solely 
to the "compatible" prop). While specifying the flash interface (JEDEC in this 
case) is indeed useful (however, the current 'platform_device' based 'physmap' 
implementation doesn't allow to pass the probe type to the driver), the prop 
in the form suggested doesn't really help with selecting the MTD map driver 
(without which you can't support a NOR flash). A reference to 'physmap' should 
still be present in the node in one or another form...

WBR, Sergei

  reply	other threads:[~2006-08-12 16:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060614213643.137680b8@vitb.ru.mvista.com>
     [not found] ` <44A83AE1.4020707@ru.mvista.com>
     [not found]   ` <20060705153118.6ffbe97d@localhost.localdomain>
     [not found]     ` <44ABC0D1.1020407@ru.mvista.com>
     [not found]       ` <20060705191007.54e8b4b6@localhost.localdomain>
     [not found]         ` <44B00C03.5010409@ru.mvista.com>
     [not found]           ` <20060709001435.7a94294e@localhost.localdomain>
2006-08-11 15:31             ` [RFC] Adding MTD to device tree Sergei Shtylyov
2006-08-11 21:10               ` Arnd Bergmann
     [not found]                 ` <1155347601.3108.7.camel@vader.jdub.homelinux.org>
2006-08-12  9:58                   ` Segher Boessenkool
2006-08-12 16:19                     ` Sergei Shtylyov [this message]
2006-08-12 18:44                       ` Segher Boessenkool
     [not found] <311553550076b8b45674.846930886.miltonm@bga.com>
2006-08-12 17:43 ` Sergei Shtylyov
2006-08-12 18:48   ` Segher Boessenkool
2006-08-14 12:39     ` David Woodhouse
2006-08-12 21:15   ` Milton Miller
2006-08-12 22:00     ` Sergei Shtylyov
2006-08-13  0:20       ` Wolfgang Denk
2006-08-13  0:20     ` Wolfgang Denk

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=44DDFF94.3090402@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=arnd@arndb.de \
    --cc=jwboyer@jdub.homelinux.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=segher@kernel.crashing.org \
    /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