ARM: dts: Update arch timer node with clock frequency
Subsystems (2)
PATCH 1/1 ARM: dts: Update arch timer node with clock frequency
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[<c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
[<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
[<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
[<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58) [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c) [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)
--- arch/arm/boot/dts/exynos5250.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/exynos5250.dtsi +1 -0
@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>; }; mct@101C0000 {
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 1/1 ARM: dts: Update arch timer node with clock frequency
[adding lakml]
Quoted 2 lines · Yuvaraj Kumar C D
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
Why does this cause the below crash specifically? What is CNTFRQ reading as?
Your firmware or bootloader should set CNTFRQ -- setting the clock-frequency is a work-around for buggy firmware/bootloaders that should be avoided as far as possible.
Is it not possible to fix your firmware or bootlaoder to set CNTFRQ?
Thanks,
Mark.
Quoted 33 lines
[<
c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
[<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
[<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
[<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58) [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c) [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)Signed-off-by Yuvaraj Kumar C D <[email protected]>--- arch/arm/boot/dts/exynos5250.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>; }; mct at 101C0000 {Signature · 1 line
1.7.9.5
PATCH 1/1 ARM: dts: Update arch timer node with clock frequency
Resending it as it bounced from kernel mailing group
Quoted 8 lines · Mark Rutland
[adding lakml]
Quoted 2 lines · Yuvaraj Kumar C D
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
Why does this cause the below crash specifically? What is CNTFRQ reading as?
Return value of arch_timer_get_cntfrq() is 0
Quoted 4 lines
Your firmware or bootloader should set CNTFRQ -- setting the clock-frequency is a work-around for buggy
firmware/bootloadersthat should be avoided as far as possible.
Why kernel should depend on bootloader/firmware to set CNTFRQ? Any specific reasons?
Should'nt be indepenedent each other(kernel and bootloader/firmware)?
Quoted 39 lines
Is it not possible to fix your firmware or bootlaoder to set CNTFRQ?
Thanks,
Mark.Quoted 33 lines
[<
c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
[<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
[<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
[<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58) [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c) [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)Signed-off-by Yuvaraj Kumar C D <[email protected]>--- arch/arm/boot/dts/exynos5250.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm/boot/dts/exynos5250.dtsi +1
-1@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>; }; mct at 101C0000 { --1.7.9.5
PATCH 1/1 ARM: dts: Update arch timer node with clock frequency
Quoted 11 lines · Yuvaraj Kumar
Resending it as it bounced from kernel mailing group
Quoted 8 lines · Mark Rutland
[adding lakml]
Quoted 2 lines · Yuvaraj Kumar C D
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
Why does this cause the below crash specifically? What is CNTFRQ reading as?
Quoted 7 lines
Return value of
arch_timer_get_cntfrq()is 0Quoted 4 lines
Your firmware or bootloader should set CNTFRQ -- setting the clock-frequency is a work-around for buggy
firmware/bootloadersthat should be avoided as far as possible.Why kernel should depend on bootloader/firmware to set CNTFRQ? Any specific reasons?
Because the kernel can't set it if running non-secure. Only secure mode can do this (see the ARM ARM for details).
Quoted 1 line
Should'nt be indepenedent each other(kernel and bootloader/firmware)?
In my book, the firmware is responsible for setting up the platform in a sane state. Leaving CNTFRQ in its UNKNOWN reset state is a bug, and your firmware should program it on each CPU. Same goes for CNTVOFF, which should be set to a common value (preferably zero).
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
PATCH 1/1 ARM: dts: Update arch timer node with clock frequency
Quoted 14 lines · Marc Zyngier
Quoted 13 lines · Yuvaraj Kumar
Resending it as it bounced from kernel mailing group
Quoted 8 lines · Mark Rutland
[adding lakml]
Quoted 2 lines · Yuvaraj Kumar C D
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
Why does this cause the below crash specifically? What is CNTFRQ reading as?
Return value of
arch_timer_get_cntfrq()is 0Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Your firmware or bootloader should set CNTFRQ -- setting the clock-frequency is a work-around for buggy
firmware/bootloadersthat should be avoided as far as possible.Why kernel should depend on bootloader/firmware to set CNTFRQ? Any specific reasons?
Because the kernel can't set it if running non-secure. Only secure mode can do this (see the ARM ARM for details).
What software outside the kernel actually reads the CNTFRQ and why?
Thanks,
Christopher
Signature · 3 lines
Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation.
PATCH 1/1 ARM: dts: Update arch timer node with clock frequency
Quoted 18 lines · Christopher Covington
Quoted 17 lines · Marc Zyngier
Quoted 16 lines · Yuvaraj Kumar
Resending it as it bounced from kernel mailing group
Quoted 8 lines · Mark Rutland
[adding lakml]
Quoted 2 lines · Yuvaraj Kumar C D
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
Why does this cause the below crash specifically? What is CNTFRQ reading as?
Return value of
arch_timer_get_cntfrq()is 0Quoted 4 lines
Your firmware or bootloader should set CNTFRQ -- setting the clock-frequency is a work-around for buggy
firmware/bootloadersthat should be avoided as far as possible.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Why kernel should depend on bootloader/firmware to set CNTFRQ? Any specific reasons?
Because the kernel can't set it if running non-secure. Only secure mode can do this (see the ARM ARM for details).
What software outside the kernel actually reads the CNTFRQ and why?
Your favourite virtual machine does, for the same reason the host kernel does. And as you can't guess the frequency from userspace, you cannot specify it in the guest's DT, getting whatever random number sits in CNTFRQ.
As you would expect, things don't go smoothly when that happens.
M.
Signature · 1 line
Jazz is not dead. It just smells funny...
A message that is not in the archive (sent off-list or not yet received): 1379499113-20342-1-git-send-email-yuvaraj.cd-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org
Hi Yuvaraj,
Quoted 2 lines · On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[snip]
arch/arm/boot/dts/exynos5250.dtsi line 99
Quoted 9 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos5250.dtsiindex 7d7cc77..668ce5d 100644arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>;
Shouldn't it rather come from some clock provided by some clock controller instead?
The frequency would be then retrieved using clk_get_rate() on a clock received by clk_get(), specified in device tree using generic clock bindings.
Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 19 lines · Tomasz Figa
Hi Yuvaraj,
Quoted 2 lines · On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[snip]
arch/arm/boot/dts/exynos5250.dtsi line 99
Quoted 9 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos5250.dtsiindex 7d7cc77..668ce5d 100644arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>;Shouldn't it rather come from some clock provided by some clock controller instead?
Quoted 3 lines
The frequency would be then retrieved using
clk_get_rate()on a clock received byclk_get(), specified in device tree using generic clock bindings.
If the bootloader has initialised the generic timer correctly, the CNTFRQ register should contain the clock frequency, independent of any external clock.
Having the bootloader set CNTFRQ is by far the preferable solution, it is architected for this purpose.
Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
[Adding Tony, who reported a mainline booting issue, and Sean who helped me track this down]
Quoted 20 lines · Mark Rutland
Quoted 19 lines · Tomasz Figa
Hi Yuvaraj,
Quoted 2 lines · On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[snip]
arch/arm/boot/dts/exynos5250.dtsi line 99
Quoted 9 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos5250.dtsiindex 7d7cc77..668ce5d 100644arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>;Shouldn't it rather come from some clock provided by some clock controller instead?
Quoted 7 lines
Quoted 3 lines
The frequency would be then retrieved using
clk_get_rate()on a clock received byclk_get(), specified in device tree using generic clock bindings.If the bootloader has initialised the generic timer correctly, the CNTFRQ register should contain the clock frequency, independent of any external clock.
So, we just sat here to bisect a problem on the Samsung Chromebook where we hit exactly this problem. The read-only firmware on the device does not set CNTFRQ at boot, so this fails.
Apparantly the u-boot that comes with Arndale sets it, so I haven't seen this error on that platform.
Quoted 2 lines
Having the bootloader set CNTFRQ is by far the preferable solution, it is architected for this purpose.
Unfortunately there is now real hardware out there that needs this due to firmware bugs / missing features, so there's little other choice. :(
I'll pick this patch up in the fixes branch for 3.12, unless someone complains loudly.
-Olof
Quoted 28 lines · Olof Johansson
[Adding Tony, who reported a mainline booting issue, and Sean who helped me track this down]
Quoted 24 lines · Mark Rutland
Quoted 22 lines · Tomasz Figa
Hi Yuvaraj,
Quoted 2 lines · On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[snip]
arch/arm/boot/dts/exynos5250.dtsi line 99
Quoted 9 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos5250.dtsiindex 7d7cc77..668ce5d 100644arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>;Shouldn't it rather come from some clock provided by some clock controller instead?
The frequency would be then retrieved using
clk_get_rate()on a clock received byclk_get(), specified in device tree using generic clock bindings.
Quoted 7 lines
Quoted 3 lines
If the bootloader has initialised the generic timer correctly, the CNTFRQ register should contain the clock frequency, independent of any external clock.
So, we just sat here to bisect a problem on the Samsung Chromebook where we hit exactly this problem. The read-only firmware on the device does not set CNTFRQ at boot, so this fails.
Ouch. That's a shame.
A chained bootloader (like the KVM guys are using) should be able to set CNTFRQ, so as long as any chained loader actually does that this won't cause that to blow up...
Quoted 10 lines
Apparantly the u-boot that comes with Arndale sets it, so I haven't seen this error on that platform.
Quoted 2 lines
Having the bootloader set CNTFRQ is by far the preferable solution, it is architected for this purpose.
Unfortunately there is now real hardware out there that needs this due to firmware bugs / missing features, so there's little other choice. :(
Indeed :(
Quoted 3 lines
I'll pick this patch up in the fixes branch for 3.12, unless someone complains loudly.
Could you please add a note to the dts regarding why we actually need this? It would be nice to maintain the impression that this is not the preferred way of doing things...
Cheers,
Mark.
Quoted 37 lines · Mark Rutland
Quoted 28 lines · Olof Johansson
[Adding Tony, who reported a mainline booting issue, and Sean who helped me track this down]
Quoted 24 lines · Mark Rutland
Quoted 22 lines · Tomasz Figa
Hi Yuvaraj,
Quoted 2 lines · On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[snip]
arch/arm/boot/dts/exynos5250.dtsi line 99
Quoted 9 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos5250.dtsiindex 7d7cc77..668ce5d 100644arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>;Shouldn't it rather come from some clock provided by some clock controller instead?
The frequency would be then retrieved using
clk_get_rate()on a clock received byclk_get(), specified in device tree using generic clock bindings.Quoted 7 lines
Quoted 3 lines
If the bootloader has initialised the generic timer correctly, the CNTFRQ register should contain the clock frequency, independent of any external clock.
So, we just sat here to bisect a problem on the Samsung Chromebook where we hit exactly this problem. The read-only firmware on the device does not set CNTFRQ at boot, so this fails.
Quoted 5 lines
Ouch. That's a shame.
A chained bootloader (like the KVM guys are using) should be able to set CNTFRQ, so as long as any chained loader actually does that this won't cause that to blow up...
Yes, but we have cases where we want to be able to boot without a chained u-boot as well.
Quoted 13 lines
Quoted 9 lines
Apparantly the u-boot that comes with Arndale sets it, so I haven't seen this error on that platform.
Quoted 2 lines
Having the bootloader set CNTFRQ is by far the preferable solution, it is architected for this purpose.
Unfortunately there is now real hardware out there that needs this due to firmware bugs / missing features, so there's little other choice. :(
Indeed :(
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
I'll pick this patch up in the fixes branch for 3.12, unless someone complains loudly.
Could you please add a note to the dts regarding why we actually need this? It would be nice to maintain the impression that this is not the preferred way of doing things...
s/dts/dtsi/, yes I can do that. Hopefully with that we won't get too much automated copy and paste to other platforms.
It looks like current upstream u-boot got the timer enablement patches merged together with HYP support, which explains why I didn't see this on Arndale since it has a forked version of u-boot from Linaro somewhere.
-Olof
Quoted 38 lines · Olof Johansson
Quoted 37 lines · Mark Rutland
Quoted 35 lines · Olof Johansson
[Adding Tony, who reported a mainline booting issue, and Sean who helped me track this down]
Quoted 20 lines · Mark Rutland
Quoted 19 lines · Tomasz Figa
Hi Yuvaraj,
Quoted 2 lines · On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[snip]
arch/arm/boot/dts/exynos5250.dtsi line 99
Quoted 9 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos5250.dtsiindex 7d7cc77..668ce5d 100644arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>;Shouldn't it rather come from some clock provided by some clock controller instead?
Quoted 7 lines
Quoted 3 lines
The frequency would be then retrieved using
clk_get_rate()on a clock received byclk_get(), specified in device tree using generic clock bindings.If the bootloader has initialised the generic timer correctly, the CNTFRQ register should contain the clock frequency, independent of any external clock.
So, we just sat here to bisect a problem on the Samsung Chromebook where we hit exactly this problem. The read-only firmware on the device does not set CNTFRQ at boot, so this fails.
Quoted 8 lines
Quoted 5 lines
Ouch. That's a shame.
A chained bootloader (like the KVM guys are using) should be able to set CNTFRQ, so as long as any chained loader actually does that this won't cause that to blow up...
Yes, but we have cases where we want to be able to boot without a chained u-boot as well.
Sorry, that was poorly worded on my behalf. I meant that in the main case I'm aware of where the having the clock-frequency property wasn't good enough (because it doesn't get propagated to guests), we have another workaround.
Quoted 17 lines
Quoted 17 lines
Quoted 10 lines
Apparantly the u-boot that comes with Arndale sets it, so I haven't seen this error on that platform.
Quoted 2 lines
Having the bootloader set CNTFRQ is by far the preferable solution, it is architected for this purpose.
Unfortunately there is now real hardware out there that needs this due to firmware bugs / missing features, so there's little other choice. :(
Indeed :(
Quoted 3 lines
I'll pick this patch up in the fixes branch for 3.12, unless someone complains loudly.
Quoted 6 lines
Quoted 3 lines
Could you please add a note to the dts regarding why we actually need this? It would be nice to maintain the impression that this is not the preferred way of doing things...
s/dts/dtsi/, yes I can do that. Hopefully with that we won't get too much automated copy and paste to other platforms.
Cheers!
Thanks,
Mark.
Quoted 42 lines · Olof Johansson
[Adding Tony, who reported a mainline booting issue, and Sean who helped me track this down]
Quoted 20 lines · Mark Rutland
Quoted 19 lines · Tomasz Figa
Hi Yuvaraj,
Quoted 2 lines · On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[snip]
arch/arm/boot/dts/exynos5250.dtsi line 99
Quoted 9 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos5250.dtsiindex 7d7cc77..668ce5d 100644arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>;Shouldn't it rather come from some clock provided by some clock controller instead?
Quoted 7 lines
Quoted 3 lines
The frequency would be then retrieved using
clk_get_rate()on a clock received byclk_get(), specified in device tree using generic clock bindings.If the bootloader has initialised the generic timer correctly, the CNTFRQ register should contain the clock frequency, independent of any external clock.
So, we just sat here to bisect a problem on the Samsung Chromebook where we hit exactly this problem. The read-only firmware on the device does not set CNTFRQ at boot, so this fails.
Apparantly the u-boot that comes with Arndale sets it, so I haven't seen this error on that platform.
Quoted 2 lines
Having the bootloader set CNTFRQ is by far the preferable solution, it is architected for this purpose.
Quoted 6 lines
Unfortunately there is now real hardware out there that needs this due to firmware bugs / missing features, so there's little other choice. :(
I'll pick this patch up in the fixes branch for 3.12, unless someone complains loudly.
Perhaps the subject should say something about this only applying to exynos.
Rob
Quoted 43 lines · Rob Herring
Quoted 42 lines · Olof Johansson
[Adding Tony, who reported a mainline booting issue, and Sean who helped me track this down]
Quoted 20 lines · Mark Rutland
Quoted 19 lines · Tomasz Figa
Hi Yuvaraj,
Quoted 2 lines · On Wednesday 18 of September 2013 15:41:53 Yuvaraj Kumar C D wrote:
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[snip]
arch/arm/boot/dts/exynos5250.dtsi line 99
Quoted 9 lines
(quoted diff) +0
-0
b/arch/arm/boot/dts/exynos5250.dtsiindex 7d7cc77..668ce5d 100644arch/arm/boot/dts/exynos5250.dtsi +1
-0@@ -96,6 +96,7 @@ <1 14 0xf08>, <1 11 0xf08>, <1 10 0xf08>; + clock-frequency = <24000000>;Shouldn't it rather come from some clock provided by some clock controller instead?
Quoted 7 lines
Quoted 3 lines
The frequency would be then retrieved using
clk_get_rate()on a clock received byclk_get(), specified in device tree using generic clock bindings.If the bootloader has initialised the generic timer correctly, the CNTFRQ register should contain the clock frequency, independent of any external clock.
So, we just sat here to bisect a problem on the Samsung Chromebook where we hit exactly this problem. The read-only firmware on the device does not set CNTFRQ at boot, so this fails.
Apparantly the u-boot that comes with Arndale sets it, so I haven't seen this error on that platform.
Quoted 2 lines
Having the bootloader set CNTFRQ is by far the preferable solution, it is architected for this purpose.
Quoted 8 lines
Quoted 6 lines
Unfortunately there is now real hardware out there that needs this due to firmware bugs / missing features, so there's little other choice. :(
I'll pick this patch up in the fixes branch for 3.12, unless someone complains loudly.
Perhaps the subject should say something about this only applying to exynos.
Definitely, and I'll add a comment as Mark requested.
-Olof
Quoted 14 lines · Yuvaraj Kumar C D
Without the "clock-frequency" property in arch timer node, could able to see the below crash dump.
[<
c0014e28>] (unwind_backtrace+0x0/0xf4) from [<c0011808>] (show_stack+0x10/0x14)
[<c0011808>] (show_stack+0x10/0x14) from [<c036ac1c>] (dump_stack+0x7c/0xb0)
[<c036ac1c>] (dump_stack+0x7c/0xb0) from [<c01ab760>] (Ldiv0_64+0x8/0x18)
[<c01ab760>] (Ldiv0_64+0x8/0x18) from [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) [<c0062f60>] (clockevents_config.part.2+0x1c/0x74) from [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) [<c0062fd8>] (clockevents_config_and_register+0x20/0x2c) from [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) [<c02b8e8c>] (arch_timer_setup+0xa8/0x134) from [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) [<c04b47b4>] (arch_timer_init+0x1f4/0x24c) from [<c04b40d8>] (clocksource_of_init+0x34/0x58) [<c04b40d8>] (clocksource_of_init+0x34/0x58) from [<c049ed8c>] (time_init+0x20/0x2c) [<c049ed8c>] (time_init+0x20/0x2c) from [<c049b95c>] (start_kernel+0x1e0/0x39c)
Quoted 1 line
Signed-off-by Yuvaraj Kumar C D <[email protected]>
Applied with subject:
ARM: exynos: dts: Update 5250 arch timer node with clock frequency
-Olof