android_kernel_motorola_sm6375/drivers/clocksource
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Phong Hoang c60a31db39 clocksource/drivers/sh_cmt: Fix wrong setting if don't request IRQ for clock source channel
[ Upstream commit be83c3b6e7b8ff22f72827a613bf6f3aa5afadbb ]

If CMT instance has at least two channels, one channel will be used
as a clock source and another one used as a clock event device.
In that case, IRQ is not requested for clock source channel so
sh_cmt_clock_event_program_verify() might work incorrectly.
Besides, when a channel is only used for clock source, don't need to
re-set the next match_value since it should be maximum timeout as
it still is.

On the other hand, due to no IRQ, total_cycles is not counted up
when reaches compare match time (timer counter resets to zero),
so sh_cmt_clocksource_read() returns unexpected value.
Therefore, use 64-bit clocksoure's mask for 32-bit or 16-bit variants
will also lead to wrong delta calculation. Hence, this mask should
correspond to timer counter width, and above function just returns
the raw value of timer counter register.

Fixes: bfa76bb12f ("clocksource: sh_cmt: Request IRQ for clock event device only")
Fixes: 37e7742c55 ("clocksource/drivers/sh_cmt: Fix clocksource width for 32-bit machines")
Signed-off-by: Phong Hoang <phong.hoang.wz@renesas.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20210422123443.73334-1-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-15 09:47:29 +02:00
..
acpi_pm.c
arc_timer.c Merge branch 'timers/vdso' into timers/core 2019-07-03 10:50:21 +02:00
arm_arch_timer.c clocksource/arm_arch_timer: Improve Allwinner A64 timer workaround 2021-07-19 08:53:15 +02:00
arm_global_timer.c
armv7m_systick.c
asm9260_timer.c clocksource/drivers/asm9260: Add a check for of_clk_get 2020-01-04 19:17:07 +01:00
bcm2835_timer.c clocksource/drivers/bcm2835_timer: Fix memory leak of timer 2020-02-24 08:36:28 +01:00
bcm_kona_timer.c
clksrc-dbx500-prcmu.c
clksrc_st_lpc.c
clps711x-timer.c
dummy_timer.c
dw_apb_timer.c clocksource: dw_apb_timer: Make CPU-affiliation being optional 2020-06-22 09:30:55 +02:00
dw_apb_timer_of.c clocksource: dw_apb_timer_of: Fix missing clockevent timers 2020-06-22 09:30:55 +02:00
em_sti.c clocksource: Remove dev_err() usage after platform_get_irq() 2019-08-27 00:31:39 +02:00
exynos_mct.c Merge branch 'timers/vdso' into timers/core 2019-07-03 10:50:21 +02:00
h8300_timer8.c clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() 2020-10-01 13:18:16 +02:00
h8300_timer16.c
h8300_tpu.c
hyperv_timer.c clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources 2020-04-01 11:02:12 +02:00
i8253.c
ingenic-timer.c clocksource: Add a new timer-ingenic driver 2019-08-08 15:30:08 -07:00
jcore-pit.c
Kconfig clocksource/drivers/ixp4xx: Select TIMER_OF when needed 2021-03-04 10:26:29 +01:00
Makefile clocksource: Add a new timer-ingenic driver 2019-08-08 15:30:08 -07:00
mips-gic-timer.c
mmio.c
mps2-timer.c
mxs_timer.c clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined 2021-03-04 10:26:29 +01:00
nomadik-mtu.c
numachip.c
renesas-ostm.c clocksource/drivers/renesas-ostm: Use DIV_ROUND_CLOSEST() helper 2019-08-27 00:31:39 +02:00
samsung_pwm_timer.c
scx200_hrt.c
sh_cmt.c clocksource/drivers/sh_cmt: Fix wrong setting if don't request IRQ for clock source channel 2021-09-15 09:47:29 +02:00
sh_mtu2.c clocksource/drivers/sh_mtu2: Do not loop using platform_get_irq_by_name() 2019-10-18 07:55:16 +02:00
sh_tmu.c clocksource: Remove dev_err() usage after platform_get_irq() 2019-08-27 00:31:39 +02:00
timer-armada-370-xp.c
timer-atcpit100.c
timer-atlas7.c
timer-atmel-pit.c
timer-atmel-st.c
timer-atmel-tcb.c clocksource/drivers/tcb_clksrc: Register delay timer 2019-08-27 00:31:39 +02:00
timer-cadence-ttc.c clocksource/drivers/cadence_ttc: Fix memory leak in ttc_setup_clockevent() 2020-12-30 11:51:17 +01:00
timer-cs5535.c
timer-davinci.c clocksource: davinci: only enable clockevents once tim34 is initialized 2020-02-24 08:36:46 +01:00
timer-digicolor.c
timer-efm32.c
timer-fsl-ftm.c
timer-fttmr010.c
timer-gx6605s.c clocksource/drivers/timer-gx6605s: Fixup counter reload 2020-10-07 08:01:25 +02:00
timer-imx-gpt.c
timer-imx-sysctr.c clocksource/drivers/imx-sysctr: Add internal clock divider handle 2019-08-27 00:31:39 +02:00
timer-imx-tpm.c
timer-integrator-ap.c
timer-ixp4xx.c
timer-keystone.c
timer-lpc32xx.c
timer-mediatek.c clocksource/drivers/mediatek: Fix error handling 2019-10-16 17:04:50 +02:00
timer-meson6.c
timer-milbeaut.c
timer-mp-csky.c
timer-npcm7xx.c clocksource/drivers/npcm: Fix GENMASK and timer operation 2019-08-27 00:31:39 +02:00
timer-nps.c
timer-of.c clocksource/drivers/timer-of: Use unique device name instead of timer 2020-01-04 19:17:08 +01:00
timer-of.h
timer-orion.c clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path 2020-12-30 11:51:17 +01:00
timer-owl.c
timer-oxnas-rps.c
timer-pistachio.c
timer-prima2.c
timer-probe.c clocksource/drivers: Do not warn on probe defer 2019-08-27 00:31:39 +02:00
timer-pxa.c
timer-qcom.c
timer-rda.c
timer-riscv.c clocksource: riscv: add notrace to riscv_sched_clock 2020-01-09 10:19:59 +01:00
timer-rockchip.c
timer-sp.h
timer-sp804.c
timer-sprd.c
timer-stm32.c
timer-sun4i.c clocksource: sun4i: Add missing compatibles 2019-08-27 00:31:39 +02:00
timer-sun5i.c
timer-tango-xtal.c
timer-tegra.c clocksource/drivers/tegra: Set up maximum-ticks limit properly 2019-06-25 19:49:18 +02:00
timer-ti-32k.c
timer-ti-dm.c
timer-u300.c
timer-versatile.c
timer-vf-pit.c
timer-vt8500.c
timer-zevio.c