Skip to contentSkip to conversation

ARM: dts: at91sam9261ek: remove unused chosen nodes

PATCH In review Alexandre Belloni 2 participants 4 messages Apr 8, 2019 – May 22, 2019

Subsystems (2)
lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

PATCH 1/1 ARM: dts: at91sam9261ek: remove unused chosen nodes

The chosen clocksource and clockevent bindings have never been accepted and parsed, remove them.

---
 arch/arm/boot/dts/at91sam9261ek.dts | 8 --------
 1 file changed, 8 deletions(-)
arch/arm/boot/dts/at91sam9261ek.dts +0 -8
index a57f2d435dca..11ed55d8a87d 100644
@@ -15,14 +15,6 @@
 	chosen {
 		bootargs = "rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw";
 		stdout-path = "serial0:115200n8";
-
-		clocksource {
-			timer = <&timer0>;
-		};
-
-		clockevent {
-			timer = <&timer1>;
-		};
 	};
 
 	memory {
Signature · 1 line
2.20.1
#1 lore raw

Hi Rob,

the following patch has been pushed in 2016 by commit 51f0aeb2d21f1.

Being able to specify which timer should act as a clocksource or a clockevent is often requested. Doing this from the driver itself forces to do some assumption in the timer definition ordering in the DT.

That impacts badly the resulting code and its self-encapsulation.

- There is one node and the driver hardcodes the value and initializes
a clocksource and a clockevent

- There are several nodes, one for the clocksource and one for the
clockevent, and the driver assumes the order of the node in the DT

- There are several nodes and multiple channels and those are used for
PWM. It is impossible to know which one are used for PWM or for the clocksource or for the clockevent

For example with STM32, we should be able to specify which timer to use. There are 16 timers IIRC, they can be used for PWM, clocksource or clockevent. Half is 16 bits, other half is 32 bits, depending on the destination of the platform we can be interested to use one or another without recompiling a kernel but just the DT.

We need a way to specify which timer to be used from the DT. The patch below sounded like a good way to characterize the nodes as they belong to the 'chosen' node and we stay to a 'linux' thing.

What do you think ?

Quoted 28 lines · Alexandre Belloni

The chosen clocksource and clockevent bindings have never been accepted and parsed, remove them.

---
 arch/arm/boot/dts/at91sam9261ek.dts | 8 --------
 1 file changed, 8 deletions(-)
arch/arm/boot/dts/at91sam9261ek.dts +0 -8
index a57f2d435dca..11ed55d8a87d 100644
@@ -15,14 +15,6 @@
 	chosen {
 		bootargs = "rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw";
 		stdout-path = "serial0:115200n8";
-
-		clocksource {
-			timer = <&timer0>;
-		};
-
-		clockevent {
-			timer = <&timer1>;
-		};
 	};
 
 	memory {
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
#2 lore raw

ping ?

Quoted 65 lines · Daniel Lezcano

Hi Rob,

the following patch has been pushed in 2016 by commit 51f0aeb2d21f1.

Being able to specify which timer should act as a clocksource or a clockevent is often requested. Doing this from the driver itself forces to do some assumption in the timer definition ordering in the DT.

That impacts badly the resulting code and its self-encapsulation.

- There is one node and the driver hardcodes the value and initializes
a clocksource and a clockevent

- There are several nodes, one for the clocksource and one for the
clockevent, and the driver assumes the order of the node in the DT

- There are several nodes and multiple channels and those are used for
PWM. It is impossible to know which one are used for PWM or for the clocksource or for the clockevent

For example with STM32, we should be able to specify which timer to use. There are 16 timers IIRC, they can be used for PWM, clocksource or clockevent. Half is 16 bits, other half is 32 bits, depending on the destination of the platform we can be interested to use one or another without recompiling a kernel but just the DT.

We need a way to specify which timer to be used from the DT. The patch below sounded like a good way to characterize the nodes as they belong to the 'chosen' node and we stay to a 'linux' thing.

What do you think ?

Quoted 28 lines · Alexandre Belloni

The chosen clocksource and clockevent bindings have never been accepted and parsed, remove them.

---
 arch/arm/boot/dts/at91sam9261ek.dts | 8 --------
 1 file changed, 8 deletions(-)
arch/arm/boot/dts/at91sam9261ek.dts +0 -8
index a57f2d435dca..11ed55d8a87d 100644
@@ -15,14 +15,6 @@
 	chosen {
 		bootargs = "rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw";
 		stdout-path = "serial0:115200n8";
-
-		clocksource {
-			timer = <&timer0>;
-		};
-
-		clockevent {
-			timer = <&timer1>;
-		};
 	};
 
 	memory {
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
In reply to Daniel Lezcano

Hi Rob,

a gentle ping ... ;)

Quoted 65 lines · Daniel Lezcano

Hi Rob,

the following patch has been pushed in 2016 by commit 51f0aeb2d21f1.

Being able to specify which timer should act as a clocksource or a clockevent is often requested. Doing this from the driver itself forces to do some assumption in the timer definition ordering in the DT.

That impacts badly the resulting code and its self-encapsulation.

- There is one node and the driver hardcodes the value and initializes
a clocksource and a clockevent

- There are several nodes, one for the clocksource and one for the
clockevent, and the driver assumes the order of the node in the DT

- There are several nodes and multiple channels and those are used for
PWM. It is impossible to know which one are used for PWM or for the clocksource or for the clockevent

For example with STM32, we should be able to specify which timer to use. There are 16 timers IIRC, they can be used for PWM, clocksource or clockevent. Half is 16 bits, other half is 32 bits, depending on the destination of the platform we can be interested to use one or another without recompiling a kernel but just the DT.

We need a way to specify which timer to be used from the DT. The patch below sounded like a good way to characterize the nodes as they belong to the 'chosen' node and we stay to a 'linux' thing.

What do you think ?

Quoted 28 lines · Alexandre Belloni

The chosen clocksource and clockevent bindings have never been accepted and parsed, remove them.

---
 arch/arm/boot/dts/at91sam9261ek.dts | 8 --------
 1 file changed, 8 deletions(-)
arch/arm/boot/dts/at91sam9261ek.dts +0 -8
index a57f2d435dca..11ed55d8a87d 100644
@@ -15,14 +15,6 @@
 	chosen {
 		bootargs = "rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw";
 		stdout-path = "serial0:115200n8";
-
-		clocksource {
-			timer = <&timer0>;
-		};
-
-		clockevent {
-			timer = <&timer1>;
-		};
 	};
 
 	memory {
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