All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
@ 2007-02-13 16:47 Timur Tabi
  2007-02-13 17:16 ` Kumar Gala
  2007-02-14  0:31 ` David Gibson
  0 siblings, 2 replies; 46+ messages in thread
From: Timur Tabi @ 2007-02-13 16:47 UTC (permalink / raw)
  To: paulus, linuxppc-dev; +Cc: Timur Tabi

The 'linux,boot-cpu' property and the 'chosen' node do not belong in the
DTS file, because U-Boot creates these entries in the device tree when
it boots linux.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 arch/powerpc/boot/dts/kuroboxHG.dts    |    1 -
 arch/powerpc/boot/dts/mpc7448hpc2.dts  |    5 ++---
 arch/powerpc/boot/dts/mpc8272ads.dts   |    8 --------
 arch/powerpc/boot/dts/mpc8323emds.dts  |    7 +++----
 arch/powerpc/boot/dts/mpc8360emds.dts  |    1 -
 arch/powerpc/boot/dts/mpc8560ads.dts   |    1 -
 arch/powerpc/boot/dts/mpc8641_hpcn.dts |    3 +--
 arch/powerpc/boot/dts/mpc866ads.dts    |    1 -
 arch/powerpc/boot/dts/mpc885ads.dts    |    1 -
 9 files changed, 6 insertions(+), 22 deletions(-)

diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts
index d06b0b0..7531027 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -35,7 +35,6 @@ build with: "dtc -f -I dts -O dtb -o kur
 
 		PowerPC,603e { /* Really 8241 */
 			linux,phandle = <2100>;
-			linux,boot-cpu;
 			device_type = "cpu";
 			reg = <0>;
 			clock-frequency = <fdad680>;	/* Fixed by bootwrapper */
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index c4d9562..4164351 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -23,7 +23,7 @@
 		#address-cells = <1>;
 		#size-cells =<0>;
 		linux,phandle = <200>;
-				
+
 		PowerPC,7448@0 {
 			device_type = "cpu";
 			reg = <0>;
@@ -36,7 +36,6 @@
 			bus-frequency = <0>;		// From U-Boot
 			32-bit;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
@@ -152,7 +151,7 @@
 			#address-cells = <3>;
 			reg = <1000 1000>;
 			bus-range = <0 0>;
-			ranges = <02000000 0 e0000000 e0000000 0 1A000000	
+			ranges = <02000000 0 e0000000 e0000000 0 1A000000
 				  01000000 0 00000000 fa000000 0 00010000>;
 			clock-frequency = <7f28154>;
 			interrupt-parent = <7400>;
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 26b44f7..c9ffc12 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -34,7 +34,6 @@
                        clock-frequency = <0>;
                        32-bit;
                        linux,phandle = <201>;
-                       linux,boot-cpu;
                };
        };
 
@@ -53,13 +52,6 @@
                reg = <00000000 4000000 f4500000 00000020>;
        };
 
-       chosen {
-               name = "chosen";
-               linux,platform = <0>;
-               interrupt-controller = <10c00>;
-               linux,phandle = <400>;
-       };
-
        soc8272@f0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8323emds.dts b/arch/powerpc/boot/dts/mpc8323emds.dts
index fa7ef24..eaf0f86 100644
--- a/arch/powerpc/boot/dts/mpc8323emds.dts
+++ b/arch/powerpc/boot/dts/mpc8323emds.dts
@@ -34,7 +34,6 @@
 			clock-frequency = <0>;
 			32-bit;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
@@ -174,7 +173,7 @@
 			built-in;
 			device_type = "ipic";
 		};
-		
+
 		par_io@1400 {
 			reg = <1400 100>;
 			device_type = "par_io";
@@ -237,11 +236,11 @@
 		reg = <e0100000 480>;
 		brg-frequency = <0>;
 		bus-frequency = <BCD3D80>;
-		
+
 		muram@10000 {
 			device_type = "muram";
 			ranges = <0 00010000 00004000>;
-	
+
 			data-only@0 {
 				reg = <0 4000>;
 			};
diff --git a/arch/powerpc/boot/dts/mpc8360emds.dts b/arch/powerpc/boot/dts/mpc8360emds.dts
index 9022192..303bd66 100644
--- a/arch/powerpc/boot/dts/mpc8360emds.dts
+++ b/arch/powerpc/boot/dts/mpc8360emds.dts
@@ -39,7 +39,6 @@
 			clock-frequency = <1F78A400>;
 			32-bit;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 119bd5d..c74d6eb 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -35,7 +35,6 @@
 			clock-frequency = <312c8040>;
 			32-bit;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index f0c7731..258fccb 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -32,7 +32,6 @@
 			bus-frequency = <0>;		// From uboot
 			clock-frequency = <0>;		// From uboot
 			32-bit;
-			linux,boot-cpu;
 		};
 		PowerPC,8641@1 {
 			device_type = "cpu";
@@ -142,7 +141,7 @@
 			interrupt-parent = <40000>;
 			phy-handle = <2452001>;
 		};
-		
+
 		ethernet@26000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
index 5d40052..2b56b5d 100644
--- a/arch/powerpc/boot/dts/mpc866ads.dts
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -37,7 +37,6 @@
 			interrupts = <f 2>;	// decrementer interrupt
 			interrupt-parent = <ff000000>;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
index cf1a19f..faecd08 100644
--- a/arch/powerpc/boot/dts/mpc885ads.dts
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -37,7 +37,6 @@
 			interrupts = <f 2>;	// decrementer interrupt
 			interrupt-parent = <ff000000>;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
-- 
1.4.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-13 16:47 [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files Timur Tabi
@ 2007-02-13 17:16 ` Kumar Gala
  2007-02-13 17:20   ` Timur Tabi
                     ` (2 more replies)
  2007-02-14  0:31 ` David Gibson
  1 sibling, 3 replies; 46+ messages in thread
From: Kumar Gala @ 2007-02-13 17:16 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus


On Feb 13, 2007, at 10:47 AM, Timur Tabi wrote:

> The 'linux,boot-cpu' property and the 'chosen' node do not belong  
> in the
> DTS file, because U-Boot creates these entries in the device tree when
> it boots linux.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---

Is there some harm is having them set in the .dts?

I can see 'linux,boot-cpu' may vary on a SMP, but the majority  
of .dts's are for uniproc's

- k

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-13 17:16 ` Kumar Gala
@ 2007-02-13 17:20   ` Timur Tabi
  2007-02-13 19:29   ` Timur Tabi
  2007-02-15  1:42   ` Segher Boessenkool
  2 siblings, 0 replies; 46+ messages in thread
From: Timur Tabi @ 2007-02-13 17:20 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, paulus

Kumar Gala wrote:
> 
> On Feb 13, 2007, at 10:47 AM, Timur Tabi wrote:
> 
>> The 'linux,boot-cpu' property and the 'chosen' node do not belong in the
>> DTS file, because U-Boot creates these entries in the device tree when
>> it boots linux.
>>
>> Signed-off-by: Timur Tabi <timur@freescale.com>
>> ---
> 
> Is there some harm is having them set in the .dts?

Well, I don't think a DTS should contain a property that isn't going to be used. 
  It might convince people that the property belongs there.

The 'chosen' section is absent from all but one DTS for the same reason.

> I can see 'linux,boot-cpu' may vary on a SMP, but the majority of .dts's 
> are for uniproc's

U-Boot sets it, so whatever the DTS contains is ignored.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-13 17:16 ` Kumar Gala
  2007-02-13 17:20   ` Timur Tabi
@ 2007-02-13 19:29   ` Timur Tabi
  2007-02-15  1:42   ` Segher Boessenkool
  2 siblings, 0 replies; 46+ messages in thread
From: Timur Tabi @ 2007-02-13 19:29 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, paulus

Kumar Gala wrote:
> 
> On Feb 13, 2007, at 10:47 AM, Timur Tabi wrote:
> 
>> The 'linux,boot-cpu' property and the 'chosen' node do not belong in the
>> DTS file, because U-Boot creates these entries in the device tree when
>> it boots linux.
>>
>> Signed-off-by: Timur Tabi <timur@freescale.com>
>> ---
> 
> Is there some harm is having them set in the .dts?

Actually, I just found out that the boot-cpu property is obsolete.  Instead, the 
boot CPU is specified in the device tree header, and DTC will complain if it 
sees linux,boot-cpu.

With that in mind, I'm going to respin this patch to include a change in 
booting-without-of.txt.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-13 16:47 [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files Timur Tabi
  2007-02-13 17:16 ` Kumar Gala
@ 2007-02-14  0:31 ` David Gibson
  2007-02-14  5:18   ` Timur Tabi
  1 sibling, 1 reply; 46+ messages in thread
From: David Gibson @ 2007-02-14  0:31 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus

On Tue, Feb 13, 2007 at 10:47:19AM -0600, Timur Tabi wrote:
> The 'linux,boot-cpu' property and the 'chosen' node do not belong in the
> DTS file, because U-Boot creates these entries in the device tree when
> it boots linux.

[snip]
> @@ -53,13 +52,6 @@
>                 reg = <00000000 4000000 f4500000 00000020>;
>         };
>  
> -       chosen {
> -               name = "chosen";
> -               linux,platform = <0>;
> -               interrupt-controller = <10c00>;
> -               linux,phandle = <400>;
> -       };
> -

Um.. at least the interrupt-controller property here should be fixed,
and thus should probably remain in the dts.

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

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  0:31 ` David Gibson
@ 2007-02-14  5:18   ` Timur Tabi
  2007-02-14  5:24     ` David Gibson
  0 siblings, 1 reply; 46+ messages in thread
From: Timur Tabi @ 2007-02-14  5:18 UTC (permalink / raw)
  To: Timur Tabi, linuxppc-dev

David Gibson wrote:

>> -       chosen {
>> -               name = "chosen";
>> -               linux,platform = <0>;
>> -               interrupt-controller = <10c00>;
>> -               linux,phandle = <400>;
>> -       };
>> -
> 
> Um.. at least the interrupt-controller property here should be fixed,
> and thus should probably remain in the dts.

Can you be more specific?  I'm not familiar with this board, so I don't 
really know what you're talking about.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:18   ` Timur Tabi
@ 2007-02-14  5:24     ` David Gibson
  2007-02-14 14:05       ` Timur Tabi
  0 siblings, 1 reply; 46+ messages in thread
From: David Gibson @ 2007-02-14  5:24 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev

On Tue, Feb 13, 2007 at 11:18:50PM -0600, Timur Tabi wrote:
> David Gibson wrote:
> 
> >> -       chosen {
> >> -               name = "chosen";
> >> -               linux,platform = <0>;
> >> -               interrupt-controller = <10c00>;
> >> -               linux,phandle = <400>;
> >> -       };
> >> -
> > 
> > Um.. at least the interrupt-controller property here should be fixed,
> > and thus should probably remain in the dts.
> 
> Can you be more specific?  I'm not familiar with this board, so I don't 
> really know what you're talking about.

The interrupt-controller property in /chosen just points to the
system's top-level interrupt controller to make it easier for the
kernel to find in the tree.  I think most platforms don't actually
need or use it at present, but booting-without-of does recommend it.

As such it's a property of the board, not something which will change
from boot to boot.  It would therefore be rather strange for the
bootloader to poke this property.

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

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:24     ` David Gibson
@ 2007-02-14 14:05       ` Timur Tabi
  2007-02-14 23:33         ` David Gibson
  0 siblings, 1 reply; 46+ messages in thread
From: Timur Tabi @ 2007-02-14 14:05 UTC (permalink / raw)
  To: linuxppc-dev

David Gibson wrote:

> The interrupt-controller property in /chosen just points to the
> system's top-level interrupt controller to make it easier for the
> kernel to find in the tree.  I think most platforms don't actually
> need or use it at present, but booting-without-of does recommend it.
> 
> As such it's a property of the board, not something which will change
> from boot to boot.  It would therefore be rather strange for the
> bootloader to poke this property.

That's all the more reason to delete the 'chosen' section, isn't it? 
Sicne it's wrong, deleting the entire section will just make the problem 
go away.  Or am I missing something?

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 14:05       ` Timur Tabi
@ 2007-02-14 23:33         ` David Gibson
  2007-02-14 23:47           ` Timur Tabi
                             ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: David Gibson @ 2007-02-14 23:33 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev

On Wed, Feb 14, 2007 at 08:05:40AM -0600, Timur Tabi wrote:
> David Gibson wrote:
> 
> > The interrupt-controller property in /chosen just points to the
> > system's top-level interrupt controller to make it easier for the
> > kernel to find in the tree.  I think most platforms don't actually
> > need or use it at present, but booting-without-of does recommend it.
> > 
> > As such it's a property of the board, not something which will change
> > from boot to boot.  It would therefore be rather strange for the
> > bootloader to poke this property.
> 
> That's all the more reason to delete the 'chosen' section, isn't it? 
> Sicne it's wrong, deleting the entire section will just make the problem 
> go away.  Or am I missing something?

Er.. I think you're missing something.

My point is that the interrupt-controller property in /chosen *should*
be there, but it doesn't make a lot of sense for it to be set by the
bootloader (because it's a fixed property of the board).  Therefore it
should be in the dts, therefore the /chosen node needs to be there to
contain it.

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

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 23:33         ` David Gibson
@ 2007-02-14 23:47           ` Timur Tabi
  2007-02-15  1:40           ` Segher Boessenkool
  2007-02-15 16:18           ` [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files Timur Tabi
  2 siblings, 0 replies; 46+ messages in thread
From: Timur Tabi @ 2007-02-14 23:47 UTC (permalink / raw)
  To: linuxppc-dev

David Gibson wrote:

> Er.. I think you're missing something.
> 
> My point is that the interrupt-controller property in /chosen *should*
> be there, but it doesn't make a lot of sense for it to be set by the
> bootloader (because it's a fixed property of the board).  Therefore it
> should be in the dts, therefore the /chosen node needs to be there to
> contain it.

Ok, I understand.

Well, as soon as my other DTS-related patches are applied, I'll start working on 
one for the 'chosen' section.


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 23:33         ` David Gibson
  2007-02-14 23:47           ` Timur Tabi
@ 2007-02-15  1:40           ` Segher Boessenkool
  2007-02-15 21:26             ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles) Yoder Stuart-B08248
  2007-02-15 16:18           ` [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files Timur Tabi
  2 siblings, 1 reply; 46+ messages in thread
From: Segher Boessenkool @ 2007-02-15  1:40 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Timur Tabi

> My point is that the interrupt-controller property in /chosen *should*
> be there, but it doesn't make a lot of sense for it to be set by the
> bootloader (because it's a fixed property of the board).

And that means it shouldn't be in /chosen at all.  It's not
just a fixed property of the board, it is a physical property
of the board.  It doesn't belong in /chosen.


Segher

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-13 17:16 ` Kumar Gala
  2007-02-13 17:20   ` Timur Tabi
  2007-02-13 19:29   ` Timur Tabi
@ 2007-02-15  1:42   ` Segher Boessenkool
  2 siblings, 0 replies; 46+ messages in thread
From: Segher Boessenkool @ 2007-02-15  1:42 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, paulus, Timur Tabi

> Is there some harm is having them set in the .dts?
>
> I can see 'linux,boot-cpu' may vary on a SMP, but the majority
> of .dts's are for uniproc's

The way this is handled in the OF binding, only multi-processor
systems are required to explicitly state their boot CPU (in
/chosen/cpu).  It's quite silly to require this for single
CPU systems.


Segher

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 23:33         ` David Gibson
  2007-02-14 23:47           ` Timur Tabi
  2007-02-15  1:40           ` Segher Boessenkool
@ 2007-02-15 16:18           ` Timur Tabi
  2 siblings, 0 replies; 46+ messages in thread
From: Timur Tabi @ 2007-02-15 16:18 UTC (permalink / raw)
  To: linuxppc-dev

David Gibson wrote:

> My point is that the interrupt-controller property in /chosen *should*
> be there, but it doesn't make a lot of sense for it to be set by the
> bootloader (because it's a fixed property of the board).  Therefore it
> should be in the dts, therefore the /chosen node needs to be there to
> contain it.

Ok, I've added that to my to-do list.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 46+ messages in thread

* purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-15  1:40           ` Segher Boessenkool
@ 2007-02-15 21:26             ` Yoder Stuart-B08248
  2007-02-15 21:39               ` Kumar Gala
                                 ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: Yoder Stuart-B08248 @ 2007-02-15 21:26 UTC (permalink / raw)
  To: Segher Boessenkool, Benjamin Herrenschmidt; +Cc: linuxppc-dev

=20

> -----Original Message-----
> From: linuxppc-dev-bounces+b08248=3Dfreescale.com@ozlabs.org=20
> [mailto:linuxppc-dev-bounces+b08248=3Dfreescale.com@ozlabs.org]=20
> On Behalf Of Segher Boessenkool
> Sent: Wednesday, February 14, 2007 7:40 PM
> To: David Gibson
> Cc: linuxppc-dev@ozlabs.org; Tabi Timur-B04825
> Subject: Re: [PATCH] powerpc: delete boot-cpu and chosen=20
> nodes from all DTSfiles
>=20
> > My point is that the interrupt-controller property in=20
> /chosen *should*
> > be there, but it doesn't make a lot of sense for it to be set by the
> > bootloader (because it's a fixed property of the board).
>=20
> And that means it shouldn't be in /chosen at all.  It's not
> just a fixed property of the board, it is a physical property
> of the board.  It doesn't belong in /chosen.

I agree with Segher here.  The interrupt-controller property doesn't
belong in /chosen.

The 1275 OF spec says about /chosen:

   Has properties describing parameters chosen or specified at
   runtime.

The typical properties are boot device, boot args, console, etc--=20
i.e. dynamic stuff set by software and not describing the physical
hardware.

I think we should stick with this definition.  Separating the
dynamic properties set by firmware with physical properties of
board is cleaner and follows the original intent of /chosen.

If the kernel needs a convenient place to keep a phandle to the
top level interrupt controller, how about just under root?
(Or, we could make up a new node)

If we can remove physical board dependencies from /chosen then
we could also remove it from the DTS files and require that firmware
set up /chosen.

For obscure cases where firmware can't do this for some reason,
the developer can simply add a /chosen section to his private
DTS file.

Thoughts?

Stuart Yoder

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-15 21:26             ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles) Yoder Stuart-B08248
@ 2007-02-15 21:39               ` Kumar Gala
  2007-02-15 21:45                 ` Yoder Stuart-B08248
  2007-02-16  7:34                 ` Segher Boessenkool
  2007-02-15 23:01               ` David Gibson
  2007-02-16  7:30               ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu " Segher Boessenkool
  2 siblings, 2 replies; 46+ messages in thread
From: Kumar Gala @ 2007-02-15 21:39 UTC (permalink / raw)
  To: Yoder Stuart-B08248; +Cc: linuxppc-dev


On Feb 15, 2007, at 3:26 PM, Yoder Stuart-B08248 wrote:

>
>
>> -----Original Message-----
>> From: linuxppc-dev-bounces+b08248=freescale.com@ozlabs.org
>> [mailto:linuxppc-dev-bounces+b08248=freescale.com@ozlabs.org]
>> On Behalf Of Segher Boessenkool
>> Sent: Wednesday, February 14, 2007 7:40 PM
>> To: David Gibson
>> Cc: linuxppc-dev@ozlabs.org; Tabi Timur-B04825
>> Subject: Re: [PATCH] powerpc: delete boot-cpu and chosen
>> nodes from all DTSfiles
>>
>>> My point is that the interrupt-controller property in
>> /chosen *should*
>>> be there, but it doesn't make a lot of sense for it to be set by the
>>> bootloader (because it's a fixed property of the board).
>>
>> And that means it shouldn't be in /chosen at all.  It's not
>> just a fixed property of the board, it is a physical property
>> of the board.  It doesn't belong in /chosen.
>
> I agree with Segher here.  The interrupt-controller property doesn't
> belong in /chosen.
>
> The 1275 OF spec says about /chosen:
>
>    Has properties describing parameters chosen or specified at
>    runtime.

I want to reiterate something Paul mentioned, any similarity that the  
device tree has to 1275 is strictly coincidental.

- k

^ permalink raw reply	[flat|nested] 46+ messages in thread

* RE: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-15 21:39               ` Kumar Gala
@ 2007-02-15 21:45                 ` Yoder Stuart-B08248
  2007-02-16  7:38                   ` Segher Boessenkool
  2007-02-16  7:34                 ` Segher Boessenkool
  1 sibling, 1 reply; 46+ messages in thread
From: Yoder Stuart-B08248 @ 2007-02-15 21:45 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev

=20

> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
> Sent: Thursday, February 15, 2007 3:39 PM
> To: Yoder Stuart-B08248
> Cc: Segher Boessenkool; Benjamin Herrenschmidt;=20
> linuxppc-dev@ozlabs.org
> Subject: Re: purpose of /chosen node (was RE: [PATCH]=20
> powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
>=20
>=20
> On Feb 15, 2007, at 3:26 PM, Yoder Stuart-B08248 wrote:
> >> -----Original Message-----
> >> From: linuxppc-dev-bounces+b08248=3Dfreescale.com@ozlabs.org
> >> [mailto:linuxppc-dev-bounces+b08248=3Dfreescale.com@ozlabs.org]
> >> On Behalf Of Segher Boessenkool
> >> Sent: Wednesday, February 14, 2007 7:40 PM
> >> To: David Gibson
> >> Cc: linuxppc-dev@ozlabs.org; Tabi Timur-B04825
> >> Subject: Re: [PATCH] powerpc: delete boot-cpu and chosen
> >> nodes from all DTSfiles
> >>
> >>> My point is that the interrupt-controller property in
> >> /chosen *should*
> >>> be there, but it doesn't make a lot of sense for it to be=20
> set by the
> >>> bootloader (because it's a fixed property of the board).
> >>
> >> And that means it shouldn't be in /chosen at all.  It's not
> >> just a fixed property of the board, it is a physical property
> >> of the board.  It doesn't belong in /chosen.
> >
> > I agree with Segher here.  The interrupt-controller property doesn't
> > belong in /chosen.
> >
> > The 1275 OF spec says about /chosen:
> >
> >    Has properties describing parameters chosen or specified at
> >    runtime.
>=20
> I want to reiterate something Paul mentioned, any similarity=20
> that the =20
> device tree has to 1275 is strictly coincidental.

I understand that point, but mixing the types of properties in
/chosen doesn't buy us anything.  We shouldn't be shackled by
the 1275 spec, but having nodes like /chosen with designated
purpose architecturally make sense.

/chosen shouldn't be a catch-all or a convenient place to stick
stuff.  I think in this case following 1275 is a good thing.

Stuart

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-15 21:26             ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles) Yoder Stuart-B08248
  2007-02-15 21:39               ` Kumar Gala
@ 2007-02-15 23:01               ` David Gibson
  2007-02-16  0:08                 ` Benjamin Herrenschmidt
  2007-02-16  7:30               ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu " Segher Boessenkool
  2 siblings, 1 reply; 46+ messages in thread
From: David Gibson @ 2007-02-15 23:01 UTC (permalink / raw)
  To: Yoder Stuart-B08248; +Cc: linuxppc-dev

On Thu, Feb 15, 2007 at 02:26:41PM -0700, Yoder Stuart-B08248 wrote:
>  
> 
> > -----Original Message-----
> > From: linuxppc-dev-bounces+b08248=freescale.com@ozlabs.org 
> > [mailto:linuxppc-dev-bounces+b08248=freescale.com@ozlabs.org] 
> > On Behalf Of Segher Boessenkool
> > Sent: Wednesday, February 14, 2007 7:40 PM
> > To: David Gibson
> > Cc: linuxppc-dev@ozlabs.org; Tabi Timur-B04825
> > Subject: Re: [PATCH] powerpc: delete boot-cpu and chosen 
> > nodes from all DTSfiles
> > 
> > > My point is that the interrupt-controller property in 
> > /chosen *should*
> > > be there, but it doesn't make a lot of sense for it to be set by the
> > > bootloader (because it's a fixed property of the board).
> > 
> > And that means it shouldn't be in /chosen at all.  It's not
> > just a fixed property of the board, it is a physical property
> > of the board.  It doesn't belong in /chosen.
> 
> I agree with Segher here.  The interrupt-controller property doesn't
> belong in /chosen.

You're right.  Question is, can we change it now.  It's out there in
the documentation, on the other hand, I don't think the kernel
actually uses it anywhere yet.  BenH, opinion?

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

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-15 23:01               ` David Gibson
@ 2007-02-16  0:08                 ` Benjamin Herrenschmidt
  2007-02-16 16:58                   ` purpose of /chosen node (was RE: [PATCH] powerpc: deleteboot-cpu " Yoder Stuart-B08248
  0 siblings, 1 reply; 46+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-16  0:08 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Yoder Stuart-B08248


> You're right.  Question is, can we change it now.  It's out there in
> the documentation, on the other hand, I don't think the kernel
> actually uses it anywhere yet.  BenH, opinion?

We can change the documentation and add a little note about "obsoleted
practice". I don't think the kernel uses it.

Ben.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-15 21:26             ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles) Yoder Stuart-B08248
  2007-02-15 21:39               ` Kumar Gala
  2007-02-15 23:01               ` David Gibson
@ 2007-02-16  7:30               ` Segher Boessenkool
  2007-02-16  9:54                 ` Benjamin Herrenschmidt
  2 siblings, 1 reply; 46+ messages in thread
From: Segher Boessenkool @ 2007-02-16  7:30 UTC (permalink / raw)
  To: Yoder Stuart-B08248; +Cc: linuxppc-dev

> If the kernel needs a convenient place to keep a phandle to the
> top level interrupt controller,

Well that's the first point: the kernel doesn't need this
at all, it can derive this from the rest of the tree easy
enough.

> how about just under root?

CHRP does this (in an extra-plus nasty way).

> (Or, we could make up a new node)

Duplicate node?  No way.  You can be flexible with adding
extra properties, but every node should represent a (pseudo-)
device, and every device in the system should be represented
by exactly one node.

Or you could make the convention that /aliases/interrupt-controller
points to the root interrupt controller, if you really
think you want this.


Segher

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-15 21:39               ` Kumar Gala
  2007-02-15 21:45                 ` Yoder Stuart-B08248
@ 2007-02-16  7:34                 ` Segher Boessenkool
  1 sibling, 0 replies; 46+ messages in thread
From: Segher Boessenkool @ 2007-02-16  7:34 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, Yoder Stuart-B08248

> I want to reiterate something Paul mentioned, any similarity that the 
> device tree has to 1275 is strictly coincidental.

I'm sure you know it is not coincidental.

Now you can of course do things in a different way if
you really feel the need to, but please do it in a
non-overlapping way then.  So, don't reuse /chosen
for something else than what it is meant for in OF,
etc.


Segher

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-15 21:45                 ` Yoder Stuart-B08248
@ 2007-02-16  7:38                   ` Segher Boessenkool
  0 siblings, 0 replies; 46+ messages in thread
From: Segher Boessenkool @ 2007-02-16  7:38 UTC (permalink / raw)
  To: Yoder Stuart-B08248; +Cc: linuxppc-dev

> I understand that point, but mixing the types of properties in
> /chosen doesn't buy us anything.  We shouldn't be shackled by
> the 1275 spec,

Sure, you have some special needs, and some ways in which
the flat tree just _is_ different from an OF device tree;
for example, you don't have instances and ihandles.

Still it doesn't help anyone (and will in fact hurt
everyone) if people start to introduce random incompatibilities
for no good reason at all.

> but having nodes like /chosen with designated
> purpose architecturally make sense.

Yes.  And since this node already has a well-defined
purpose in OF, you better use it for that purpose only
and make a /flattree/grabbag node for your random stuff.

> /chosen shouldn't be a catch-all or a convenient place to stick
> stuff.  I think in this case following 1275 is a good thing.


Segher

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
  2007-02-16  7:30               ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu " Segher Boessenkool
@ 2007-02-16  9:54                 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 46+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-16  9:54 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Yoder Stuart-B08248

On Fri, 2007-02-16 at 08:30 +0100, Segher Boessenkool wrote:
> > If the kernel needs a convenient place to keep a phandle to the
> > top level interrupt controller,
> 
> Well that's the first point: the kernel doesn't need this
> at all, it can derive this from the rest of the tree easy
> enough.

Not that easy. I beleive it's better to have it expressed explicitely.

> > how about just under root?
> 
> CHRP does this (in an extra-plus nasty way).
> 
> > (Or, we could make up a new node)
> 
> Duplicate node?  No way.  You can be flexible with adding
> extra properties, but every node should represent a (pseudo-)
> device, and every device in the system should be represented
> by exactly one node.
> 
> Or you could make the convention that /aliases/interrupt-controller
> points to the root interrupt controller, if you really
> think you want this.

That too.

Ben.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* RE: purpose of /chosen node (was RE: [PATCH] powerpc: deleteboot-cpu and chosen nodes from all DTSfiles)
  2007-02-16  0:08                 ` Benjamin Herrenschmidt
@ 2007-02-16 16:58                   ` Yoder Stuart-B08248
  2007-02-16 17:00                     ` Kumar Gala
  0 siblings, 1 reply; 46+ messages in thread
From: Yoder Stuart-B08248 @ 2007-02-16 16:58 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, David Gibson; +Cc: linuxppc-dev

=20

> -----Original Message-----
> From: Benjamin Herrenschmidt [mailto:benh@kernel.crashing.org]=20
> Sent: Thursday, February 15, 2007 6:09 PM
> To: David Gibson
> Cc: Yoder Stuart-B08248; Segher Boessenkool; linuxppc-dev@ozlabs.org
> Subject: Re: purpose of /chosen node (was RE: [PATCH]=20
> powerpc: deleteboot-cpu and chosen nodes from all DTSfiles)
>=20
>=20
> > You're right.  Question is, can we change it now.  It's out there in
> > the documentation, on the other hand, I don't think the kernel
> > actually uses it anywhere yet.  BenH, opinion?
>=20
> We can change the documentation and add a little note about "obsoleted
> practice". I don't think the kernel uses it.
>=20

I'll submit a patch to booting-without-of.txt for this.

Stuart

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: purpose of /chosen node (was RE: [PATCH] powerpc: deleteboot-cpu and chosen nodes from all DTSfiles)
  2007-02-16 16:58                   ` purpose of /chosen node (was RE: [PATCH] powerpc: deleteboot-cpu " Yoder Stuart-B08248
@ 2007-02-16 17:00                     ` Kumar Gala
  0 siblings, 0 replies; 46+ messages in thread
From: Kumar Gala @ 2007-02-16 17:00 UTC (permalink / raw)
  To: Yoder Stuart-B08248; +Cc: Linux PPC Dev ML, Jon Loeliger, David Gibson


On Feb 16, 2007, at 10:58 AM, Yoder Stuart-B08248 wrote:

>
>
>> -----Original Message-----
>> From: Benjamin Herrenschmidt [mailto:benh@kernel.crashing.org]
>> Sent: Thursday, February 15, 2007 6:09 PM
>> To: David Gibson
>> Cc: Yoder Stuart-B08248; Segher Boessenkool; linuxppc-dev@ozlabs.org
>> Subject: Re: purpose of /chosen node (was RE: [PATCH]
>> powerpc: deleteboot-cpu and chosen nodes from all DTSfiles)
>>
>>
>>> You're right.  Question is, can we change it now.  It's out there in
>>> the documentation, on the other hand, I don't think the kernel
>>> actually uses it anywhere yet.  BenH, opinion?
>>
>> We can change the documentation and add a little note about  
>> "obsoleted
>> practice". I don't think the kernel uses it.
>>
>
> I'll submit a patch to booting-without-of.txt for this.

Need to also update dtc not to "warn" about it.

- k

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:15   ` Timur Tabi
  2007-02-14  5:19     ` David Gibson
  2007-02-14  5:27     ` Benjamin Herrenschmidt
@ 2007-02-15  1:45     ` Segher Boessenkool
  2 siblings, 0 replies; 46+ messages in thread
From: Segher Boessenkool @ 2007-02-15  1:45 UTC (permalink / raw)
  To: Timur Tabi; +Cc: paulus, Stuart Yoder, linuxppc-dev

>> I think that:
>>
>>  - The /chosen node should be present in the .dts even if empty
>
> Only one DTS file has it.  It's been removed from every other DTS.  Are
> you should that instead of removing the last one, I should *add* one to
> the other DTS files?

Every device tree is required to have a /chosen node.  Now
that doesn't mean DTS files need one; there are some more
options:

-- dtc could add the node whenever it is missing from the DTS;
-- it could be made a requirement of the boot loader to add it;
-- the kernel could be taught to fake one if needed.

Pick your poison :-)  I prefer the first option (dtc).


Segher

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 21:17                 ` Benjamin Herrenschmidt
  2007-02-14 21:58                   ` Timur Tabi
@ 2007-02-14 23:37                   ` David Gibson
  1 sibling, 0 replies; 46+ messages in thread
From: David Gibson @ 2007-02-14 23:37 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus, Timur Tabi, Stuart Yoder

On Thu, Feb 15, 2007 at 08:17:02AM +1100, Benjamin Herrenschmidt wrote:
> On Wed, 2007-02-14 at 15:02 -0600, Timur Tabi wrote:
> > Benjamin Herrenschmidt wrote:
> > 
> > >> Obviously, the kernel needs a 'chosen' section, and that's why U-Boot 
> > >> adds one.  And since U-Boot adds one, the DTS itself doesn't need one. 
> > >> Does the 8272 never use U-Boot?
> > > 
> > > I'm not talking specifically about the 8272. I think we should at it
> > > back to all dts's
> > 
> > Ugh.  Considering that U-Boot overrides whatever is in the 'chosen' section, can 
> > you tell me why you think it should be there?  If we put an empty 'chosen' 
> > section in the DTS files, are we actually doing anything meaningful?
> > 
> > In the interest of saving time, I'm going to respin my patch without the 
> > 'chosen' section removed.
> 
> In case somebody wants to use something else than uboot ? I'd like the
> base structure of the mandatory nodes to be there. /chosen is mandatory,
> so it should be there.

More specifically:
	1) Having an (even empty) /chosen makes life easier for other
	bootloaders, which may have quite limited capability to edit
	device tree blobs.

	2) It seems to me the dts files *included with the kernel*
	should be suitable for direct use in zImage wrappers, where
	possible, for use with old uboot and other non device tree
	capable firmwares.

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

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 21:58                   ` Timur Tabi
@ 2007-02-14 22:53                     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 46+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-14 22:53 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus, Stuart Yoder


> Of course, the real solution to this problem is to fix U-Boot. 

Yup :-)

>  However, there 
> isn't any signed up to do that, and even if someone posted a patch right now, 
> there's no telling when it will get applied.  And even if it got applied today, 
> all current U-Boot installations would be broken.  Many of these systems will 
> never be updated.

But their .dts neither so it doesn't matter does it ?

> Therefore, I would say that having a 'chosen' node in the DTS is actually a 
> *bad* thing, on systems that use U-Boot.

Too bad for them..

> Another work-around would be to update the compiler to delete the chosen node 
> when it builds the DTB.  That's not a bad idea, I think, but until that feature 
> is implemented, the DTS files should not have a 'chosen' node.

Ben.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 21:17                 ` Benjamin Herrenschmidt
@ 2007-02-14 21:58                   ` Timur Tabi
  2007-02-14 22:53                     ` Benjamin Herrenschmidt
  2007-02-14 23:37                   ` David Gibson
  1 sibling, 1 reply; 46+ messages in thread
From: Timur Tabi @ 2007-02-14 21:58 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus, Stuart Yoder

Benjamin Herrenschmidt wrote:

> In case somebody wants to use something else than uboot ? I'd like the
> base structure of the mandatory nodes to be there. /chosen is mandatory,
> so it should be there.

I just posted a new patch that just deletes linux,boot-cpu and leaves the 
'chosen' node alone.

However, there is a valid reason for *not* having a 'chosen' node in the DTS. 
Currently, U-Boot does not update the existing 'chosen' node.  Instead, it 
creates a new one.  This means that if one existed in the DTS, then there would 
be *two* in the device tree that is passed to the kernel.  There is no way to 
guarantee that the kernel will use the right one.

Of course, the real solution to this problem is to fix U-Boot.  However, there 
isn't any signed up to do that, and even if someone posted a patch right now, 
there's no telling when it will get applied.  And even if it got applied today, 
all current U-Boot installations would be broken.  Many of these systems will 
never be updated.

Therefore, I would say that having a 'chosen' node in the DTS is actually a 
*bad* thing, on systems that use U-Boot.

Another work-around would be to update the compiler to delete the chosen node 
when it builds the DTB.  That's not a bad idea, I think, but until that feature 
is implemented, the DTS files should not have a 'chosen' node.


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 21:02               ` Timur Tabi
@ 2007-02-14 21:17                 ` Benjamin Herrenschmidt
  2007-02-14 21:58                   ` Timur Tabi
  2007-02-14 23:37                   ` David Gibson
  0 siblings, 2 replies; 46+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-14 21:17 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus, Stuart Yoder

On Wed, 2007-02-14 at 15:02 -0600, Timur Tabi wrote:
> Benjamin Herrenschmidt wrote:
> 
> >> Obviously, the kernel needs a 'chosen' section, and that's why U-Boot 
> >> adds one.  And since U-Boot adds one, the DTS itself doesn't need one. 
> >> Does the 8272 never use U-Boot?
> > 
> > I'm not talking specifically about the 8272. I think we should at it
> > back to all dts's
> 
> Ugh.  Considering that U-Boot overrides whatever is in the 'chosen' section, can 
> you tell me why you think it should be there?  If we put an empty 'chosen' 
> section in the DTS files, are we actually doing anything meaningful?
> 
> In the interest of saving time, I'm going to respin my patch without the 
> 'chosen' section removed.

In case somebody wants to use something else than uboot ? I'd like the
base structure of the mandatory nodes to be there. /chosen is mandatory,
so it should be there.

Ben.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 20:54             ` Benjamin Herrenschmidt
@ 2007-02-14 21:02               ` Timur Tabi
  2007-02-14 21:17                 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 46+ messages in thread
From: Timur Tabi @ 2007-02-14 21:02 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus, Stuart Yoder

Benjamin Herrenschmidt wrote:

>> Obviously, the kernel needs a 'chosen' section, and that's why U-Boot 
>> adds one.  And since U-Boot adds one, the DTS itself doesn't need one. 
>> Does the 8272 never use U-Boot?
> 
> I'm not talking specifically about the 8272. I think we should at it
> back to all dts's

Ugh.  Considering that U-Boot overrides whatever is in the 'chosen' section, can 
you tell me why you think it should be there?  If we put an empty 'chosen' 
section in the DTS files, are we actually doing anything meaningful?

In the interest of saving time, I'm going to respin my patch without the 
'chosen' section removed.


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 20:51                   ` Timur Tabi
@ 2007-02-14 20:58                     ` Guennadi Liakhovetski
  0 siblings, 0 replies; 46+ messages in thread
From: Guennadi Liakhovetski @ 2007-02-14 20:58 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, Paul Mackerras, Stuart Yoder

On Wed, 14 Feb 2007, Timur Tabi wrote:

> Guennadi Liakhovetski wrote:
> 
> > "HD" and "HG" are not the same - it's a new file in git now...
> 
> Oh, sorry.  I guess I need new glasses.

I think, it's someone else who has to be more inventive:-)

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 14:03           ` Timur Tabi
  2007-02-14 20:23             ` Guennadi Liakhovetski
@ 2007-02-14 20:54             ` Benjamin Herrenschmidt
  2007-02-14 21:02               ` Timur Tabi
  1 sibling, 1 reply; 46+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-14 20:54 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus, Stuart Yoder

On Wed, 2007-02-14 at 08:03 -0600, Timur Tabi wrote:
> Benjamin Herrenschmidt wrote:
> 
> >> I just don't understand why it's okay to leave it there.
> > 
> > To make sure there is one. I suspect kernel bits might get upset if it's
> > absent.
> 
> That's not what I meant.  What I don't understand is: what's so special 
> about the 8272 that its DTS should have a 'chosen' section, but no other 
> DTS needs one?
> 
> Obviously, the kernel needs a 'chosen' section, and that's why U-Boot 
> adds one.  And since U-Boot adds one, the DTS itself doesn't need one. 
> Does the 8272 never use U-Boot?

I'm not talking specifically about the 8272. I think we should at it
back to all dts's

Ben.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 20:47                 ` Guennadi Liakhovetski
@ 2007-02-14 20:51                   ` Timur Tabi
  2007-02-14 20:58                     ` Guennadi Liakhovetski
  0 siblings, 1 reply; 46+ messages in thread
From: Timur Tabi @ 2007-02-14 20:51 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linuxppc-dev, Paul Mackerras, Stuart Yoder

Guennadi Liakhovetski wrote:

>>> Another thing, Timur, if you respin your patch, could you do it against 
>>> the current powerpc.git? There's at least one more .dts there that also 
>>> would need boot-cpu removed - kuroboxHD.dts.
>> My patch already removes linux,boot-cpu from kuroboxHD.dts:
>>
>> diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts 
> 
> "HD" and "HG" are not the same - it's a new file in git now...

Oh, sorry.  I guess I need new glasses.

In that case, I will respin the patch.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 20:32               ` Timur Tabi
@ 2007-02-14 20:47                 ` Guennadi Liakhovetski
  2007-02-14 20:51                   ` Timur Tabi
  0 siblings, 1 reply; 46+ messages in thread
From: Guennadi Liakhovetski @ 2007-02-14 20:47 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, Paul Mackerras, Stuart Yoder

On Wed, 14 Feb 2007, Timur Tabi wrote:

> Guennadi Liakhovetski wrote:
> 
> > (as a matter of fact, the more I think about those .dts's, the more it 
> > seems to me like they belong to bootloaders, not in the kernel... Just 
> > one word - information duplication...)
> 
> Well, that's a completely separate issue altogether.

that's why I put it in brackets:-)

> I believe that they are 
> kept with the kernel as a convenience, so that we all have more control over 
> their contents.

yeah... I read a __part__ of those lengthy discussions... Not willing to 
re-start them here, just couldn't help...

> > Another thing, Timur, if you respin your patch, could you do it against 
> > the current powerpc.git? There's at least one more .dts there that also 
> > would need boot-cpu removed - kuroboxHD.dts.
> 
> My patch already removes linux,boot-cpu from kuroboxHD.dts:
> 
> diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts 

"HD" and "HG" are not the same - it's a new file in git now...

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 20:23             ` Guennadi Liakhovetski
@ 2007-02-14 20:32               ` Timur Tabi
  2007-02-14 20:47                 ` Guennadi Liakhovetski
  0 siblings, 1 reply; 46+ messages in thread
From: Timur Tabi @ 2007-02-14 20:32 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: paulus, Stuart Yoder, linuxppc-dev

Guennadi Liakhovetski wrote:

> Is that dts also for u-boot? maybe they have another bootloader? I know 
> u-boot creates "chosen" itself, but not all possible bootloaders?

Well, that's what I'm trying to figure out.  I don't see any evidence to suggest 
that the 8276 is different from any other 8xxx board, with respect to U-Boot, 
and none of the other 8xxx DTS files have a 'chosen' section.  Then there's the 
fact that the 8276's 'chosen' section is in the *middle* of the DTS, and not at 
the end where everyone else puts it, leads me to believe that its presence is an 
oversight.

So far, no one who has chimed in on this particular subject has answered this 
question: what's so special about the 8276 that its DTS should have a 'chosen' 
section when none of the others do?

> (as a matter of fact, the more I think about those .dts's, the more it 
> seems to me like they belong to bootloaders, not in the kernel... Just 
> one word - information duplication...)

Well, that's a completely separate issue altogether.  I believe that they are 
kept with the kernel as a convenience, so that we all have more control over 
their contents.

> Another thing, Timur, if you respin your patch, could you do it against 
> the current powerpc.git? There's at least one more .dts there that also 
> would need boot-cpu removed - kuroboxHD.dts.

My patch already removes linux,boot-cpu from kuroboxHD.dts:

diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts 
b/arch/powerpc/boot/dts/kuroboxHG.dts
index d06b0b0..7531027 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -35,7 +35,6 @@ build with: "dtc -f -I dts -O dtb -o kur

  		PowerPC,603e { /* Really 8241 */
  			linux,phandle = <2100>;
-			linux,boot-cpu;
  			device_type = "cpu";
  			reg = <0>;
  			clock-frequency = <fdad680>;	/* Fixed by bootwrapper */

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14 14:03           ` Timur Tabi
@ 2007-02-14 20:23             ` Guennadi Liakhovetski
  2007-02-14 20:32               ` Timur Tabi
  2007-02-14 20:54             ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 46+ messages in thread
From: Guennadi Liakhovetski @ 2007-02-14 20:23 UTC (permalink / raw)
  To: Timur Tabi; +Cc: paulus, Stuart Yoder, linuxppc-dev

On Wed, 14 Feb 2007, Timur Tabi wrote:

> Benjamin Herrenschmidt wrote:
> 
> >> I just don't understand why it's okay to leave it there.
> > 
> > To make sure there is one. I suspect kernel bits might get upset if it's
> > absent.
> 
> That's not what I meant.  What I don't understand is: what's so special 
> about the 8272 that its DTS should have a 'chosen' section, but no other 
> DTS needs one?
> 
> Obviously, the kernel needs a 'chosen' section, and that's why U-Boot 
> adds one.  And since U-Boot adds one, the DTS itself doesn't need one. 
> Does the 8272 never use U-Boot?

Is that dts also for u-boot? maybe they have another bootloader? I know 
u-boot creates "chosen" itself, but not all possible bootloaders?

(as a matter of fact, the more I think about those .dts's, the more it 
seems to me like they belong to bootloaders, not in the kernel... Just 
one word - information duplication...)

Another thing, Timur, if you respin your patch, could you do it against 
the current powerpc.git? There's at least one more .dts there that also 
would need boot-cpu removed - kuroboxHD.dts.

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:19     ` David Gibson
  2007-02-14  5:24       ` Timur Tabi
@ 2007-02-14 14:40       ` Jon Loeliger
  1 sibling, 0 replies; 46+ messages in thread
From: Jon Loeliger @ 2007-02-14 14:40 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

So, like, the other day David Gibson mumbled:
> 
> The warning code in dtc is pretty bogus and
> complains about a number of things it shouldn't while failing to
> complain about some things it should.  I just haven't had time to make
> it much better.

David,

Would you have time here to simply state for the record
what you woul like to see fixed?  Someone might have
time to work through them.

Thanks,
jdl

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:35         ` Benjamin Herrenschmidt
@ 2007-02-14 14:03           ` Timur Tabi
  2007-02-14 20:23             ` Guennadi Liakhovetski
  2007-02-14 20:54             ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 46+ messages in thread
From: Timur Tabi @ 2007-02-14 14:03 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus, Stuart Yoder

Benjamin Herrenschmidt wrote:

>> I just don't understand why it's okay to leave it there.
> 
> To make sure there is one. I suspect kernel bits might get upset if it's
> absent.

That's not what I meant.  What I don't understand is: what's so special 
about the 8272 that its DTS should have a 'chosen' section, but no other 
DTS needs one?

Obviously, the kernel needs a 'chosen' section, and that's why U-Boot 
adds one.  And since U-Boot adds one, the DTS itself doesn't need one. 
Does the 8272 never use U-Boot?

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:31       ` Timur Tabi
@ 2007-02-14  5:35         ` Benjamin Herrenschmidt
  2007-02-14 14:03           ` Timur Tabi
  0 siblings, 1 reply; 46+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-14  5:35 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus, Stuart Yoder

On Tue, 2007-02-13 at 23:31 -0600, Timur Tabi wrote:
> Benjamin Herrenschmidt wrote:
> 
> >> Only one DTS file has it.  It's been removed from every other DTS.  Are 
> >> you should that instead of removing the last one, I should *add* one to 
> >> the other DTS files?
> > 
> > Or just leave them alone for now.
> 
> Well, it's inconsistent.  If you *really* don't want me to remove the 
> 'chosen' node from this one DTS, I'll respin the patch without it.  But 
> I just don't understand why it's okay to leave it there.

To make sure there is one. I suspect kernel bits might get upset if it's
absent.

Ben.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:27     ` Benjamin Herrenschmidt
@ 2007-02-14  5:31       ` Timur Tabi
  2007-02-14  5:35         ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 46+ messages in thread
From: Timur Tabi @ 2007-02-14  5:31 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus, Stuart Yoder

Benjamin Herrenschmidt wrote:

>> Only one DTS file has it.  It's been removed from every other DTS.  Are 
>> you should that instead of removing the last one, I should *add* one to 
>> the other DTS files?
> 
> Or just leave them alone for now.

Well, it's inconsistent.  If you *really* don't want me to remove the 
'chosen' node from this one DTS, I'll respin the patch without it.  But 
I just don't understand why it's okay to leave it there.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:15   ` Timur Tabi
  2007-02-14  5:19     ` David Gibson
@ 2007-02-14  5:27     ` Benjamin Herrenschmidt
  2007-02-14  5:31       ` Timur Tabi
  2007-02-15  1:45     ` Segher Boessenkool
  2 siblings, 1 reply; 46+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-14  5:27 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus, Stuart Yoder

On Tue, 2007-02-13 at 23:15 -0600, Timur Tabi wrote:
> Benjamin Herrenschmidt wrote:
> 
> > I think that:
> > 
> >  - The /chosen node should be present in the .dts even if empty
> 
> Only one DTS file has it.  It's been removed from every other DTS.  Are 
> you should that instead of removing the last one, I should *add* one to 
> the other DTS files?

Or just leave them alone for now.

> >  - I don't see why you are removing linux,boot-cpu from the
> > documentation ! It's a fairly important property. 
> 
> No, it's a dead property.  Specifying linux,boot-cpu in the DTS is 
> obsolete and deprecated.  If you specify it, the device tree compiler 
> complains.  The proper way to specify the device tree is with the -b 
> parameter to dtc.

Ah indeed, my bad. We moved that to a header field didn't we ?

/me grumbles about kexec... :-)

Ben.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:19     ` David Gibson
@ 2007-02-14  5:24       ` Timur Tabi
  2007-02-14 14:40       ` Jon Loeliger
  1 sibling, 0 replies; 46+ messages in thread
From: Timur Tabi @ 2007-02-14  5:24 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, linuxppc-dev, paulus, Stuart Yoder

David Gibson wrote:

> Um.. you may be right in this case, but "the device tree compiler
> complains" is (sadly) not in general a good reason to decide
> something's bad.  The warning code in dtc is pretty bogus and
> complains about a number of things it shouldn't while failing to
> complain about some things it should.  I just haven't had time to make
> it much better.

I agree that the DTC has problems, but my understanding is that 
linux,boot-cpu is just plain wrong nowadays.  Besides, U-Boot overrides 
whatever is in the device tree, so it doesn't really matter what you say 
in the DTS.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-14  5:15   ` Timur Tabi
@ 2007-02-14  5:19     ` David Gibson
  2007-02-14  5:24       ` Timur Tabi
  2007-02-14 14:40       ` Jon Loeliger
  2007-02-14  5:27     ` Benjamin Herrenschmidt
  2007-02-15  1:45     ` Segher Boessenkool
  2 siblings, 2 replies; 46+ messages in thread
From: David Gibson @ 2007-02-14  5:19 UTC (permalink / raw)
  To: Timur Tabi; +Cc: paulus, Stuart Yoder, linuxppc-dev

On Tue, Feb 13, 2007 at 11:15:17PM -0600, Timur Tabi wrote:
> Benjamin Herrenschmidt wrote:
> 
> > I think that:
> > 
> >  - The /chosen node should be present in the .dts even if empty
> 
> Only one DTS file has it.  It's been removed from every other DTS.  Are 
> you should that instead of removing the last one, I should *add* one to 
> the other DTS files?
> 
> >  - I don't see why you are removing linux,boot-cpu from the
> > documentation ! It's a fairly important property. 
> 
> No, it's a dead property.  Specifying linux,boot-cpu in the DTS is 
> obsolete and deprecated.  If you specify it, the device tree compiler 
> complains.  The proper way to specify the device tree is with the -b 
> parameter to dtc.

Um.. you may be right in this case, but "the device tree compiler
complains" is (sadly) not in general a good reason to decide
something's bad.  The warning code in dtc is pretty bogus and
complains about a number of things it shouldn't while failing to
complain about some things it should.  I just haven't had time to make
it much better.

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

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-13 23:57 ` Benjamin Herrenschmidt
@ 2007-02-14  5:15   ` Timur Tabi
  2007-02-14  5:19     ` David Gibson
                       ` (2 more replies)
  0 siblings, 3 replies; 46+ messages in thread
From: Timur Tabi @ 2007-02-14  5:15 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, paulus, Stuart Yoder

Benjamin Herrenschmidt wrote:

> I think that:
> 
>  - The /chosen node should be present in the .dts even if empty

Only one DTS file has it.  It's been removed from every other DTS.  Are 
you should that instead of removing the last one, I should *add* one to 
the other DTS files?

>  - I don't see why you are removing linux,boot-cpu from the
> documentation ! It's a fairly important property. 

No, it's a dead property.  Specifying linux,boot-cpu in the DTS is 
obsolete and deprecated.  If you specify it, the device tree compiler 
complains.  The proper way to specify the device tree is with the -b 
parameter to dtc.

^ permalink raw reply	[flat|nested] 46+ messages in thread

* Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
  2007-02-13 23:34 Timur Tabi
@ 2007-02-13 23:57 ` Benjamin Herrenschmidt
  2007-02-14  5:15   ` Timur Tabi
  0 siblings, 1 reply; 46+ messages in thread
From: Benjamin Herrenschmidt @ 2007-02-13 23:57 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev, paulus, Stuart Yoder

On Tue, 2007-02-13 at 17:34 -0600, Timur Tabi wrote:
> The 'linux,boot-cpu' property is obsolete, so remove it from all of the DTS 
> files and from booting-without-of.txt.  The boot CPU is actually defined in
> the device tree header, and U-Boot sets that field.  The device tree compiler
> also complains if the property exists.
> 
> Remove a stray 'chosen' section in mpc8272ads.dts.  The 'chosen' section is
> initialized by U-Boot, so the definition in the DTS is not used anyway.

I think that:

 - The /chosen node should be present in the .dts even if empty
 
 - I don't see why you are removing linux,boot-cpu from the
documentation ! It's a fairly important property. Bootloaders are
supposed to provide it on SMP environments and it's used for kexec.

Ben.


> Signed-off-by: Timur Tabi <timur@freescale.com>
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
> ---
> 
> Note: The '64-bit' property is already defined by the OF PPC
> binding and is added to show an example of a property
> without a value.  We're not actually adding a new property definition.
> 
>  Documentation/powerpc/booting-without-of.txt |    5 ++---
>  arch/powerpc/boot/dts/kuroboxHG.dts          |    1 -
>  arch/powerpc/boot/dts/mpc7448hpc2.dts        |    5 ++---
>  arch/powerpc/boot/dts/mpc8272ads.dts         |    8 --------
>  arch/powerpc/boot/dts/mpc8323emds.dts        |    7 +++----
>  arch/powerpc/boot/dts/mpc8360emds.dts        |    1 -
>  arch/powerpc/boot/dts/mpc8560ads.dts         |    1 -
>  arch/powerpc/boot/dts/mpc8641_hpcn.dts       |    3 +--
>  arch/powerpc/boot/dts/mpc866ads.dts          |    1 -
>  arch/powerpc/boot/dts/mpc885ads.dts          |    1 -
>  10 files changed, 8 insertions(+), 25 deletions(-)
> 
> diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
> index 3399427..310d267 100644
> --- a/Documentation/powerpc/booting-without-of.txt
> +++ b/Documentation/powerpc/booting-without-of.txt
> @@ -497,7 +497,7 @@ looks like in practice.
>        |   |- device_type = "cpu"
>        |   |- reg = <0>
>        |   |- clock-frequency = <5f5e1000>
> -      |   |- linux,boot-cpu
> +      |   |- 64-bit
>        |   |- linux,phandle = <2>
>        |
>        o memory@0
> @@ -519,7 +519,7 @@ physical memory layout.  It also include
>  through /chosen, like in this example, the platform type (mandatory)
>  and the kernel command line arguments (optional).
>  
> -The /cpus/PowerPC,970@0/linux,boot-cpu property is an example of a
> +The /cpus/PowerPC,970@0/64-bit property is an example of a
>  property without a value. All other properties have a value. The
>  significance of the #address-cells and #size-cells properties will be
>  explained in chapter IV which defines precisely the required nodes and
> @@ -778,7 +778,6 @@ address which can extend beyond that lim
>        bytes
>      - d-cache-size : one cell, size of L1 data cache in bytes
>      - i-cache-size : one cell, size of L1 instruction cache in bytes
> -    - linux, boot-cpu : Should be defined if this cpu is the boot cpu.
>  
>    Recommended properties:
>  
> diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts
> index d06b0b0..7531027 100644
> --- a/arch/powerpc/boot/dts/kuroboxHG.dts
> +++ b/arch/powerpc/boot/dts/kuroboxHG.dts
> @@ -35,7 +35,6 @@ build with: "dtc -f -I dts -O dtb -o kur
>  
>  		PowerPC,603e { /* Really 8241 */
>  			linux,phandle = <2100>;
> -			linux,boot-cpu;
>  			device_type = "cpu";
>  			reg = <0>;
>  			clock-frequency = <fdad680>;	/* Fixed by bootwrapper */
> diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
> index c4d9562..4164351 100644
> --- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
> +++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
> @@ -23,7 +23,7 @@
>  		#address-cells = <1>;
>  		#size-cells =<0>;
>  		linux,phandle = <200>;
> -				
> +
>  		PowerPC,7448@0 {
>  			device_type = "cpu";
>  			reg = <0>;
> @@ -36,7 +36,6 @@
>  			bus-frequency = <0>;		// From U-Boot
>  			32-bit;
>  			linux,phandle = <201>;
> -			linux,boot-cpu;
>  		};
>  	};
>  
> @@ -152,7 +151,7 @@
>  			#address-cells = <3>;
>  			reg = <1000 1000>;
>  			bus-range = <0 0>;
> -			ranges = <02000000 0 e0000000 e0000000 0 1A000000	
> +			ranges = <02000000 0 e0000000 e0000000 0 1A000000
>  				  01000000 0 00000000 fa000000 0 00010000>;
>  			clock-frequency = <7f28154>;
>  			interrupt-parent = <7400>;
> diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
> index 26b44f7..c9ffc12 100644
> --- a/arch/powerpc/boot/dts/mpc8272ads.dts
> +++ b/arch/powerpc/boot/dts/mpc8272ads.dts
> @@ -34,7 +34,6 @@
>                         clock-frequency = <0>;
>                         32-bit;
>                         linux,phandle = <201>;
> -                       linux,boot-cpu;
>                 };
>         };
>  
> @@ -53,13 +52,6 @@
>                 reg = <00000000 4000000 f4500000 00000020>;
>         };
>  
> -       chosen {
> -               name = "chosen";
> -               linux,platform = <0>;
> -               interrupt-controller = <10c00>;
> -               linux,phandle = <400>;
> -       };
> -
>         soc8272@f0000000 {
>                 #address-cells = <1>;
>                 #size-cells = <1>;
> diff --git a/arch/powerpc/boot/dts/mpc8323emds.dts b/arch/powerpc/boot/dts/mpc8323emds.dts
> index fa7ef24..eaf0f86 100644
> --- a/arch/powerpc/boot/dts/mpc8323emds.dts
> +++ b/arch/powerpc/boot/dts/mpc8323emds.dts
> @@ -34,7 +34,6 @@
>  			clock-frequency = <0>;
>  			32-bit;
>  			linux,phandle = <201>;
> -			linux,boot-cpu;
>  		};
>  	};
>  
> @@ -174,7 +173,7 @@
>  			built-in;
>  			device_type = "ipic";
>  		};
> -		
> +
>  		par_io@1400 {
>  			reg = <1400 100>;
>  			device_type = "par_io";
> @@ -237,11 +236,11 @@
>  		reg = <e0100000 480>;
>  		brg-frequency = <0>;
>  		bus-frequency = <BCD3D80>;
> -		
> +
>  		muram@10000 {
>  			device_type = "muram";
>  			ranges = <0 00010000 00004000>;
> -	
> +
>  			data-only@0 {
>  				reg = <0 4000>;
>  			};
> diff --git a/arch/powerpc/boot/dts/mpc8360emds.dts b/arch/powerpc/boot/dts/mpc8360emds.dts
> index 9022192..303bd66 100644
> --- a/arch/powerpc/boot/dts/mpc8360emds.dts
> +++ b/arch/powerpc/boot/dts/mpc8360emds.dts
> @@ -39,7 +39,6 @@
>  			clock-frequency = <1F78A400>;
>  			32-bit;
>  			linux,phandle = <201>;
> -			linux,boot-cpu;
>  		};
>  	};
>  
> diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
> index 119bd5d..c74d6eb 100644
> --- a/arch/powerpc/boot/dts/mpc8560ads.dts
> +++ b/arch/powerpc/boot/dts/mpc8560ads.dts
> @@ -35,7 +35,6 @@
>  			clock-frequency = <312c8040>;
>  			32-bit;
>  			linux,phandle = <201>;
> -			linux,boot-cpu;
>  		};
>  	};
>  
> diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> index f0c7731..258fccb 100644
> --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
> @@ -32,7 +32,6 @@
>  			bus-frequency = <0>;		// From uboot
>  			clock-frequency = <0>;		// From uboot
>  			32-bit;
> -			linux,boot-cpu;
>  		};
>  		PowerPC,8641@1 {
>  			device_type = "cpu";
> @@ -142,7 +141,7 @@
>  			interrupt-parent = <40000>;
>  			phy-handle = <2452001>;
>  		};
> -		
> +
>  		ethernet@26000 {
>  			#address-cells = <1>;
>  			#size-cells = <0>;
> diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
> index 5d40052..2b56b5d 100644
> --- a/arch/powerpc/boot/dts/mpc866ads.dts
> +++ b/arch/powerpc/boot/dts/mpc866ads.dts
> @@ -37,7 +37,6 @@
>  			interrupts = <f 2>;	// decrementer interrupt
>  			interrupt-parent = <ff000000>;
>  			linux,phandle = <201>;
> -			linux,boot-cpu;
>  		};
>  	};
>  
> diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
> index cf1a19f..faecd08 100644
> --- a/arch/powerpc/boot/dts/mpc885ads.dts
> +++ b/arch/powerpc/boot/dts/mpc885ads.dts
> @@ -37,7 +37,6 @@
>  			interrupts = <f 2>;	// decrementer interrupt
>  			interrupt-parent = <ff000000>;
>  			linux,phandle = <201>;
> -			linux,boot-cpu;
>  		};
>  	};
>  

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files
@ 2007-02-13 23:34 Timur Tabi
  2007-02-13 23:57 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 46+ messages in thread
From: Timur Tabi @ 2007-02-13 23:34 UTC (permalink / raw)
  To: paulus, linuxppc-dev, galak; +Cc: Timur Tabi, Stuart Yoder

The 'linux,boot-cpu' property is obsolete, so remove it from all of the DTS 
files and from booting-without-of.txt.  The boot CPU is actually defined in
the device tree header, and U-Boot sets that field.  The device tree compiler
also complains if the property exists.

Remove a stray 'chosen' section in mpc8272ads.dts.  The 'chosen' section is
initialized by U-Boot, so the definition in the DTS is not used anyway.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---

Note: The '64-bit' property is already defined by the OF PPC
binding and is added to show an example of a property
without a value.  We're not actually adding a new property definition.

 Documentation/powerpc/booting-without-of.txt |    5 ++---
 arch/powerpc/boot/dts/kuroboxHG.dts          |    1 -
 arch/powerpc/boot/dts/mpc7448hpc2.dts        |    5 ++---
 arch/powerpc/boot/dts/mpc8272ads.dts         |    8 --------
 arch/powerpc/boot/dts/mpc8323emds.dts        |    7 +++----
 arch/powerpc/boot/dts/mpc8360emds.dts        |    1 -
 arch/powerpc/boot/dts/mpc8560ads.dts         |    1 -
 arch/powerpc/boot/dts/mpc8641_hpcn.dts       |    3 +--
 arch/powerpc/boot/dts/mpc866ads.dts          |    1 -
 arch/powerpc/boot/dts/mpc885ads.dts          |    1 -
 10 files changed, 8 insertions(+), 25 deletions(-)

diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 3399427..310d267 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -497,7 +497,7 @@ looks like in practice.
       |   |- device_type = "cpu"
       |   |- reg = <0>
       |   |- clock-frequency = <5f5e1000>
-      |   |- linux,boot-cpu
+      |   |- 64-bit
       |   |- linux,phandle = <2>
       |
       o memory@0
@@ -519,7 +519,7 @@ physical memory layout.  It also include
 through /chosen, like in this example, the platform type (mandatory)
 and the kernel command line arguments (optional).
 
-The /cpus/PowerPC,970@0/linux,boot-cpu property is an example of a
+The /cpus/PowerPC,970@0/64-bit property is an example of a
 property without a value. All other properties have a value. The
 significance of the #address-cells and #size-cells properties will be
 explained in chapter IV which defines precisely the required nodes and
@@ -778,7 +778,6 @@ address which can extend beyond that lim
       bytes
     - d-cache-size : one cell, size of L1 data cache in bytes
     - i-cache-size : one cell, size of L1 instruction cache in bytes
-    - linux, boot-cpu : Should be defined if this cpu is the boot cpu.
 
   Recommended properties:
 
diff --git a/arch/powerpc/boot/dts/kuroboxHG.dts b/arch/powerpc/boot/dts/kuroboxHG.dts
index d06b0b0..7531027 100644
--- a/arch/powerpc/boot/dts/kuroboxHG.dts
+++ b/arch/powerpc/boot/dts/kuroboxHG.dts
@@ -35,7 +35,6 @@ build with: "dtc -f -I dts -O dtb -o kur
 
 		PowerPC,603e { /* Really 8241 */
 			linux,phandle = <2100>;
-			linux,boot-cpu;
 			device_type = "cpu";
 			reg = <0>;
 			clock-frequency = <fdad680>;	/* Fixed by bootwrapper */
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts
index c4d9562..4164351 100644
--- a/arch/powerpc/boot/dts/mpc7448hpc2.dts
+++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts
@@ -23,7 +23,7 @@
 		#address-cells = <1>;
 		#size-cells =<0>;
 		linux,phandle = <200>;
-				
+
 		PowerPC,7448@0 {
 			device_type = "cpu";
 			reg = <0>;
@@ -36,7 +36,6 @@
 			bus-frequency = <0>;		// From U-Boot
 			32-bit;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
@@ -152,7 +151,7 @@
 			#address-cells = <3>;
 			reg = <1000 1000>;
 			bus-range = <0 0>;
-			ranges = <02000000 0 e0000000 e0000000 0 1A000000	
+			ranges = <02000000 0 e0000000 e0000000 0 1A000000
 				  01000000 0 00000000 fa000000 0 00010000>;
 			clock-frequency = <7f28154>;
 			interrupt-parent = <7400>;
diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
index 26b44f7..c9ffc12 100644
--- a/arch/powerpc/boot/dts/mpc8272ads.dts
+++ b/arch/powerpc/boot/dts/mpc8272ads.dts
@@ -34,7 +34,6 @@
                        clock-frequency = <0>;
                        32-bit;
                        linux,phandle = <201>;
-                       linux,boot-cpu;
                };
        };
 
@@ -53,13 +52,6 @@
                reg = <00000000 4000000 f4500000 00000020>;
        };
 
-       chosen {
-               name = "chosen";
-               linux,platform = <0>;
-               interrupt-controller = <10c00>;
-               linux,phandle = <400>;
-       };
-
        soc8272@f0000000 {
                #address-cells = <1>;
                #size-cells = <1>;
diff --git a/arch/powerpc/boot/dts/mpc8323emds.dts b/arch/powerpc/boot/dts/mpc8323emds.dts
index fa7ef24..eaf0f86 100644
--- a/arch/powerpc/boot/dts/mpc8323emds.dts
+++ b/arch/powerpc/boot/dts/mpc8323emds.dts
@@ -34,7 +34,6 @@
 			clock-frequency = <0>;
 			32-bit;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
@@ -174,7 +173,7 @@
 			built-in;
 			device_type = "ipic";
 		};
-		
+
 		par_io@1400 {
 			reg = <1400 100>;
 			device_type = "par_io";
@@ -237,11 +236,11 @@
 		reg = <e0100000 480>;
 		brg-frequency = <0>;
 		bus-frequency = <BCD3D80>;
-		
+
 		muram@10000 {
 			device_type = "muram";
 			ranges = <0 00010000 00004000>;
-	
+
 			data-only@0 {
 				reg = <0 4000>;
 			};
diff --git a/arch/powerpc/boot/dts/mpc8360emds.dts b/arch/powerpc/boot/dts/mpc8360emds.dts
index 9022192..303bd66 100644
--- a/arch/powerpc/boot/dts/mpc8360emds.dts
+++ b/arch/powerpc/boot/dts/mpc8360emds.dts
@@ -39,7 +39,6 @@
 			clock-frequency = <1F78A400>;
 			32-bit;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/mpc8560ads.dts
index 119bd5d..c74d6eb 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/mpc8560ads.dts
@@ -35,7 +35,6 @@
 			clock-frequency = <312c8040>;
 			32-bit;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
index f0c7731..258fccb 100644
--- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts
+++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts
@@ -32,7 +32,6 @@
 			bus-frequency = <0>;		// From uboot
 			clock-frequency = <0>;		// From uboot
 			32-bit;
-			linux,boot-cpu;
 		};
 		PowerPC,8641@1 {
 			device_type = "cpu";
@@ -142,7 +141,7 @@
 			interrupt-parent = <40000>;
 			phy-handle = <2452001>;
 		};
-		
+
 		ethernet@26000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
index 5d40052..2b56b5d 100644
--- a/arch/powerpc/boot/dts/mpc866ads.dts
+++ b/arch/powerpc/boot/dts/mpc866ads.dts
@@ -37,7 +37,6 @@
 			interrupts = <f 2>;	// decrementer interrupt
 			interrupt-parent = <ff000000>;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
index cf1a19f..faecd08 100644
--- a/arch/powerpc/boot/dts/mpc885ads.dts
+++ b/arch/powerpc/boot/dts/mpc885ads.dts
@@ -37,7 +37,6 @@
 			interrupts = <f 2>;	// decrementer interrupt
 			interrupt-parent = <ff000000>;
 			linux,phandle = <201>;
-			linux,boot-cpu;
 		};
 	};
 
-- 
1.4.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2007-02-16 17:01 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 16:47 [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files Timur Tabi
2007-02-13 17:16 ` Kumar Gala
2007-02-13 17:20   ` Timur Tabi
2007-02-13 19:29   ` Timur Tabi
2007-02-15  1:42   ` Segher Boessenkool
2007-02-14  0:31 ` David Gibson
2007-02-14  5:18   ` Timur Tabi
2007-02-14  5:24     ` David Gibson
2007-02-14 14:05       ` Timur Tabi
2007-02-14 23:33         ` David Gibson
2007-02-14 23:47           ` Timur Tabi
2007-02-15  1:40           ` Segher Boessenkool
2007-02-15 21:26             ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles) Yoder Stuart-B08248
2007-02-15 21:39               ` Kumar Gala
2007-02-15 21:45                 ` Yoder Stuart-B08248
2007-02-16  7:38                   ` Segher Boessenkool
2007-02-16  7:34                 ` Segher Boessenkool
2007-02-15 23:01               ` David Gibson
2007-02-16  0:08                 ` Benjamin Herrenschmidt
2007-02-16 16:58                   ` purpose of /chosen node (was RE: [PATCH] powerpc: deleteboot-cpu " Yoder Stuart-B08248
2007-02-16 17:00                     ` Kumar Gala
2007-02-16  7:30               ` purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu " Segher Boessenkool
2007-02-16  9:54                 ` Benjamin Herrenschmidt
2007-02-15 16:18           ` [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTS files Timur Tabi
2007-02-13 23:34 Timur Tabi
2007-02-13 23:57 ` Benjamin Herrenschmidt
2007-02-14  5:15   ` Timur Tabi
2007-02-14  5:19     ` David Gibson
2007-02-14  5:24       ` Timur Tabi
2007-02-14 14:40       ` Jon Loeliger
2007-02-14  5:27     ` Benjamin Herrenschmidt
2007-02-14  5:31       ` Timur Tabi
2007-02-14  5:35         ` Benjamin Herrenschmidt
2007-02-14 14:03           ` Timur Tabi
2007-02-14 20:23             ` Guennadi Liakhovetski
2007-02-14 20:32               ` Timur Tabi
2007-02-14 20:47                 ` Guennadi Liakhovetski
2007-02-14 20:51                   ` Timur Tabi
2007-02-14 20:58                     ` Guennadi Liakhovetski
2007-02-14 20:54             ` Benjamin Herrenschmidt
2007-02-14 21:02               ` Timur Tabi
2007-02-14 21:17                 ` Benjamin Herrenschmidt
2007-02-14 21:58                   ` Timur Tabi
2007-02-14 22:53                     ` Benjamin Herrenschmidt
2007-02-14 23:37                   ` David Gibson
2007-02-15  1:45     ` Segher Boessenkool

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.