linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linuxppc-dev@ozlabs.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH 2/6] PowerPC 440EPx: Sequoia DTS
Date: Mon, 6 Aug 2007 22:12:07 +0200	[thread overview]
Message-ID: <64f3aef4501de8fc5a72f58def7d6ade@kernel.crashing.org> (raw)
In-Reply-To: <46B1F6D4.3070707@ru.mvista.com>

>> +     - compatible : should contain the specific model of flash 
>> chip(s) used
>> +       followed by either "cfi-flash" or "jedec-flash"
>
>    This "compatible" prop (and the node in whole) doesn't say a thing 
> about how the flash is mapped into the CPU address space.

...and it shouldn't.  That's what "ranges" properties in all
the various (grand-)parents of the node are for.

> I strongly disagree that this node provides enough info to select a 
> driver. :-/

If Linux needs more information than what the device _is_, but
also needs information about how it is _used_ on some particular
hardware, to select a driver; then it can bloody well do so.
Nowhere is it said that an OS can _only_ use "compatible" properties
to do its driver selection.

>> +     - reg : Address range of the flash chip
>> +     - bank-width : Width (in bytes) of the flash bank.  Equal to 
>> the device width
>> +       times the number of interleaved chips.
>> +     - device-width : (optional) Width of a single flash chip.  If 
>> omitted,
>> +       assumed to be equal to 'bank-width'.
>
>    Why then not just introduce the "interleave" prop and obsolete the
> "bank-width"?

Because "interleave" is overly complicated and still doesn't handle
all cases.  Also, it's a more confusing name.

The goal here is to handle 98% (or just 90% even) of all cases in
as simple a way as possible; everything else can get special handling
later.

>> +    Flash partitions
>> +     - reg :
>> +     - read-only : (optional)
>
>    All that would look nice but partition is even less of a device 
> than the
> original "rom" node was... well, who cares now? :-)

Some partitions can be useful for the firmware itself, or for
early boot stages; those should be described in the device
tree in some way.  And yes, you certainly can consider an
(aligned) flash partition to be a subdevice of the whole flash
bank.

>    Oh, I see that the new partition representation have really 
> simplified
> parsing -- this function is hardly shorter than the old one... :-P

Neither simplifying machine-parsing nor compacting the kernel
code are a goal at all, I don't see why you bring this up.

>>   static struct of_device_id of_physmap_match[] = {
>>  	{
>> +		.compatible	= "cfi-flash",
>> +		.data		= (void *)"cfi_probe",
>> +	},
>> +	{
>> +		.compatible	= "jedec-flash",
>> +		.data		= (void *)"jedec_probe",
>> +	},
>> +	{
>
>    This would also trigger on non-linearly mapped CFI or JEDEC flashes

No, it wouldn't.

>>   				large-flash@2,0 {
>
>    Hmm... what does @2,0 mean? :-O
>
>>  					reg = <2 0 400000>;

"2,0" is the text representation for the unit address <2 0>
on this bus.


Segher

  parent reply	other threads:[~2007-08-06 20:12 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-30 15:06 [PATCH 2/6] PowerPC 440EPx: Sequoia DTS Valentine Barshak
2007-08-01  2:08 ` David Gibson
2007-08-01  4:57   ` Segher Boessenkool
2007-08-01  5:04     ` David Gibson
2007-08-01  5:47       ` David Gibson
2007-08-02 15:23         ` Sergei Shtylyov
2007-08-03  3:13           ` David Gibson
2007-08-03 15:47             ` Sergei Shtylyov
2007-08-06  4:21               ` David Gibson
2007-08-06 18:37                 ` Sergei Shtylyov
2007-08-06 21:03                   ` Segher Boessenkool
2007-08-06 22:15                   ` Benjamin Herrenschmidt
2007-08-06 23:09                     ` Segher Boessenkool
2007-08-07  3:29                     ` David Gibson
2007-08-07  3:28                   ` David Gibson
2007-08-07 15:43                     ` Scott Wood
2007-08-07 17:01                       ` Segher Boessenkool
2007-08-07 16:43                     ` Segher Boessenkool
2007-08-08  0:35                       ` David Gibson
2007-08-19 12:59                     ` Sergei Shtylyov
2007-08-06 20:54                 ` Segher Boessenkool
2007-08-07  4:12                   ` David Gibson
2007-08-07 16:51                     ` Segher Boessenkool
2007-08-08  1:13                       ` David Gibson
2007-08-09 19:53                         ` Segher Boessenkool
2007-08-10  1:07                           ` David Gibson
2007-08-10 20:48                             ` Segher Boessenkool
2007-08-24 19:10                       ` Sergei Shtylyov
2007-08-24 20:43                         ` Segher Boessenkool
2007-08-06 20:35               ` Segher Boessenkool
2007-08-07  4:09                 ` David Gibson
2007-08-07 16:58                   ` Segher Boessenkool
2007-08-08  0:48                     ` David Gibson
2007-08-06 20:20             ` Segher Boessenkool
2007-08-07  3:35               ` David Gibson
2007-08-06 20:12           ` Segher Boessenkool [this message]
2007-08-02 20:18         ` Josh Boyer
2007-08-03  0:49           ` David Gibson
2007-08-03 16:29         ` Sergei Shtylyov
2007-08-06  4:31           ` David Gibson
2007-08-06 20:55             ` Segher Boessenkool
2007-08-06 20:41           ` Segher Boessenkool
2007-08-06 19:59         ` Segher Boessenkool
2007-08-07  3:41           ` David Gibson
2007-08-07 16:33             ` Segher Boessenkool
2007-08-08  1:51               ` David Gibson
2007-08-09 20:00                 ` Segher Boessenkool
2007-08-10  1:11                   ` David Gibson
2007-08-02 20:16       ` Josh Boyer
2007-08-01 14:13   ` Valentine Barshak
2007-08-02  1:00     ` David Gibson
2007-08-02 20:15   ` Josh Boyer
2007-08-06 20:15     ` Segher Boessenkool
2007-08-07  4:11       ` David Gibson

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=64f3aef4501de8fc5a72f58def7d6ade@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sshtylyov@ru.mvista.com \
    /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;
as well as URLs for NNTP newsgroup(s).