clocksource driver fix
Subsystems (2)
Linus,
Please pull the latest timers/urgent git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-2020-07-25
# HEAD: b4a25fb0e62990df467451744b22e0e24960a5e6 Merge tag 'timers-v5.8-rc7' of https://git.linaro.org/people/daniel.lezcano/linux into timers/urgent
Fix a suspend/resume regression (crash) on TI AM3/AM4 SoC's.
Thanks,
Ingo
------------------>
Tony Lindgren (1):
clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4
drivers/bus/ti-sysc.c | 22 ++++++++++++++ drivers/clocksource/timer-ti-dm-systimer.c | 46 +++++++++++++++++++++++------- 2 files changed, 58 insertions(+), 10 deletions(-)
drivers/bus/ti-sysc.c +22 -0
@@ -2864,6 +2864,24 @@ static int sysc_check_disabled_devices(struct sysc *ddata)return error; } +/* +* Ignore timers tagged with no-reset and no-idle. These are likely in use, +* for example by drivers/clocksource/timer-ti-dm-systimer.c. If more checks +* are needed, we could also look at the timer register configuration. +*/ +static int sysc_check_active_timer (struct sysc *ddata) +{ +if (ddata->cap->type !=TI_SYSC_OMAP2_TIMER && + ddata->cap->type !=TI_SYSC_OMAP4_TIMER ) +return 0 ; + +if ((ddata->cfg.quirks &SYSC_QUIRK_NO_RESET_ON_INIT ) && + (ddata->cfg.quirks &SYSC_QUIRK_NO_IDLE )) +return -EBUSY ; + +return 0 ; +} +static const struct of_device_id sysc_match_table[] = { { .compatible ="simple-bus" , }, {/* sentinel */ },
@@ -2920,6 +2938,10 @@ static int sysc_probe(struct platform_device *pdev)if (error)return error; + error =sysc_check_active_timer (ddata); +if (error) +return error; + error =sysc_get_clocks (ddata);if (error)return error;
drivers/clocksource/timer-ti-dm-systimer.c +36 -10
131 lines not on this page · raw message
The pull request you sent on Sat, 25 Jul 2020 12:53:57 +0200:
The pull request you sent on Sat, 25 Jul 2020 12:53:57 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.gittimers-urgent-2020-07-25
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a7b36c2b134f7ca75789d174b97d07acccbf6b93
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker