Skip to contentSkip to conversation

ARM: dts: DRA7: provide arch-timer frequenecy parameter

PATCH Superseded Nishanth Menon 3 participants 6 messages Sep 17, 2013 – Sep 18, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: DRA7: provide arch-timer frequenecy parameter

CNTFREQ isn't pre-programmed on DRA7 just like O5, so provide the same. Without a valid value arch_timer_init results in div0 crash. Providing the same is a safer alternative.

Cc R Sricharan <[email protected]>
Cc Rajendra Nayak <[email protected]>
Cc Sourav Poddar <[email protected]>
Cc Santosh Shilimkar <[email protected]>

---

Based on Benoit's for_3.13/dts branch.
http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts
Without this patch, div0 error occurs(seen on 3.12-rc1 tag): http://pastebin.com/B2sDauS9

 arch/arm/boot/dts/dra7.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/dra7.dtsi +1 -0
index c01ef76..b478beb 100644
@@ -50,6 +50,7 @@
 			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+		clock-frequency = <6144000>;
 	};
 
 	gic: interrupt-controller at 48211000 {
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 ARM: dts: DRA7: provide arch-timer frequenecy parameter

Quoted 2 lines · Nishanth Menon

CNTFREQ isn't pre-programmed on DRA7 just like O5, so provide the same. Without a valid value arch_timer_init results in div0 crash.

s/same/timer frequency via DT

Quoted 1 line

Providing the same is a safer alternative.

Above statement won't be necessary.

Quoted 8 lines
Cc R Sricharan <[email protected]>
Cc Rajendra Nayak <[email protected]>
Cc Sourav Poddar <[email protected]>
Cc Santosh Shilimkar <[email protected]>

---

Apart from minor change log fix,

#2 lore raw

PATCH v2 1/1 ARM: dts: DRA7: provide arch-timer frequenecy parameter

CNTFREQ isn't pre-programmed on DRA7 just like O5, so provide the timer frequency via DT. Without a valid value arch_timer_init results in div0 crash.

Cc R Sricharan <[email protected]>
Cc Rajendra Nayak <[email protected]>
Cc Sourav Poddar <[email protected]>

---

Based on Benoit's for_3.13/dts branch.
http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts

Crash log: http://pastebin.com/B2sDauS9

V2: commit message update
V1: https://patchwork.kernel.org/patch/2903261/

 arch/arm/boot/dts/dra7.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/dra7.dtsi +1 -0
index c98997b..71c2749 100644
@@ -50,6 +50,7 @@
 			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+		clock-frequency = <6144000>;
 	};
 
 	gic: interrupt-controller at 48211000 {
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 1/1 ARM: dts: DRA7: provide arch-timer frequenecy parameter

Hi,

Quoted 28 lines · Nishanth Menon

CNTFREQ isn't pre-programmed on DRA7 just like O5, so provide the timer frequency via DT. Without a valid value arch_timer_init results in div0 crash.

Cc R Sricharan <[email protected]>
Cc Rajendra Nayak <[email protected]>
Cc Sourav Poddar <[email protected]>

---

Based on Benoit's for_3.13/dts branch.
http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts

Crash log: http://pastebin.com/B2sDauS9

V2: commit message update
V1: https://patchwork.kernel.org/patch/2903261/

 arch/arm/boot/dts/dra7.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/dra7.dtsi +0 -0
index c98997b..71c2749 100644

arch/arm/boot/dts/dra7.dtsi line 56

Quoted 7 lines
arch/arm/boot/dts/dra7.dtsi +1 -0
@@ -50,6 +50,7 @@
 			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+		clock-frequency = <6144000>;
 	};
 
 	gic: interrupt-controller at 48211000 {

This is not the right way to pass the frequency. In fact, initially the frequency value was present when the dts was added, but had to revert it back based on the feedbacks. Please refer below.

http://www.mail-archive.com/linux-omap at vger.kernel.org/msg93832.html

Also posted the below patch to fix this,

    http://marc.info/?l=linux-omap&m=137950345528918&w=2

Regards,
Sricharan

#4 lore raw

PATCH v2 1/1 ARM: dts: DRA7: provide arch-timer frequenecy parameter

Quoted 42 lines · Sricharan R

Hi,

Quoted 28 lines · Nishanth Menon

CNTFREQ isn't pre-programmed on DRA7 just like O5, so provide the timer frequency via DT. Without a valid value arch_timer_init results in div0 crash.

Cc R Sricharan <[email protected]>
Cc Rajendra Nayak <[email protected]>
Cc Sourav Poddar <[email protected]>

---

Based on Benoit's for_3.13/dts branch.
http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts

Crash log: http://pastebin.com/B2sDauS9

V2: commit message update
V1: https://patchwork.kernel.org/patch/2903261/

 arch/arm/boot/dts/dra7.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/dra7.dtsi +0 -0
index c98997b..71c2749 100644

arch/arm/boot/dts/dra7.dtsi line 56

Quoted 7 lines
arch/arm/boot/dts/dra7.dtsi +1 -0
@@ -50,6 +50,7 @@
 			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+		clock-frequency = <6144000>;
 	};
 
 	gic: interrupt-controller at 48211000 {

This is not the right way to pass the frequency. In fact, initially the frequency value was present when the dts was added, but had to revert it back based on the feedbacks. Please refer below.

Quoted 6 lines

http://www.mail-archive.com/linux-omap at vger.kernel.org/msg93832.html

Also posted the below patch to fix this,

    http://marc.info/?l=linux-omap&m=137950345528918&w=2

Thanks for a better alternative. at least my boot tests indicate that the patch works fine.

Signature · 2 lines
Regards,
Nishanth Menon
#5 lore raw

PATCH v2 1/1 ARM: dts: DRA7: provide arch-timer frequenecy parameter

In reply to Sricharan R
Quoted 37 lines · Sricharan R

Hi,

Quoted 34 lines · Nishanth Menon

CNTFREQ isn't pre-programmed on DRA7 just like O5, so provide the timer frequency via DT. Without a valid value arch_timer_init results in div0 crash.

Cc R Sricharan <[email protected]>
Cc Rajendra Nayak <[email protected]>
Cc Sourav Poddar <[email protected]>

---

Based on Benoit's for_3.13/dts branch.
http://git.kernel.org/cgit/linux/kernel/git/bcousson/linux-omap-dt.git/log/?h=for_3.13/dts

Crash log: http://pastebin.com/B2sDauS9

V2: commit message update
V1: https://patchwork.kernel.org/patch/2903261/

 arch/arm/boot/dts/dra7.dtsi |    1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/dra7.dtsi +1 -0
index c98997b..71c2749 100644
@@ -50,6 +50,7 @@
 			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
+		clock-frequency = <6144000>;
 	};
 
Quoted 4 lines

arch/arm/boot/dts/dra7.dtsi line 56

Quoted 1 line
arch/arm/boot/dts/dra7.dtsi +0 -0
 	gic: interrupt-controller at 48211000 {

This is not the right way to pass the frequency. In fact, initially the frequency value was present when the dts was added, but had to revert it back based on the feedbacks. Please refer below.

There is nothing wrong in this method as well except the guest DT needs to be updated and that is bothersome.
Ofcourse if there is an option setting up the CNTFREQ directly is the option.

Regards,
Santosh