Skip to content

Commit 1b3f828

Browse files
committed
Merge branch 'clockevents/3.14' of git://git.linaro.org/people/daniel.lezcano/linux into timers/core
Pull clocksource/clockevent updates from Daniel Lezcano: * Axel Lin removed an unused structure defining the ids for the bcm kona driver. * Ezequiel Garcia enabled the timer divider only when the 25MHz timer is not used for the armada 370 XP. * Jingoo Han removed a pointless platform data initialization for the sh_mtu and sh_mtu2. * Laurent Pinchart added the clk_prepare/clk_unprepare for sh_cmt. * Linus Walleij added a useful warning in clk_of when no clocks are found while the old behavior was to silently hang at boot time. * Maxime Ripard added the high speed timer drivers for the Allwinner SoCs (A10, A13, A20). He increased the rating, shared the irq across all available cpus and fixed the clockevent's irq initialization for the sun4i. * Michael Opdenacker removed the usage of the IRQF_DISABLED for the all the timers driver located in drivers/clocksource. * Stephen Boyd switched to sched_clock_register for the arm_global_timer, cadence_ttc, sun4i and orion timers. Conflicts: drivers/clocksource/clksrc-of.c Signed-off-by: Ingo Molnar <mingo@kernel.org>
2 parents d05d24a + 98aefbe commit 1b3f828

24 files changed

Lines changed: 295 additions & 47 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Allwinner SoCs High Speed Timer Controller
2+
3+
Required properties:
4+
5+
- compatible : should be "allwinner,sun5i-a13-hstimer" or
6+
"allwinner,sun7i-a20-hstimer"
7+
- reg : Specifies base physical address and size of the registers.
8+
- interrupts : The interrupts of these timers (2 for the sun5i IP, 4 for the sun7i
9+
one)
10+
- clocks: phandle to the source clock (usually the AHB clock)
11+
12+
Example:
13+
14+
timer@01c60000 {
15+
compatible = "allwinner,sun7i-a20-hstimer";
16+
reg = <0x01c60000 0x1000>;
17+
interrupts = <0 51 1>,
18+
<0 52 1>,
19+
<0 53 1>,
20+
<0 54 1>;
21+
clocks = <&ahb1_gates 19>;
22+
};

‎arch/arm/boot/dts/sun5i-a10s.dtsi‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,5 +332,12 @@
332332
clock-frequency = <100000>;
333333
status = "disabled";
334334
};
335+
336+
timer@01c60000 {
337+
compatible = "allwinner,sun5i-a13-hstimer";
338+
reg = <0x01c60000 0x1000>;
339+
interrupts = <82>, <83>;
340+
clocks = <&ahb_gates 28>;
341+
};
335342
};
336343
};

‎arch/arm/boot/dts/sun5i-a13.dtsi‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,5 +273,12 @@
273273
clock-frequency = <100000>;
274274
status = "disabled";
275275
};
276+
277+
timer@01c60000 {
278+
compatible = "allwinner,sun5i-a13-hstimer";
279+
reg = <0x01c60000 0x1000>;
280+
interrupts = <82>, <83>;
281+
clocks = <&ahb_gates 28>;
282+
};
276283
};
277284
};

‎arch/arm/boot/dts/sun7i-a20.dtsi‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,16 @@
395395
status = "disabled";
396396
};
397397

398+
hstimer@01c60000 {
399+
compatible = "allwinner,sun7i-a20-hstimer";
400+
reg = <0x01c60000 0x1000>;
401+
interrupts = <0 81 1>,
402+
<0 82 1>,
403+
<0 83 1>,
404+
<0 84 1>;
405+
clocks = <&ahb_gates 28>;
406+
};
407+
398408
gic: interrupt-controller@01c81000 {
399409
compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
400410
reg = <0x01c81000 0x1000>,

‎arch/arm/mach-sunxi/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ config ARCH_SUNXI
1212
select PINCTRL_SUNXI
1313
select SPARSE_IRQ
1414
select SUN4I_TIMER
15+
select SUN5I_HSTIMER

‎drivers/clocksource/Kconfig‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ config SUN4I_TIMER
3737
select CLKSRC_MMIO
3838
bool
3939

40+
config SUN5I_HSTIMER
41+
select CLKSRC_MMIO
42+
bool
43+
4044
config VT8500_TIMER
4145
bool
4246

‎drivers/clocksource/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ obj-$(CONFIG_ARCH_MOXART) += moxart_timer.o
2222
obj-$(CONFIG_ARCH_MXS) += mxs_timer.o
2323
obj-$(CONFIG_ARCH_PRIMA2) += timer-prima2.o
2424
obj-$(CONFIG_SUN4I_TIMER) += sun4i_timer.o
25+
obj-$(CONFIG_SUN5I_HSTIMER) += timer-sun5i.o
2526
obj-$(CONFIG_ARCH_TEGRA) += tegra20_timer.o
2627
obj-$(CONFIG_VT8500_TIMER) += vt8500_timer.o
2728
obj-$(CONFIG_ARCH_NSPIRE) += zevio-timer.o

‎drivers/clocksource/arm_global_timer.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static struct clocksource gt_clocksource = {
202202
};
203203

204204
#ifdef CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
205-
static u32 notrace gt_sched_clock_read(void)
205+
static u64 notrace gt_sched_clock_read(void)
206206
{
207207
return gt_counter_read();
208208
}
@@ -217,7 +217,7 @@ static void __init gt_clocksource_init(void)
217217
writel(GT_CONTROL_TIMER_ENABLE, gt_base + GT_CONTROL);
218218

219219
#ifdef CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
220-
setup_sched_clock(gt_sched_clock_read, 32, gt_clk_rate);
220+
sched_clock_register(gt_sched_clock_read, 64, gt_clk_rate);
221221
#endif
222222
clocksource_register_hz(&gt_clocksource, gt_clk_rate);
223223
}

‎drivers/clocksource/bcm_kona_timer.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,6 @@ kona_timer_get_counter(void *timer_base, uint32_t *msw, uint32_t *lsw)
9898
return;
9999
}
100100

101-
static const struct of_device_id bcm_timer_ids[] __initconst = {
102-
{.compatible = "brcm,kona-timer"},
103-
{.compatible = "bcm,kona-timer"}, /* deprecated name */
104-
{},
105-
};
106-
107101
static void __init kona_timers_init(struct device_node *node)
108102
{
109103
u32 freq;

‎drivers/clocksource/cadence_ttc_timer.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static cycle_t __ttc_clocksource_read(struct clocksource *cs)
158158
TTC_COUNT_VAL_OFFSET);
159159
}
160160

161-
static u32 notrace ttc_sched_clock_read(void)
161+
static u64 notrace ttc_sched_clock_read(void)
162162
{
163163
return __raw_readl(ttc_sched_clock_val_reg);
164164
}
@@ -306,7 +306,7 @@ static void __init ttc_setup_clocksource(struct clk *clk, void __iomem *base)
306306
}
307307

308308
ttc_sched_clock_val_reg = base + TTC_COUNT_VAL_OFFSET;
309-
setup_sched_clock(ttc_sched_clock_read, 16,
309+
sched_clock_register(ttc_sched_clock_read, 16,
310310
clk_get_rate(ttccs->ttc.clk) / PRESCALE);
311311
}
312312

@@ -388,8 +388,7 @@ static void __init ttc_setup_clockevent(struct clk *clk,
388388
__raw_writel(0x1, ttcce->ttc.base_addr + TTC_IER_OFFSET);
389389

390390
err = request_irq(irq, ttc_clock_event_interrupt,
391-
IRQF_DISABLED | IRQF_TIMER,
392-
ttcce->ce.name, ttcce);
391+
IRQF_TIMER, ttcce->ce.name, ttcce);
393392
if (WARN_ON(err)) {
394393
kfree(ttcce);
395394
return;

0 commit comments

Comments
 (0)