diff mbox series

[4.19,107/191] ARM: dts: s5pv210: move PMU node out of clock controller

Message ID 20201103203243.594174920@linuxfoundation.org
State Superseded
Headers show
Series None | expand

Commit Message

Greg Kroah-Hartman Nov. 3, 2020, 8:36 p.m. UTC
From: Krzysztof Kozlowski <krzk@kernel.org>

[ Upstream commit bb98fff84ad1ea321823759edaba573a16fa02bd ]

The Power Management Unit (PMU) is a separate device which has little
common with clock controller.  Moving it to one level up (from clock
controller child to SoC) allows to remove fake simple-bus compatible and
dtbs_check warnings like:

  clock-controller@e0100000: $nodename:0:
    'clock-controller@e0100000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Jonathan Bakker <xc-racer2@live.ca>
Link: https://lore.kernel.org/r/20200907161141.31034-8-krzk@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 arch/arm/boot/dts/s5pv210.dtsi | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

Comments

Pavel Machek Nov. 5, 2020, 11:46 a.m. UTC | #1
Hi!

> The Power Management Unit (PMU) is a separate device which has little
> common with clock controller.  Moving it to one level up (from clock
> controller child to SoC) allows to remove fake simple-bus compatible and
> dtbs_check warnings like:
> 
>   clock-controller@e0100000: $nodename:0:
>     'clock-controller@e0100000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'

> +++ b/arch/arm/boot/dts/s5pv210.dtsi
> @@ -98,19 +98,16 @@
>  		};
>  
>  		clocks: clock-controller@e0100000 {
> -			compatible = "samsung,s5pv210-clock", "simple-bus";
> +			compatible = "samsung,s5pv210-clock";
>  			reg = <0xe0100000 0x10000>;
...
> +		pmu_syscon: syscon@e0108000 {
> +			compatible = "samsung-s5pv210-pmu", "syscon";
> +			reg = <0xe0108000 0x8000>;
>  		};

Should clock-controller@e0100000's reg be shortened to 0x8000 so that
the ranges do not overlap?

Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

Best regards,
								Pavel

diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 020a864623ff..54fc3fb56ca1 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -99,7 +99,7 @@
 
 		clocks: clock-controller@e0100000 {
 			compatible = "samsung,s5pv210-clock";
-			reg = <0xe0100000 0x10000>;
+			reg = <0xe0100000 0x8000>;
 			clock-names = "xxti", "xusbxti";
 			clocks = <&xxti>, <&xusbxti>;
 			#clock-cells = <1>;
Krzysztof Kozlowski Nov. 5, 2020, 12:38 p.m. UTC | #2
On Thu, 5 Nov 2020 at 12:46, Pavel Machek <pavel@ucw.cz> wrote:
>

> Hi!

>

> > The Power Management Unit (PMU) is a separate device which has little

> > common with clock controller.  Moving it to one level up (from clock

> > controller child to SoC) allows to remove fake simple-bus compatible and

> > dtbs_check warnings like:

> >

> >   clock-controller@e0100000: $nodename:0:

> >     'clock-controller@e0100000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'

>

> > +++ b/arch/arm/boot/dts/s5pv210.dtsi

> > @@ -98,19 +98,16 @@

> >               };

> >

> >               clocks: clock-controller@e0100000 {

> > -                     compatible = "samsung,s5pv210-clock", "simple-bus";

> > +                     compatible = "samsung,s5pv210-clock";

> >                       reg = <0xe0100000 0x10000>;

> ...

> > +             pmu_syscon: syscon@e0108000 {

> > +                     compatible = "samsung-s5pv210-pmu", "syscon";

> > +                     reg = <0xe0108000 0x8000>;

> >               };

>

> Should clock-controller@e0100000's reg be shortened to 0x8000 so that

> the ranges do not overlap?

>

> Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>


I don't think this commit should be backported to stable. It is simple
dtbs_check - checking whether Devicetree source matches device tree
schema. Neither the schema nor the warning existed in v4.19. I think
dtbs_check fixes should not be backported, unless a real issue is
pointed out.

Best regards,
Krzysztof
Pavel Machek Nov. 5, 2020, 7:55 p.m. UTC | #3
Hi!

> > > The Power Management Unit (PMU) is a separate device which has little

> > > common with clock controller.  Moving it to one level up (from clock

> > > controller child to SoC) allows to remove fake simple-bus compatible and

> > > dtbs_check warnings like:

> > >

> > >   clock-controller@e0100000: $nodename:0:

> > >     'clock-controller@e0100000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'

> >

> > > +++ b/arch/arm/boot/dts/s5pv210.dtsi

> > > @@ -98,19 +98,16 @@

> > >               };

> > >

> > >               clocks: clock-controller@e0100000 {

> > > -                     compatible = "samsung,s5pv210-clock", "simple-bus";

> > > +                     compatible = "samsung,s5pv210-clock";

> > >                       reg = <0xe0100000 0x10000>;

> > ...

> > > +             pmu_syscon: syscon@e0108000 {

> > > +                     compatible = "samsung-s5pv210-pmu", "syscon";

> > > +                     reg = <0xe0108000 0x8000>;

> > >               };

> >

> > Should clock-controller@e0100000's reg be shortened to 0x8000 so that

> > the ranges do not overlap?

> >

> > Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

> 

> I don't think this commit should be backported to stable. It is simple

> dtbs_check - checking whether Devicetree source matches device tree

> schema. Neither the schema nor the warning existed in v4.19. I think

> dtbs_check fixes should not be backported, unless a real issue is

> pointed out.


I agree with you about the backporting. Hopefully Greg drops the
commit.

But the other issue is: should mainline be fixed so that ranges do not overlap?

Best regards,
									Pavel
-- 
http://www.livejournal.com/~pavelmachek
Krzysztof Kozlowski Nov. 6, 2020, 8:12 p.m. UTC | #4
On Thu, Nov 05, 2020 at 08:55:08PM +0100, Pavel Machek wrote:
> Hi!

> 

> > > > The Power Management Unit (PMU) is a separate device which has little

> > > > common with clock controller.  Moving it to one level up (from clock

> > > > controller child to SoC) allows to remove fake simple-bus compatible and

> > > > dtbs_check warnings like:

> > > >

> > > >   clock-controller@e0100000: $nodename:0:

> > > >     'clock-controller@e0100000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$'

> > >

> > > > +++ b/arch/arm/boot/dts/s5pv210.dtsi

> > > > @@ -98,19 +98,16 @@

> > > >               };

> > > >

> > > >               clocks: clock-controller@e0100000 {

> > > > -                     compatible = "samsung,s5pv210-clock", "simple-bus";

> > > > +                     compatible = "samsung,s5pv210-clock";

> > > >                       reg = <0xe0100000 0x10000>;

> > > ...

> > > > +             pmu_syscon: syscon@e0108000 {

> > > > +                     compatible = "samsung-s5pv210-pmu", "syscon";

> > > > +                     reg = <0xe0108000 0x8000>;

> > > >               };

> > >

> > > Should clock-controller@e0100000's reg be shortened to 0x8000 so that

> > > the ranges do not overlap?

> > >

> > > Signed-off-by: Pavel Machek (CIP) <pavel@denx.de>

> > 

> > I don't think this commit should be backported to stable. It is simple

> > dtbs_check - checking whether Devicetree source matches device tree

> > schema. Neither the schema nor the warning existed in v4.19. I think

> > dtbs_check fixes should not be backported, unless a real issue is

> > pointed out.

> 

> I agree with you about the backporting. Hopefully Greg drops the

> commit.

> 

> But the other issue is: should mainline be fixed so that ranges do not overlap?


Yes, it should be. This should fail on mapping resources...

I'll take a look, thanks for the report.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/s5pv210.dtsi b/arch/arm/boot/dts/s5pv210.dtsi
index 67f70683a2c45..37d251b1f74a7 100644
--- a/arch/arm/boot/dts/s5pv210.dtsi
+++ b/arch/arm/boot/dts/s5pv210.dtsi
@@ -98,19 +98,16 @@ 
 		};
 
 		clocks: clock-controller@e0100000 {
-			compatible = "samsung,s5pv210-clock", "simple-bus";
+			compatible = "samsung,s5pv210-clock";
 			reg = <0xe0100000 0x10000>;
 			clock-names = "xxti", "xusbxti";
 			clocks = <&xxti>, <&xusbxti>;
 			#clock-cells = <1>;
-			#address-cells = <1>;
-			#size-cells = <1>;
-			ranges;
+		};
 
-			pmu_syscon: syscon@e0108000 {
-				compatible = "samsung-s5pv210-pmu", "syscon";
-				reg = <0xe0108000 0x8000>;
-			};
+		pmu_syscon: syscon@e0108000 {
+			compatible = "samsung-s5pv210-pmu", "syscon";
+			reg = <0xe0108000 0x8000>;
 		};
 
 		pinctrl0: pinctrl@e0200000 {