powerpc: delete boot-cpu and chosen nodes from all DTS files
Subsystems (2)
PATCH 1/1 powerpc: delete boot-cpu and chosen nodes from all DTS files
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.
--- 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(-)
arch/powerpc/boot/dts/kuroboxHG.dts +0 -1
@@ -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 */
arch/powerpc/boot/dts/mpc7448hpc2.dts +2 -3
@@ -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>;
arch/powerpc/boot/dts/mpc8272ads.dts +0 -8
@@ -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>;
arch/powerpc/boot/dts/mpc8323emds.dts +3 -4
@@ -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>; };
arch/powerpc/boot/dts/mpc8360emds.dts +0 -1
@@ -39,7 +39,6 @@ clock-frequency = <1F78A400>; 32-bit; linux,phandle = <201>; - linux,boot-cpu; }; };
arch/powerpc/boot/dts/mpc8560ads.dts +0 -1
@@ -35,7 +35,6 @@ clock-frequency = <312c8040>; 32-bit; linux,phandle = <201>; - linux,boot-cpu; }; };
arch/powerpc/boot/dts/mpc8641_hpcn.dts +1 -2
@@ -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>;
arch/powerpc/boot/dts/mpc866ads.dts +0 -1
@@ -37,7 +37,6 @@ interrupts = <f 2>; // decrementer interrupt interrupt-parent = <ff000000>; linux,phandle = <201>; - linux,boot-cpu; }; };
arch/powerpc/boot/dts/mpc885ads.dts +0 -1
@@ -37,7 +37,6 @@ interrupts = <f 2>; // decrementer interrupt interrupt-parent = <ff000000>; linux,phandle = <201>; - linux,boot-cpu; }; };
Signature · 1 line
1.4.4
Quoted 6 lines · 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 <[email protected]>---
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
Quoted 11 lines · Kumar Gala
Quoted 6 lines · 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 <[email protected]>---
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.
Quoted 1 line
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.
Signature · 2 lines
Timur Tabi Linux Kernel Developer @ Freescale
Quoted 11 lines · Kumar Gala
Quoted 6 lines · 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 <[email protected]>---
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.
Signature · 2 lines
Timur Tabi Linux Kernel Developer @ Freescale
Quoted 4 lines
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
Quoted 3 lines · 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.
[snip]
arch/powerpc/boot/dts/mpc8272ads.dts line 62
Quoted 11 lines
arch/powerpc/boot/dts/mpc8272ads.dts +0
-7@@ -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.
Signature · 4 lines
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
Quoted 10 lines · David Gibson
arch/powerpc/boot/dts/mpc8272ads.dts line 62
Quoted 7 lines
arch/powerpc/boot/dts/mpc8272ads.dts +0
-7- 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.
Quoted 10 lines · Timur Tabi
Quoted 8 lines · David Gibson
Quoted 7 lines
arch/powerpc/boot/dts/mpc8272ads.dts +0
-7- chosen { - name = "chosen"; - linux,platform = <0>; - interrupt-controller = <10c00>; - linux,phandle = <400>; - }; -
Quoted 5 lines
Quoted 2 lines
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.
Signature · 4 lines
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
Quoted 8 lines · David Gibson
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?
Quoted 7 lines · Timur Tabi
Quoted 5 lines · David Gibson
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.
Quoted 7 lines
Quoted 3 lines
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.
Signature · 4 lines
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
Quoted 7 lines · David Gibson
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.
Signature · 2 lines
Timur Tabi Linux Kernel Developer @ Freescale
Quoted 3 lines
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
purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
=20
Quoted 10 lines
-----Original Message-----
From: [email protected]=20 [mailto:[email protected]]=20 On Behalf Of Segher Boessenkool
Sent: Wednesday, February 14, 2007 7:40 PM
To: David Gibson
Cc: [email protected]; Tabi Timur-B04825
Subject: Re: [PATCH] powerpc: delete boot-cpu and chosen=20 nodes from all DTSfiles
=20
Quoted 8 lines
Quoted 1 line
My point is that the interrupt-controller property in=20
/chosen *should*
Quoted 2 lines
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
Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
Quoted 21 lines · On Feb 15, 2007, at 3:26 PM, Yoder Stuart-B08248 wrote:
Quoted 12 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Segher Boessenkool
Sent: Wednesday, February 14, 2007 7:40 PM
To: David Gibson
Cc: [email protected]; Tabi Timur-B04825
Subject: Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfilesQuoted 8 lines
Quoted 1 line
My point is that the interrupt-controller property in
/chosen *should*
Quoted 2 lines
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.
Quoted 7 lines
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
RE: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
=20
Quoted 34 lines
-----Original Message-----
From: Kumar Gala [mailto:[email protected]]=20
Sent: Thursday, February 15, 2007 3:39 PM
To: Yoder Stuart-B08248
Cc: Segher Boessenkool; Benjamin Herrenschmidt;=20 [email protected]
Subject: Re: purpose of /chosen node (was RE: [PATCH]=20
powerpc: delete boot-cpu and chosen nodes from all DTSfiles) =20
=20Quoted 10 lines · On Feb 15, 2007, at 3:26 PM, Yoder Stuart-B08248 wrote:
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Segher Boessenkool
Sent: Wednesday, February 14, 2007 7:40 PM
To: David Gibson
Cc: [email protected]; Tabi Timur-B04825
Subject: Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfilesQuoted 3 lines
Quoted 3 lines
Quoted 1 line
My point is that the interrupt-controller property in
/chosen *should*
Quoted 1 line
be there, but it doesn't make a lot of sense for it to be=20
set by the
Quoted 9 lines
Quoted 5 lines
Quoted 1 line
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.
Quoted 8 lines
Quoted 4 lines
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
Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
Quoted 3 lines
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.
Quoted 2 lines
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.
Quoted 2 lines
/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
Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
In reply to Kumar GalaQuoted 1 line
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
Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
In reply to Yoder Stuart-B08248Quoted 17 lines · On Thu, Feb 15, 2007 at 02:26:41PM -0700, Yoder Stuart-B08248 wrote:
Quoted 17 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Segher Boessenkool
Sent: Wednesday, February 14, 2007 7:40 PM
To: David Gibson
Cc: [email protected]; Tabi Timur-B04825
Subject: Re: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfilesQuoted 1 line
My point is that the interrupt-controller property in
/chosen *should*
Quoted 2 lines
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).
Quoted 6 lines
Quoted 3 lines
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?
Signature · 4 lines
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
Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
Quoted 4 lines
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.
RE: purpose of /chosen node (was RE: [PATCH] powerpc: deleteboot-cpu and chosen nodes from all DTSfiles)
=20
Quoted 9 lines
-----Original Message-----
From: Benjamin Herrenschmidt [mailto:[email protected]]=20
Sent: Thursday, February 15, 2007 6:09 PM
To: David Gibson
Cc: Yoder Stuart-B08248; Segher Boessenkool; [email protected]
Subject: Re: purpose of /chosen node (was RE: [PATCH]=20
powerpc: deleteboot-cpu and chosen nodes from all DTSfiles) =20
=20
Quoted 7 lines
Quoted 3 lines
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
Re: purpose of /chosen node (was RE: [PATCH] powerpc: deleteboot-cpu and chosen nodes from all DTSfiles)
Quoted 15 lines · On Feb 16, 2007, at 10:58 AM, Yoder Stuart-B08248 wrote:
Quoted 15 lines
-----Original Message-----
From: Benjamin Herrenschmidt [mailto:[email protected]]
Sent: Thursday, February 15, 2007 6:09 PM
To: David Gibson
Cc: Yoder Stuart-B08248; Segher Boessenkool; [email protected]
Subject: Re: purpose of /chosen node (was RE: [PATCH]
powerpc: deleteboot-cpu and chosen nodes from all DTSfiles)Quoted 3 lines
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?
Quoted 5 lines
Quoted 3 lines
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
Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
In reply to Yoder Stuart-B08248Quoted 2 lines
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.
Quoted 1 line
how about just under root?
CHRP does this (in an extra-plus nasty way).
Quoted 1 line
(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
Re: purpose of /chosen node (was RE: [PATCH] powerpc: delete boot-cpu and chosen nodes from all DTSfiles)
Quoted 6 lines · Segher Boessenkool
Quoted 2 lines
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.
Quoted 6 lines
Quoted 1 line
how about just under root?
CHRP does this (in an extra-plus nasty way).
Quoted 1 line
(Or, we could make up a new node)
Quoted 8 lines
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.
Quoted 5 lines · David Gibson
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.
Signature · 2 lines
Timur Tabi Linux Kernel Developer @ Freescale