diff mbox

[v3,1/2] arm: dts: am4372: let boards access all nodes through phandles

Message ID 1403547659-24558-2-git-send-email-balbi@ti.com
State Accepted
Commit 08ecb28a7047d4431b61b73ebf9b216de6b29444
Headers show

Commit Message

Felipe Balbi June 23, 2014, 6:20 p.m. UTC
by providing phandles to rtc, wdt, cpu and dispc nodes,
boards can access them to add board-specific data.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---

Changes since v1:
	- added phandles to cpu and dispc

 arch/arm/boot/dts/am4372.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Franklin S Cooper Jr June 24, 2014, 6:39 p.m. UTC | #1
Tested-by: Franklin Cooper Jr. <fcooper@ti.com>

> -----Original Message-----
> From: Balbi, Felipe
> Sent: Monday, June 23, 2014 1:21 PM
> To: Benoit Cousson
> Cc: robh+dt@kernel.org; galak@codeaurora.org; Tony Lindgren;
> linux@arm.linux.org.uk; Nayak, Rajendra; Menon, Nishanth; R, Sricharan;
> devicetree@vger.kernel.org; Linux Kernel Mailing List; Linux OMAP Mailing
> List; Linux ARM Kernel Mailing List; Balbi, Felipe
> Subject: [PATCH v3 1/2] arm: dts: am4372: let boards access all nodes through
> phandles
> 
> by providing phandles to rtc, wdt, cpu and dispc nodes, boards can access
> them to add board-specific data.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> 
> Changes since v1:
> 	- added phandles to cpu and dispc
> 
>  arch/arm/boot/dts/am4372.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> index 49fa596..8d3c163 100644
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -30,7 +30,7 @@
>  	cpus {
>  		#address-cells = <1>;
>  		#size-cells = <0>;
> -		cpu@0 {
> +		cpu: cpu@0 {
>  			compatible = "arm,cortex-a9";
>  			device_type = "cpu";
>  			reg = <0>;
> @@ -270,7 +270,7 @@
>  			ti,hwmods = "counter_32k";
>  		};
> 
> -		rtc@44e3e000 {
> +		rtc: rtc@44e3e000 {
>  			compatible = "ti,am4372-rtc","ti,da830-rtc";
>  			reg = <0x44e3e000 0x1000>;
>  			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH @@ -
> 279,7 +279,7 @@
>  			status = "disabled";
>  		};
> 
> -		wdt@44e35000 {
> +		wdt: wdt@44e35000 {
>  			compatible = "ti,am4372-wdt","ti,omap3-wdt";
>  			reg = <0x44e35000 0x1000>;
>  			interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>; @@
> -871,7 +871,7 @@
>  			#size-cells = <1>;
>  			ranges;
> 
> -			dispc@4832a400 {
> +			dispc: dispc@4832a400 {
>  				compatible = "ti,omap3-dispc";
>  				reg = <0x4832a400 0x400>;
>  				interrupts = <GIC_SPI 127
> IRQ_TYPE_LEVEL_HIGH>;
> --
> 2.0.0.390.gcb682f8

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Tom Rini June 24, 2014, 8:51 p.m. UTC | #2
On 06/23/2014 02:20 PM, Felipe Balbi wrote:
> by providing phandles to rtc, wdt, cpu and dispc nodes,
> boards can access them to add board-specific data.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>

Tested-by: Tom Rini <trini@ti.com>
Rob Herring June 24, 2014, 9:11 p.m. UTC | #3
On Mon, Jun 23, 2014 at 1:20 PM, Felipe Balbi <balbi@ti.com> wrote:
> by providing phandles to rtc, wdt, cpu and dispc nodes,
> boards can access them to add board-specific data.

Strictly speaking, you are adding labels, not phandles. You can do
phandles without using labels, but the syntax is not so obvious. I'd
tell you what it is but offhand I don't remember. :)

Rob

> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>
> Changes since v1:
>         - added phandles to cpu and dispc
>
>  arch/arm/boot/dts/am4372.dtsi | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
> index 49fa596..8d3c163 100644
> --- a/arch/arm/boot/dts/am4372.dtsi
> +++ b/arch/arm/boot/dts/am4372.dtsi
> @@ -30,7 +30,7 @@
>         cpus {
>                 #address-cells = <1>;
>                 #size-cells = <0>;
> -               cpu@0 {
> +               cpu: cpu@0 {
>                         compatible = "arm,cortex-a9";
>                         device_type = "cpu";
>                         reg = <0>;
> @@ -270,7 +270,7 @@
>                         ti,hwmods = "counter_32k";
>                 };
>
> -               rtc@44e3e000 {
> +               rtc: rtc@44e3e000 {
>                         compatible = "ti,am4372-rtc","ti,da830-rtc";
>                         reg = <0x44e3e000 0x1000>;
>                         interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
> @@ -279,7 +279,7 @@
>                         status = "disabled";
>                 };
>
> -               wdt@44e35000 {
> +               wdt: wdt@44e35000 {
>                         compatible = "ti,am4372-wdt","ti,omap3-wdt";
>                         reg = <0x44e35000 0x1000>;
>                         interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
> @@ -871,7 +871,7 @@
>                         #size-cells = <1>;
>                         ranges;
>
> -                       dispc@4832a400 {
> +                       dispc: dispc@4832a400 {
>                                 compatible = "ti,omap3-dispc";
>                                 reg = <0x4832a400 0x400>;
>                                 interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
> --
> 2.0.0.390.gcb682f8
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Felipe Balbi June 25, 2014, 1:40 a.m. UTC | #4
Hi,

On Tue, Jun 24, 2014 at 04:11:48PM -0500, Rob Herring wrote:
> On Mon, Jun 23, 2014 at 1:20 PM, Felipe Balbi <balbi@ti.com> wrote:
> > by providing phandles to rtc, wdt, cpu and dispc nodes,
> > boards can access them to add board-specific data.
> 
> Strictly speaking, you are adding labels, not phandles. You can do

heh, fair point. Easily editable when applying, though (?)

> phandles without using labels, but the syntax is not so obvious. I'd
> tell you what it is but offhand I don't remember. :)

something along the lines of using the full path ?
Mark Rutland June 25, 2014, 11:14 a.m. UTC | #5
On Wed, Jun 25, 2014 at 02:40:16AM +0100, Felipe Balbi wrote:
> Hi,
> 
> On Tue, Jun 24, 2014 at 04:11:48PM -0500, Rob Herring wrote:
> > On Mon, Jun 23, 2014 at 1:20 PM, Felipe Balbi <balbi@ti.com> wrote:
> > > by providing phandles to rtc, wdt, cpu and dispc nodes,
> > > boards can access them to add board-specific data.
> > 
> > Strictly speaking, you are adding labels, not phandles. You can do
> 
> heh, fair point. Easily editable when applying, though (?)
> 
> > phandles without using labels, but the syntax is not so obvious. I'd
> > tell you what it is but offhand I don't remember. :)
> 
> something along the lines of using the full path ?

Yup. The full path in braces:

	phandle-property = <&{/full/path/to/node@0xDEAD}>;

Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 49fa596..8d3c163 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -30,7 +30,7 @@ 
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
-		cpu@0 {
+		cpu: cpu@0 {
 			compatible = "arm,cortex-a9";
 			device_type = "cpu";
 			reg = <0>;
@@ -270,7 +270,7 @@ 
 			ti,hwmods = "counter_32k";
 		};
 
-		rtc@44e3e000 {
+		rtc: rtc@44e3e000 {
 			compatible = "ti,am4372-rtc","ti,da830-rtc";
 			reg = <0x44e3e000 0x1000>;
 			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH
@@ -279,7 +279,7 @@ 
 			status = "disabled";
 		};
 
-		wdt@44e35000 {
+		wdt: wdt@44e35000 {
 			compatible = "ti,am4372-wdt","ti,omap3-wdt";
 			reg = <0x44e35000 0x1000>;
 			interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
@@ -871,7 +871,7 @@ 
 			#size-cells = <1>;
 			ranges;
 
-			dispc@4832a400 {
+			dispc: dispc@4832a400 {
 				compatible = "ti,omap3-dispc";
 				reg = <0x4832a400 0x400>;
 				interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;