Skip to contentSkip to conversation

clocksource: sunxi: Add new compatibles

PATCH New Maxime Ripard 4 participants 9 messages Feb 2, 2014 – Feb 4, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 clocksource: sunxi: Add new compatibles

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility.

---
 Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
 drivers/clocksource/sun4i_timer.c                                 | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt +3 -2
index 48aeb78..d9e35ae 100644
@@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
 
 Required properties:
 
-- compatible : should be "allwinner,sun4i-timer"
+- compatible : should be "allwinner,sun4i-a10-timer"
+               (Deprecated "allwinner,sun4i-timer")
 - reg : Specifies base physical address and size of the registers.
 - interrupts : The interrupt of the first timer
 - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
@@ -10,7 +11,7 @@ Required properties:
 Example:
 
 timer {
-	compatible = "allwinner,sun4i-timer";
+	compatible = "allwinner,sun4i-a10-timer";
 	reg = <0x01c20c00 0x400>;
 	interrupts = <22>;
 	clocks = <&osc>;
drivers/clocksource/sun4i_timer.c +4 -0
index bf497af..de03895 100644
@@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
 	clockevents_config_and_register(&sun4i_clockevent, rate,
 					TIMER_SYNC_TICKS, 0xffffffff);
 }
+CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
+		       sun4i_timer_init);
+
+/* Deprecated */
 CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
 		       sun4i_timer_init);
Signature · 1 line
1.8.4.2
#1 lore raw

PATCH 2/2 ARM: sunxi: dt: Convert to the new clocksource compatible

Switch the device tree to the new compatibles introduced in the timer driver to have a common pattern accross all Allwinner SoCs.

---
 arch/arm/boot/dts/sun4i-a10.dtsi  | 2 +-
 arch/arm/boot/dts/sun5i-a10s.dtsi | 2 +-
 arch/arm/boot/dts/sun5i-a13.dtsi  | 2 +-
 arch/arm/boot/dts/sun6i-a31.dtsi  | 2 +-
 arch/arm/boot/dts/sun7i-a20.dtsi  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/boot/dts/sun4i-a10.dtsi +1 -1
index 040bb0e..dd64cc0 100644
@@ -403,7 +403,7 @@
 		};
 
 		timer at 01c20c00 {
-			compatible = "allwinner,sun4i-timer";
+			compatible = "allwinner,sun4i-a10-timer";
 			reg = <0x01c20c00 0x90>;
 			interrupts = <22>;
 			clocks = <&osc24M>;
arch/arm/boot/dts/sun5i-a10s.dtsi +1 -1
index ea16054..9cee110 100644
@@ -366,7 +366,7 @@
 		};
 
 		timer at 01c20c00 {
-			compatible = "allwinner,sun4i-timer";
+			compatible = "allwinner,sun4i-a10-timer";
 			reg = <0x01c20c00 0x90>;
 			interrupts = <22>;
 			clocks = <&osc24M>;
arch/arm/boot/dts/sun5i-a13.dtsi +1 -1
index 320335a..f5cba63 100644
@@ -329,7 +329,7 @@
 		};
 
 		timer at 01c20c00 {
-			compatible = "allwinner,sun4i-timer";
+			compatible = "allwinner,sun4i-a10-timer";
 			reg = <0x01c20c00 0x90>;
 			interrupts = <22>;
 			clocks = <&osc24M>;
arch/arm/boot/dts/sun6i-a31.dtsi +1 -1
index 5256ad9..996fff5 100644
@@ -231,7 +231,7 @@
 		};
 
 		timer at 01c20c00 {
-			compatible = "allwinner,sun4i-timer";
+			compatible = "allwinner,sun4i-a10-timer";
 			reg = <0x01c20c00 0xa0>;
 			interrupts = <0 18 4>,
 				     <0 19 4>,
arch/arm/boot/dts/sun7i-a20.dtsi +1 -1
index 119f066..4bc5c6f 100644
@@ -435,7 +435,7 @@
 		};
 
 		timer at 01c20c00 {
-			compatible = "allwinner,sun4i-timer";
+			compatible = "allwinner,sun4i-a10-timer";
 			reg = <0x01c20c00 0x90>;
 			interrupts = <0 22 4>,
 				     <0 23 4>,
Signature · 1 line
1.8.4.2
#2 lore raw

PATCH 1/2 clocksource: sunxi: Add new compatibles

In reply to Maxime Ripard
Quoted 4 lines · Maxime Ripard

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility.

Hi Maxime,

is it really needed to keep the old pattern ?

Quoted 44 lines
---
  Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
  drivers/clocksource/sun4i_timer.c                                 | 4 ++++
  2 files changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt +3 -2
index 48aeb78..d9e35ae 100644
@@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
 
  Required properties:
 
-- compatible : should be "allwinner,sun4i-timer"
+- compatible : should be "allwinner,sun4i-a10-timer"
+               (Deprecated "allwinner,sun4i-timer")
  - reg : Specifies base physical address and size of the registers.
  - interrupts : The interrupt of the first timer
  - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
@@ -10,7 +11,7 @@ Required properties:
  Example:
 
  timer {
-	compatible = "allwinner,sun4i-timer";
+	compatible = "allwinner,sun4i-a10-timer";
  	reg = <0x01c20c00 0x400>;
  	interrupts = <22>;
  	clocks = <&osc>;
drivers/clocksource/sun4i_timer.c +4 -0
index bf497af..de03895 100644
@@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
  	clockevents_config_and_register(&sun4i_clockevent, rate,
  					TIMER_SYNC_TICKS, 0xffffffff);
  }
+CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
+		       sun4i_timer_init);
+
+/* Deprecated */
  CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
  		       sun4i_timer_init);
Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#3 lore raw

PATCH 1/2 clocksource: sunxi: Add new compatibles

Hi Daniel,

(Adding DT mailing-list in CC)

Quoted 9 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility.

Hi Maxime,

is it really needed to keep the old pattern ?

We agreed during the ARM Kernel Summit to consider the DT as a stable ABI.

While I'd be ok with removing the older ones, that also means that we would break the boot of newer kernels with older DT, so yes, we actually need to keep the old compatibles.

Quoted 53 lines
Quoted 44 lines
---
 Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
 drivers/clocksource/sun4i_timer.c                                 | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt +3 -2
index 48aeb78..d9e35ae 100644
@@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
 
 Required properties:
 
-- compatible : should be "allwinner,sun4i-timer"
+- compatible : should be "allwinner,sun4i-a10-timer"
+               (Deprecated "allwinner,sun4i-timer")
 - reg : Specifies base physical address and size of the registers.
 - interrupts : The interrupt of the first timer
 - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
@@ -10,7 +11,7 @@ Required properties:
 Example:
 
 timer {
-	compatible = "allwinner,sun4i-timer";
+	compatible = "allwinner,sun4i-a10-timer";
 	reg = <0x01c20c00 0x400>;
 	interrupts = <22>;
 	clocks = <&osc>;
drivers/clocksource/sun4i_timer.c +4 -0
index bf497af..de03895 100644
@@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
 	clockevents_config_and_register(&sun4i_clockevent, rate,
 					TIMER_SYNC_TICKS, 0xffffffff);
 }
+CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
+		       sun4i_timer_init);
+
+/* Deprecated */
 CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
 		       sun4i_timer_init);
Signature · 5 lines
 <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140203/63754870/attachment.sig>
#4 lore raw

PATCH 1/2 clocksource: sunxi: Add new compatibles

Quoted 13 lines · Maxime Ripard

Hi Daniel,

(Adding DT mailing-list in CC)

Quoted 8 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility.

Hi Maxime,

Quoted 8 lines
Quoted 1 line

is it really needed to keep the old pattern ?

We agreed during the ARM Kernel Summit to consider the DT as a stable ABI.

While I'd be ok with removing the older ones, that also means that we would break the boot of newer kernels with older DT, so yes, we actually need to keep the old compatibles.

It all depends if that would really cause problems for a given platform. So if Allwinner DT support is a moving target, then changing is probably okay. For example, if anyone using the platform is going to need to update their DTB to add more nodes to get various features anyway, then breaking it is not all that important.

Rob

#5 lore raw

PATCH 1/2 clocksource: sunxi: Add new compatibles

Hi Rob,

Quoted 24 lines · Rob Herring
Quoted 13 lines · Maxime Ripard

Hi Daniel,

(Adding DT mailing-list in CC)

Quoted 8 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility.

Hi Maxime,

Quoted 8 lines
Quoted 1 line

is it really needed to keep the old pattern ?

We agreed during the ARM Kernel Summit to consider the DT as a stable ABI.

While I'd be ok with removing the older ones, that also means that we would break the boot of newer kernels with older DT, so yes, we actually need to keep the old compatibles.

Quoted 5 lines

It all depends if that would really cause problems for a given platform. So if Allwinner DT support is a moving target, then changing is probably okay. For example, if anyone using the platform is going to need to update their DTB to add more nodes to get various features anyway, then breaking it is not all that important.

We keep adding new stuff to the DT, yes, so I guess we can be considered a moving target. Thanks for your input!

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140204/b4f57920/attachment.sig>
#6 lore raw

PATCH 1/2 clocksource: sunxi: Add new compatibles

In reply to Maxime Ripard
Quoted 13 lines · Maxime Ripard

Hi Daniel,

(Adding DT mailing-list in CC)

Quoted 8 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility.

Hi Maxime,

Quoted 8 lines
Quoted 1 line

is it really needed to keep the old pattern ?

We agreed during the ARM Kernel Summit to consider the DT as a stable ABI.

While I'd be ok with removing the older ones, that also means that we would break the boot of newer kernels with older DT, so yes, we actually need to keep the old compatibles.

Thanks for the clarification.

So these old compatibles will stay there 'ad vitam aeternam', right ?

Quoted 54 lines
Quoted 53 lines
Quoted 35 lines
---
  Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
  drivers/clocksource/sun4i_timer.c                                 | 4 ++++
  2 files changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt +3 -2
index 48aeb78..d9e35ae 100644
@@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
 
  Required properties:
 
-- compatible : should be "allwinner,sun4i-timer"
+- compatible : should be "allwinner,sun4i-a10-timer"
+               (Deprecated "allwinner,sun4i-timer")
  - reg : Specifies base physical address and size of the registers.
  - interrupts : The interrupt of the first timer
  - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
@@ -10,7 +11,7 @@ Required properties:
  Example:
 
  timer {
-	compatible = "allwinner,sun4i-timer";
+	compatible = "allwinner,sun4i-a10-timer";
  	reg = <0x01c20c00 0x400>;
  	interrupts = <22>;
  	clocks = <&osc>;
drivers/clocksource/sun4i_timer.c +0 -0
index bf497af..de03895 100644

drivers/clocksource/sun4i_timer.c static void __init sun4i_timer_init(struct device_node *node) · line 204

Quoted 9 lines
drivers/clocksource/sun4i_timer.c +4 -0
@@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
  	clockevents_config_and_register(&sun4i_clockevent, rate,
  					TIMER_SYNC_TICKS, 0xffffffff);
  }
+CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
+		       sun4i_timer_init);
+
+/* Deprecated */
  CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
  		       sun4i_timer_init);

--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Signature · 5 lines
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#7 lore raw

PATCH 1/2 clocksource: sunxi: Add new compatibles

Hi Daniel,

Quoted 23 lines · Daniel Lezcano
Quoted 13 lines · Maxime Ripard

Hi Daniel,

(Adding DT mailing-list in CC)

Quoted 8 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility.

Hi Maxime,

Quoted 8 lines
Quoted 1 line

is it really needed to keep the old pattern ?

We agreed during the ARM Kernel Summit to consider the DT as a stable ABI.

While I'd be ok with removing the older ones, that also means that we would break the boot of newer kernels with older DT, so yes, we actually need to keep the old compatibles.

Quoted 5 lines

Thanks for the clarification.

So these old compatibles will stay there 'ad vitam aeternam', right ?

From what I have understood during the ARM Kernel Summit, it was

acceptable to remove them after a few release.

Gregory

Quoted 58 lines
Quoted 56 lines
Quoted 55 lines
Quoted 37 lines
---
  Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt | 5 +++--
  drivers/clocksource/sun4i_timer.c                                 | 4 ++++
  2 files changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/timer/allwinner,sun4i-timer.txt +3 -2
index 48aeb78..d9e35ae 100644
@@ -2,7 +2,8 @@ Allwinner A1X SoCs Timer Controller
 
  Required properties:
 
-- compatible : should be "allwinner,sun4i-timer"
+- compatible : should be "allwinner,sun4i-a10-timer"
+               (Deprecated "allwinner,sun4i-timer")
  - reg : Specifies base physical address and size of the registers.
  - interrupts : The interrupt of the first timer
  - clocks: phandle to the source clock (usually a 24 MHz fixed clock)
@@ -10,7 +11,7 @@ Required properties:
  Example:
 
  timer {
-	compatible = "allwinner,sun4i-timer";
+	compatible = "allwinner,sun4i-a10-timer";
  	reg = <0x01c20c00 0x400>;
  	interrupts = <22>;
  	clocks = <&osc>;
drivers/clocksource/sun4i_timer.c +0 -0
index bf497af..de03895 100644

drivers/clocksource/sun4i_timer.c static void __init sun4i_timer_init(struct device_node *node) · line 204

Quoted 9 lines
drivers/clocksource/sun4i_timer.c +4 -0
@@ -196,5 +196,9 @@ static void __init sun4i_timer_init(struct device_node *node)
  	clockevents_config_and_register(&sun4i_clockevent, rate,
  					TIMER_SYNC_TICKS, 0xffffffff);
  }
+CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer",
+		       sun4i_timer_init);
+
+/* Deprecated */
  CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-timer",
  		       sun4i_timer_init);

--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#8 lore raw

PATCH 1/2 clocksource: sunxi: Add new compatibles

In reply to Daniel Lezcano

Hi,

Quoted 19 lines · Daniel Lezcano
Quoted 18 lines · Maxime Ripard

Hi Daniel,

(Adding DT mailing-list in CC)

Quoted 9 lines · Daniel Lezcano
Quoted 4 lines · Maxime Ripard

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Add compatibles matching the other pattern to the timer driver for consistency, and keep the older one for backward compatibility.

Hi Maxime,

is it really needed to keep the old pattern ?

We agreed during the ARM Kernel Summit to consider the DT as a stable ABI.

Quoted 7 lines
Quoted 3 lines

While I'd be ok with removing the older ones, that also means that we would break the boot of newer kernels with older DT, so yes, we actually need to keep the old compatibles.

Thanks for the clarification.

So these old compatibles will stay there 'ad vitam aeternam', right ?

Except for what Rob told, yep, that was my feeling, but Gregory and I seem to have a different interpretation of this rule :)

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140204/418b5e4f/attachment-0001.sig>