linux/drivers/clocksource
Lorenzo Pieralisi 82a5619410 clocksource: arch_arm_timer: Fix age-old arch timer C3STOP detection issue
ARM arch timers are tightly coupled with the CPU logic and lose context
on platform implementing HW power management when cores are powered
down at run-time. Marking the arch timers as C3STOP regardless of power
management capabilities causes issues on platforms with no power management,
since in that case the arch timers cannot possibly enter states where the
timer loses context at runtime and therefore can always be used as a high
resolution clockevent device.

In order to fix the C3STOP issue in a way compliant with how real HW
works, this patch adds a boolean property to the arch timer bindings
to define if the arch timer is managed by an always-on power domain.

This power domain is present on all ARM platforms to date, and manages
HW that must not be turned off, whatever the state of other HW
components (eg power controller). On platforms with no power management
capabilities, it is the only power domain present, which encompasses
and manages power supply for all HW components in the system.

If the timer is powered by the always-on power domain, the always-on
property must be present in the bindings which means that the timer cannot
be shutdown at runtime, so it is not a C3STOP clockevent device.
If the timer binding does not contain the always-on property, the timer is
assumed to be power-gateable, hence it must be defined as a C3STOP
clockevent device.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Magnus Damm <damm@opensource.se>
Cc: Marc Carino <marc.ceeeee@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2014-04-29 15:06:36 +02:00
..
acpi_pm.c treewide: Fix printks with 0x%# 2013-08-27 10:49:38 +02:00
arm_arch_timer.c clocksource: arch_arm_timer: Fix age-old arch timer C3STOP detection issue 2014-04-29 15:06:36 +02:00
arm_global_timer.c clocksource: arm_global_timer: Switch to sched_clock_register() 2013-12-11 11:40:23 +01:00
bcm2835_timer.c clocksource: bcm2835: Switch to sched_clock_register() 2013-07-30 11:24:51 -07:00
bcm_kona_timer.c clocksource: Kona: Print warning rather than panic 2014-02-06 16:01:40 +01:00
cadence_ttc_timer.c clocksource/cadence_ttc: Overhaul clocksource frequency adjustment 2014-03-11 23:10:03 +01:00
clksrc-dbx500-prcmu.c clocksource: dbx500-prcmu: Switch to sched_clock_register() 2013-07-30 11:24:52 -07:00
clksrc-of.c Merge branch 'clockevents/3.14' of git://git.linaro.org/people/daniel.lezcano/linux into timers/core 2014-01-14 14:33:29 +01:00
cs5535-clockevt.c clocksource: misc drivers: Remove deprecated IRQF_DISABLED 2013-12-11 11:40:27 +01:00
dummy_timer.c clocksource, dummy-timer: Fix CPU hotplug callback registration 2014-03-20 13:43:45 +01:00
dw_apb_timer_of.c clocksource: dw_apb_timer_of: Fix support for dts binding "snps,dw-apb-timer" 2013-12-10 19:49:18 +01:00
dw_apb_timer.c clocksource: misc drivers: Remove deprecated IRQF_DISABLED 2013-12-11 11:40:27 +01:00
em_sti.c clocksource: em_sti: convert to clk_prepare/unprepare 2013-10-22 22:36:24 +02:00
exynos_mct.c ARM: SoC: cleanups for 3.15 2014-04-05 13:51:19 -07:00
i8253.c time: Kill xtime_lock, replacing it with jiffies_lock 2012-11-13 14:08:23 -05:00
Kconfig ARM: SoC: cleanups for 3.15 2014-04-05 13:51:19 -07:00
Makefile ARM: SoC: cleanups for 3.15 2014-04-05 13:51:19 -07:00
metag_generic.c clocksource+irqchip: delete __cpuinit usage from all related files 2013-07-14 19:36:57 -04:00
mmio.c clocksource: add common mmio clocksource 2011-05-23 18:04:51 +01:00
moxart_timer.c ARM: clocksource: moxart: Add bitops.h include 2013-08-01 01:13:34 +02:00
mxs_timer.c clocksource: mxs_timer: Switch to sched_clock_register() 2013-07-30 11:24:52 -07:00
nomadik-mtu.c ARM: SoC DT updates for 3.14 2014-01-23 18:45:38 -08:00
qcom-timer.c clocksource: qcom: split building of legacy vs multiplatform support 2014-02-06 16:20:41 -06:00
samsung_pwm_timer.c clocksource: misc drivers: Remove deprecated IRQF_DISABLED 2013-12-11 11:40:27 +01:00
scx200_hrt.c clocksource: scx200_hrt: Fix the build 2012-02-22 13:25:16 +01:00
sh_cmt.c Merge branch 'clockevents/for-Simon-3.13-rc2' into clockevents/3.14 2013-12-18 15:14:36 +01:00
sh_mtu2.c Merge branch 'clockevents/3.14' of git://git.linaro.org/people/daniel.lezcano/linux into timers/core 2014-01-14 14:33:29 +01:00
sh_tmu.c Merge branch 'clockevents/3.14' of git://git.linaro.org/people/daniel.lezcano/linux into timers/core 2014-01-14 14:33:29 +01:00
sun4i_timer.c clocksource: sunxi: Add new compatibles 2014-03-11 23:04:46 +01:00
tcb_clksrc.c clocksource: tcb_clksrc: Remove IRQF_DISABLED 2013-10-03 16:28:40 +02:00
tegra20_timer.c clocksource: tegra: Remove deprecated IRQF_DISABLED 2013-12-11 11:40:28 +01:00
time-armada-370-xp.c clocksource: armada-370-xp: Use atomic access for shared registers 2014-03-11 23:05:05 +01:00
time-efm32.c clocksource: Provide timekeeping for efm32 SoCs 2013-10-22 22:36:33 +02:00
time-orion.c clocksource: orion: Use atomic access for shared registers 2014-03-11 23:05:02 +01:00
timer-keystone.c clocksource: timer-keystone: Delete unnecessary variable 2014-03-11 23:05:00 +01:00
timer-marco.c clocksource: sirf/marco+prima2: drop usage of CLOCK_TICK_RATE 2013-12-20 11:41:34 +01:00
timer-prima2.c clocksource: sirf/marco+prima2: drop usage of CLOCK_TICK_RATE 2013-12-20 11:41:34 +01:00
timer-sun5i.c clocksource: Timer-sun5i: Switch to sched_clock_register() 2014-01-19 13:23:23 +01:00
timer-u300.c Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2014-04-05 13:20:43 -07:00
vf_pit_timer.c clocksource: vf_pit_timer: use complement for sched_clock reading 2014-03-06 11:34:14 +01:00
vt8500_timer.c clocksource: vt8500: Remove deprecated IRQF_DISABLED 2013-12-11 11:40:28 +01:00
zevio-timer.c clocksource: Add TI-Nspire timer support 2013-06-06 17:23:13 +02:00