kernel-fxtec-pro1x/drivers/clocksource
Serge Semin ffa7a58fb0 clocksource: dw_apb_timer_of: Fix missing clockevent timers
[ Upstream commit 6d2e16a3181bafb77b535095c39ad1c8b9558c8c ]

Commit 1002148899 ("clocksource: dw_apb_timer_of: use
clocksource_of_init") replaced a publicly available driver
initialization method with one called by the timer_probe() method
available after CLKSRC_OF. In current implementation it traverses
all the timers available in the system and calls their initialization
methods if corresponding devices were either in dtb or in acpi. But
if before the commit any number of available timers would be installed
as clockevent and clocksource devices, after that there would be at most
two. The rest are just ignored since default case branch doesn't do
anything. I don't see a reason of such behaviour, neither the commit
message explains it. Moreover this might be wrong if on some platforms
these timers might be used for different purpose, as virtually CPU-local
clockevent timers and as an independent broadcast timer. So in order
to keep the compatibility with the platforms where the order of the
timers detection has some meaning, lets add the secondly discovered
timer to be of clocksource/sched_clock type, while the very first and
the others would provide the clockevents service.

Fixes: 1002148899 ("clocksource: dw_apb_timer_of: use clocksource_of_init")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-rtc@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200521204818.25436-7-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-22 09:05:11 +02:00
..
acpi_pm.c
arc_timer.c
arm_arch_timer.c
arm_global_timer.c
armv7m_systick.c
asm9260_timer.c clocksource/drivers/asm9260: Add a check for of_clk_get 2020-01-04 19:12:44 +01:00
bcm2835_timer.c clocksource/drivers/bcm2835_timer: Fix memory leak of timer 2020-02-24 08:34:37 +01:00
bcm_kona_timer.c
cadence_ttc_timer.c
clksrc-dbx500-prcmu.c
clksrc_st_lpc.c
clps711x-timer.c
cs5535-clockevt.c
dummy_timer.c
dw_apb_timer.c clocksource: dw_apb_timer: Make CPU-affiliation being optional 2020-06-22 09:05:11 +02:00
dw_apb_timer_of.c clocksource: dw_apb_timer_of: Fix missing clockevent timers 2020-06-22 09:05:11 +02:00
em_sti.c
exynos_mct.c clocksource/drivers/exynos_mct: Fix error path in timer resources initialization 2020-01-27 14:50:27 +01:00
fsl_ftm_timer.c
h8300_timer8.c
h8300_timer16.c
h8300_tpu.c
i8253.c
jcore-pit.c
Kconfig
Makefile
meson6_timer.c
mips-gic-timer.c
mmio.c
mps2-timer.c
mxs_timer.c
nomadik-mtu.c
numachip.c
owl-timer.c
pxa_timer.c
qcom-timer.c
renesas-ostm.c
riscv_timer.c
rockchip_timer.c
samsung_pwm_timer.c
scx200_hrt.c
sh_cmt.c
sh_mtu2.c
sh_tmu.c
sun4i_timer.c
tango_xtal.c
tcb_clksrc.c
tegra20_timer.c
time-armada-370-xp.c
time-efm32.c
time-lpc32xx.c
time-orion.c
time-pistachio.c
timer-atcpit100.c
timer-atlas7.c
timer-atmel-pit.c
timer-atmel-st.c
timer-digicolor.c
timer-fttmr010.c clocksource/drivers/fttmr010: Fix invalid interrupt register access 2019-12-05 09:20:38 +01:00
timer-imx-gpt.c
timer-imx-tpm.c
timer-integrator-ap.c
timer-keystone.c
timer-mediatek.c clocksource/drivers/mediatek: Fix error handling 2019-12-05 09:19:35 +01:00
timer-npcm7xx.c
timer-nps.c
timer-of.c clocksource/drivers/timer-of: Use unique device name instead of timer 2020-01-04 19:12:45 +01:00
timer-of.h
timer-oxnas-rps.c
timer-prima2.c
timer-probe.c
timer-sp.h
timer-sp804.c
timer-sprd.c
timer-stm32.c
timer-sun5i.c clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable 2020-01-27 14:50:27 +01:00
timer-ti-32k.c
timer-ti-dm.c bus: ti-sysc: Fix timer handling with drop pm_runtime_irq_safe() 2020-01-27 14:50:16 +01:00
timer-u300.c
versatile.c
vf_pit_timer.c
vt8500_timer.c
zevio-timer.c