aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/nomadik-mtu.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-09-09 18:26:07 +0200
committerTakashi Iwai <tiwai@suse.de>2020-09-09 18:26:48 +0200
commit9ddb236f13594b34a12dacf69a5adca7a1aef35e (patch)
tree1dc1f6e54962a2e3ad3d56c894522cb4b1ddce93 /drivers/clocksource/nomadik-mtu.c
parentALSA: vx: vx_pcm: remove redundant assignment (diff)
parentALSA: hda/realtek - The Mic on a RedmiBook doesn't work (diff)
downloadlinux-dev-9ddb236f13594b34a12dacf69a5adca7a1aef35e.tar.xz
linux-dev-9ddb236f13594b34a12dacf69a5adca7a1aef35e.zip
Merge branch 'for-linus' into for-next
Back-merge to apply the tasklet conversion patches that are based on the already applied tasklet API changes on 5.9-rc4. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/clocksource/nomadik-mtu.c')
-rw-r--r--drivers/clocksource/nomadik-mtu.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/clocksource/nomadik-mtu.c b/drivers/clocksource/nomadik-mtu.c
index f49a631d8f58..1cf3304652d6 100644
--- a/drivers/clocksource/nomadik-mtu.c
+++ b/drivers/clocksource/nomadik-mtu.c
@@ -186,6 +186,7 @@ static int __init nmdk_timer_init(void __iomem *base, int irq,
{
unsigned long rate;
int ret;
+ int min_ticks;
mtu_base = base;
@@ -194,7 +195,8 @@ static int __init nmdk_timer_init(void __iomem *base, int irq,
/*
* Tick rate is 2.4MHz for Nomadik and 2.4Mhz, 100MHz or 133 MHz
- * for ux500.
+ * for ux500, and in one specific Ux500 case 32768 Hz.
+ *
* Use a divide-by-16 counter if the tick rate is more than 32MHz.
* At 32 MHz, the timer (with 32 bit counter) can be programmed
* to wake-up at a max 127s a head in time. Dividing a 2.4 MHz timer
@@ -230,7 +232,12 @@ static int __init nmdk_timer_init(void __iomem *base, int irq,
pr_err("%s: request_irq() failed\n", "Nomadik Timer Tick");
nmdk_clkevt.cpumask = cpumask_of(0);
nmdk_clkevt.irq = irq;
- clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU);
+ if (rate < 100000)
+ min_ticks = 5;
+ else
+ min_ticks = 2;
+ clockevents_config_and_register(&nmdk_clkevt, rate, min_ticks,
+ 0xffffffffU);
mtu_delay_timer.read_current_timer = &nmdk_timer_read_current_timer;
mtu_delay_timer.freq = rate;