diff options
author | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-13 12:40:56 +0100 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-12-13 12:40:56 +0100 |
commit | a2748b5ac80cfab7e65cf41018b13c356f2d2b61 (patch) | |
tree | 5deae5744b3a718104e8cb73fbd1469d0a0c7b01 /drivers/clocksource | |
parent | 4f5df6df46d02b8fe23593461c003f689bd4dc4c (diff) | |
parent | 640f85865ca658ae07d485693a3d452bdbbadaba (diff) |
Merge tag 'v4.4.167' into toradex_vf_4.4-next
This is the 4.4.167 stable release
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/i8253.c | 14 | ||||
-rw-r--r-- | drivers/clocksource/timer-ti-32k.c | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c index 0efd36e483ab..60c8a9bd562d 100644 --- a/drivers/clocksource/i8253.c +++ b/drivers/clocksource/i8253.c @@ -19,6 +19,13 @@ DEFINE_RAW_SPINLOCK(i8253_lock); EXPORT_SYMBOL(i8253_lock); +/* + * Handle PIT quirk in pit_shutdown() where zeroing the counter register + * restarts the PIT, negating the shutdown. On platforms with the quirk, + * platform specific code can set this to false. + */ +bool i8253_clear_counter_on_shutdown = true; + #ifdef CONFIG_CLKSRC_I8253 /* * Since the PIT overflows every tick, its not very useful @@ -108,8 +115,11 @@ static int pit_shutdown(struct clock_event_device *evt) raw_spin_lock(&i8253_lock); outb_p(0x30, PIT_MODE); - outb_p(0, PIT_CH0); - outb_p(0, PIT_CH0); + + if (i8253_clear_counter_on_shutdown) { + outb_p(0, PIT_CH0); + outb_p(0, PIT_CH0); + } raw_spin_unlock(&i8253_lock); return 0; diff --git a/drivers/clocksource/timer-ti-32k.c b/drivers/clocksource/timer-ti-32k.c index 8518d9dfba5c..73c990867c01 100644 --- a/drivers/clocksource/timer-ti-32k.c +++ b/drivers/clocksource/timer-ti-32k.c @@ -98,6 +98,9 @@ static void __init ti_32k_timer_init(struct device_node *np) return; } + if (!of_machine_is_compatible("ti,am43")) + ti_32k_timer.cs.flags |= CLOCK_SOURCE_SUSPEND_NONSTOP; + ti_32k_timer.counter = ti_32k_timer.base; /* |