ARM: mxs: Do not search for "fsl,clkctrl"
Fabio Estevam
reviewerPATCH 1/2 ARM: mxs: Do not search for "fsl,clkctrl"
From: Fabio Estevam <[email protected]>
The "fsl,clkctrl" compatible string is not documented.
It is used only to find the base address of the clock controller.
Instead of searching for an undocumented compatible string, search for "fsl,imx23-clkctrl" and "fsl,imx28-clkctrl".
--- arch/arm/mach-mxs/mach-mxs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/mach-mxs/mach-mxs.c +3 -1
@@ -356,7 +356,9 @@ static int __init mxs_restart_init(void) {struct device_node *np; - np =of_find_compatible_node (NULL ,NULL ,"fsl,clkctrl" ); + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx23-clkctrl" ); +if (!np) + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx28-clkctrl" ); reset_addr =of_iomap (np,0 );if (!reset_addr)return -ENODEV ;
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerPATCH 2/2 ARM: dts: imx23/28: Remove undocumented "fsl,clkctrl"
From: Fabio Estevam <[email protected]>
Per imx23-clock.yaml and imx28-clock.yaml, fsl,clkctrl is not a valid compatible string.
Remove it to fix the following dt-schema warning:
imx28-evk.dtb: clkctrl@80040000: compatible: ['fsl,imx28-clkctrl', 'fsl,clkctrl'] is too long
from schema $id: http://devicetree.org/schemas/clock/imx28-clock.yaml#
--- arch/arm/boot/dts/nxp/mxs/imx23.dtsi | 2 +- arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/nxp/mxs/imx23.dtsi +1 -1
@@ -484,7 +484,7 @@ apbx@80040000 { ranges; clks: clkctrl@80040000 { - compatible = "fsl,imx23-clkctrl", "fsl,clkctrl"; + compatible = "fsl,imx23-clkctrl"; reg = <0x80040000 0x2000>; #clock-cells = <1>; };
arch/arm/boot/dts/nxp/mxs/imx28.dtsi +1 -1
@@ -1100,7 +1100,7 @@ apbx@80040000 { ranges; clks: clkctrl@80040000 { - compatible = "fsl,imx28-clkctrl", "fsl,clkctrl"; + compatible = "fsl,imx28-clkctrl"; reg = <0x80040000 0x2000>; #clock-cells = <1>; };
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/2] ARM: dts: imx23/28: Remove undocumented "fsl,clkctrl"
Hi Fabio,
Am 05.12.23 um 15:47 schrieb Fabio Estevam:
Quoted 21 lines
From: Fabio Estevam <[email protected]>
Per
imx23-clock.yamlandimx28-clock.yaml, fsl,clkctrl is not a valid compatible string.Remove it to fix the following dt-schema warning:
imx28-evk.dtb: clkctrl@80040000: compatible: ['fsl,imx28-clkctrl', 'fsl,clkctrl'] is too long
from schema $id: http://devicetree.org/schemas/clock/imx28-clock.yaml#Signed-off-by Fabio Estevam <[email protected]>--- arch/arm/boot/dts/nxp/mxs/imx23.dtsi | 2 +- arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)arch/arm/boot/dts/nxp/mxs/imx23.dtsi +0
-0
arch/arm/boot/dts/nxp/mxs/imx23.dtsi apbx@80040000 { · line 487
Quoted 5 lines
arch/arm/boot/dts/nxp/mxs/imx23.dtsi +1
-1@@ -484,7 +484,7 @@ apbx@80040000 { ranges; clks: clkctrl@80040000 { - compatible = "fsl,imx23-clkctrl", "fsl,clkctrl"; + compatible = "fsl,imx23-clkctrl";
this look fine:
Btw the node name clkctrl is also incorrect here. According to the yaml it should be clock-controller.
Regards
Quoted 8 lines
arch/arm/boot/dts/nxp/mxs/imx23.dtsi +0
-0reg = <0x80040000 0x2000>; #clock-cells = <1>; };arch/arm/boot/dts/nxp/mxs/imx28.dtsi +0
-0
arch/arm/boot/dts/nxp/mxs/imx28.dtsi apbx@80040000 { · line 1106
Quoted 8 lines
arch/arm/boot/dts/nxp/mxs/imx28.dtsi +1
-1@@ -1100,7 +1100,7 @@ apbx@80040000 { ranges; clks: clkctrl@80040000 { - compatible = "fsl,imx28-clkctrl", "fsl,clkctrl"; + compatible = "fsl,imx28-clkctrl"; reg = <0x80040000 0x2000>; #clock-cells = <1>; };
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Fabio,
Am 05.12.23 um 15:47 schrieb Fabio Estevam:
Quoted 19 lines
From: Fabio Estevam <[email protected]>
The "fsl,clkctrl" compatible string is not documented.
It is used only to find the base address of the clock controller.
Instead of searching for an undocumented compatible string, search for "fsl,imx23-clkctrl" and "fsl,imx28-clkctrl".
Signed-off-by Fabio Estevam <[email protected]>--- arch/arm/mach-mxs/mach-mxs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)arch/arm/mach-mxs/mach-mxs.c +0
-0
arch/arm/mach-mxs/mach-mxs.c static int __init mxs_restart_init(void) · line 361
Quoted 7 lines
arch/arm/mach-mxs/mach-mxs.c +3
-1@@ -356,7 +356,9 @@ static int __init mxs_restart_init(void) {struct device_node *np; - np =of_find_compatible_node (NULL ,NULL ,"fsl,clkctrl" ); + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx23-clkctrl" ); +if (!np) + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx28-clkctrl" );
i'm fine with getting the rid off "fsl,clkctrl", but some lines below we search for "fsl,imx23-clkctrl" again to adjust reset_addr.
Can we avoid this unnecessary search?
arch/arm/mach-mxs/mach-mxs.c static int __init mxs_restart_init(void) · line 364
Quoted 3 lines
arch/arm/mach-mxs/mach-mxs.c +0
-0reset_addr =of_iomap (np,0 );if (!reset_addr)return -ENODEV ;
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Shawn Guo
AppliedQuoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
The "fsl,clkctrl" compatible string is not documented.
It is used only to find the base address of the clock controller.
Instead of searching for an undocumented compatible string, search for "fsl,imx23-clkctrl" and "fsl,imx28-clkctrl".
Signed-off-by Fabio Estevam <[email protected]>
Applied both, thanks!
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel