Re: [PATCH 2/4] PowerPC: 440GRx Rainier DTS.

2007-10-31 Thread Valentine Barshak
Olof Johansson wrote:
> On Wed, Oct 31, 2007 at 10:08:05AM +1100, David Gibson wrote:
>> On Tue, Oct 30, 2007 at 07:56:50PM +0300, Valentine Barshak wrote:
>>> PowerPC 440GRx Rainier DTS.
>> [snip]
>>> +   SDRAM0: sdram {
>>> +   device_type = "memory-controller";
>> How many times do we need to say it...
>>
>> Don't make up random device_type values.  This does not belong here.
> 
> Maybe there should be something like checkpatch.pl that warns about
> these kinds of things so people can check for it without getting flamed
> first. :-)
> 
> Lots of people base their dts'es on other ones, so until the kernel has
> bene clean a while, this will happen all the time. I'm saying "a while"
> because people tend to base them on what's fresh when they do the work,
> but it might take a few months between then and when they post, etc.

Yep, It's been copy-pasted from sequoia.dts.
Sorry for that, I'll rmove both.
Thanks,
Valentine.

> 
> 
> -Olof

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/4] PowerPC: 440GRx Rainier DTS.

2007-10-30 Thread David Gibson
On Tue, Oct 30, 2007 at 09:09:17PM -0500, Josh Boyer wrote:
> On Tue, 30 Oct 2007 20:56:51 -0500
> Olof Johansson <[EMAIL PROTECTED]> wrote:
> 
> > On Wed, Oct 31, 2007 at 10:08:05AM +1100, David Gibson wrote:
> > > On Tue, Oct 30, 2007 at 07:56:50PM +0300, Valentine Barshak wrote:
> > > > PowerPC 440GRx Rainier DTS.
> > > [snip]
> > > > +   SDRAM0: sdram {
> > > > +   device_type = "memory-controller";
> > > 
> > > How many times do we need to say it...
> > > 
> > > Don't make up random device_type values.  This does not belong here.
> > 
> > Maybe there should be something like checkpatch.pl that warns about
> > these kinds of things so people can check for it without getting flamed
> > first. :-)

I'd be gentler; except that I know Valentine has been active on this
list recently, so has almost certainly seen similar comments before.

> That's actually a decent idea.  We could even have this thing that
> takes DTS files and processes them...  oh wait.
> 
> So why can't we make a whitelist of "allowed" device_types in DTC and
> make it whine about anything outside of that?

Well, that sort of thing is the idea for dtc to check, when it has
checks enabled anyway.  Getting it so that it doesn't have too many
false positives is the tricky bit, as we've seen with some of the
existing checks (where "too many" is "almost any").

Patches welcome...

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/4] PowerPC: 440GRx Rainier DTS.

2007-10-30 Thread Josh Boyer
On Tue, 30 Oct 2007 20:56:51 -0500
Olof Johansson <[EMAIL PROTECTED]> wrote:

> On Wed, Oct 31, 2007 at 10:08:05AM +1100, David Gibson wrote:
> > On Tue, Oct 30, 2007 at 07:56:50PM +0300, Valentine Barshak wrote:
> > > PowerPC 440GRx Rainier DTS.
> > [snip]
> > > + SDRAM0: sdram {
> > > + device_type = "memory-controller";
> > 
> > How many times do we need to say it...
> > 
> > Don't make up random device_type values.  This does not belong here.
> 
> Maybe there should be something like checkpatch.pl that warns about
> these kinds of things so people can check for it without getting flamed
> first. :-)

That's actually a decent idea.  We could even have this thing that
takes DTS files and processes them...  oh wait.

So why can't we make a whitelist of "allowed" device_types in DTC and
make it whine about anything outside of that?

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/4] PowerPC: 440GRx Rainier DTS.

2007-10-30 Thread Olof Johansson
On Wed, Oct 31, 2007 at 10:08:05AM +1100, David Gibson wrote:
> On Tue, Oct 30, 2007 at 07:56:50PM +0300, Valentine Barshak wrote:
> > PowerPC 440GRx Rainier DTS.
> [snip]
> > +   SDRAM0: sdram {
> > +   device_type = "memory-controller";
> 
> How many times do we need to say it...
> 
> Don't make up random device_type values.  This does not belong here.

Maybe there should be something like checkpatch.pl that warns about
these kinds of things so people can check for it without getting flamed
first. :-)

Lots of people base their dts'es on other ones, so until the kernel has
bene clean a while, this will happen all the time. I'm saying "a while"
because people tend to base them on what's fresh when they do the work,
but it might take a few months between then and when they post, etc.


-Olof
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 2/4] PowerPC: 440GRx Rainier DTS.

2007-10-30 Thread David Gibson
On Tue, Oct 30, 2007 at 07:56:50PM +0300, Valentine Barshak wrote:
> PowerPC 440GRx Rainier DTS.
[snip]
> + SDRAM0: sdram {
> + device_type = "memory-controller";

How many times do we need to say it...

Don't make up random device_type values.  This does not belong here.

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 2/4] PowerPC: 440GRx Rainier DTS.

2007-10-30 Thread Valentine Barshak
PowerPC 440GRx Rainier DTS.

Signed-off-by: Valentine Barshak <[EMAIL PROTECTED]>
---
 arch/powerpc/boot/dts/rainier.dts |  312 ++
 1 files changed, 312 insertions(+)

diff -pruN linux-2.6.orig/arch/powerpc/boot/dts/rainier.dts 
linux-2.6/arch/powerpc/boot/dts/rainier.dts
--- linux-2.6.orig/arch/powerpc/boot/dts/rainier.dts1970-01-01 
03:00:00.0 +0300
+++ linux-2.6/arch/powerpc/boot/dts/rainier.dts 2007-10-30 18:00:15.0 
+0300
@@ -0,0 +1,312 @@
+/*
+ * Device Tree Source for AMCC Rainier
+ *
+ * Based on Sequoia code
+ * Copyright (c) 2007 MontaVista Software, Inc.
+ *
+ * FIXME: Draft only!
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ *
+ */
+
+/ {
+   #address-cells = <2>;
+   #size-cells = <1>;
+   model = "amcc,rainier";
+   compatible = "amcc,rainier";
+   dcr-parent = <&/cpus/PowerPC,[EMAIL PROTECTED]>;
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = "cpu";
+   reg = <0>;
+   clock-frequency = <0>; /* Filled in by zImage */
+   timebase-frequency = <0>; /* Filled in by zImage */
+   i-cache-line-size = <20>;
+   d-cache-line-size = <20>;
+   i-cache-size = <8000>;
+   d-cache-size = <8000>;
+   dcr-controller;
+   dcr-access-method = "native";
+   };
+   };
+
+   memory {
+   device_type = "memory";
+   reg = <0 0 0>; /* Filled in by zImage */
+   };
+
+   UIC0: interrupt-controller0 {
+   compatible = "ibm,uic-440grx","ibm,uic";
+   interrupt-controller;
+   cell-index = <0>;
+   dcr-reg = <0c0 009>;
+   #address-cells = <0>;
+   #size-cells = <0>;
+   #interrupt-cells = <2>;
+   };
+
+   UIC1: interrupt-controller1 {
+   compatible = "ibm,uic-440grx","ibm,uic";
+   interrupt-controller;
+   cell-index = <1>;
+   dcr-reg = <0d0 009>;
+   #address-cells = <0>;
+   #size-cells = <0>;
+   #interrupt-cells = <2>;
+   interrupts = <1e 4 1f 4>; /* cascade */
+   interrupt-parent = <&UIC0>;
+   };
+
+   UIC2: interrupt-controller2 {
+   compatible = "ibm,uic-440grx","ibm,uic";
+   interrupt-controller;
+   cell-index = <2>;
+   dcr-reg = <0e0 009>;
+   #address-cells = <0>;
+   #size-cells = <0>;
+   #interrupt-cells = <2>;
+   interrupts = <1c 4 1d 4>; /* cascade */
+   interrupt-parent = <&UIC0>;
+   };
+
+   SDR0: sdr {
+   compatible = "ibm,sdr-440grx", "ibm,sdr-440ep";
+   dcr-reg = <00e 002>;
+   };
+
+   CPR0: cpr {
+   compatible = "ibm,cpr-440grx", "ibm,cpr-440ep";
+   dcr-reg = <00c 002>;
+   };
+
+   plb {
+   compatible = "ibm,plb-440grx", "ibm,plb4";
+   #address-cells = <2>;
+   #size-cells = <1>;
+   ranges;
+   clock-frequency = <0>; /* Filled in by zImage */
+   
+   SDRAM0: sdram {
+   device_type = "memory-controller";
+   compatible = "ibm,sdram-440grx", 
"ibm,sdram-44x-ddr2denali";
+   dcr-reg = <010 2>;
+   };
+
+   DMA0: dma {
+   compatible = "ibm,dma-440grx", "ibm,dma-4xx";
+   dcr-reg = <100 027>;
+   };
+
+   MAL0: mcmal {
+   compatible = "ibm,mcmal-440grx", "ibm,mcmal2";
+   dcr-reg = <180 62>;
+   num-tx-chans = <2>;
+   num-rx-chans = <2>;
+   interrupt-parent = <&MAL0>;
+   interrupts = <0 1 2 3 4>;
+   #interrupt-cells = <1>;
+   #address-cells = <0>;
+   #size-cells = <0>;
+   interrupt-map = ;
+   interrupt-map-mask = ;
+   };
+
+   POB0: opb {
+   compatible = "ibm,opb-440grx", "ibm,opb";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   ranges = < 1  8000
+ 8000 1 8000 8000>;
+   interrupt-parent = <&UIC1>;
+   interrupts = <7 4>;
+   clock-freq