Skip to content

Commit b0ec636

Browse files
committed
Merge branch 'timers/clockevents' of git://git.linaro.org/people/dlezcano/clockevents into timers/urgent
* New clocksource drivers for ARM SoCs to share
2 parents a272dcc + c1b40e4 commit b0ec636

6 files changed

Lines changed: 532 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
* ARM Global Timer
3+
Cortex-A9 are often associated with a per-core Global timer.
4+
5+
** Timer node required properties:
6+
7+
- compatible : Should be "arm,cortex-a9-global-timer"
8+
Driver supports versions r2p0 and above.
9+
10+
- interrupts : One interrupt to each core
11+
12+
- reg : Specify the base address and the size of the GT timer
13+
register window.
14+
15+
- clocks : Should be phandle to a clock.
16+
17+
Example:
18+
19+
timer@2c000600 {
20+
compatible = "arm,cortex-a9-global-timer";
21+
reg = <0x2c000600 0x20>;
22+
interrupts = <1 13 0xf01>;
23+
clocks = <&arm_periph_clk>;
24+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Marvell Orion SoC timer
2+
3+
Required properties:
4+
- compatible: shall be "marvell,orion-timer"
5+
- reg: base address of the timer register starting with TIMERS CONTROL register
6+
- interrupt-parent: phandle of the bridge interrupt controller
7+
- interrupts: should contain the interrupts for Timer0 and Timer1
8+
- clocks: phandle of timer reference clock (tclk)
9+
10+
Example:
11+
timer: timer {
12+
compatible = "marvell,orion-timer";
13+
reg = <0x20300 0x20>;
14+
interrupt-parent = <&bridge_intc>;
15+
interrupts = <1>, <2>;
16+
clocks = <&core_clk 0>;
17+
};

‎drivers/clocksource/Kconfig‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ config DW_APB_TIMER_OF
2727
config ARMADA_370_XP_TIMER
2828
bool
2929

30+
config ORION_TIMER
31+
select CLKSRC_OF
32+
select CLKSRC_MMIO
33+
bool
34+
3035
config SUN4I_TIMER
3136
bool
3237

@@ -69,6 +74,19 @@ config ARM_ARCH_TIMER
6974
bool
7075
select CLKSRC_OF if OF
7176

77+
config ARM_GLOBAL_TIMER
78+
bool
79+
select CLKSRC_OF if OF
80+
help
81+
This options enables support for the ARM global timer unit
82+
83+
config CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
84+
bool
85+
depends on ARM_GLOBAL_TIMER
86+
default y
87+
help
88+
Use ARM global timer clock source as sched_clock
89+
7290
config CLKSRC_METAG_GENERIC
7391
def_bool y if METAG
7492
help

‎drivers/clocksource/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
1515
obj-$(CONFIG_CLKSRC_NOMADIK_MTU) += nomadik-mtu.o
1616
obj-$(CONFIG_CLKSRC_DBX500_PRCMU) += clksrc-dbx500-prcmu.o
1717
obj-$(CONFIG_ARMADA_370_XP_TIMER) += time-armada-370-xp.o
18+
obj-$(CONFIG_ORION_TIMER) += time-orion.o
1819
obj-$(CONFIG_ARCH_BCM2835) += bcm2835_timer.o
1920
obj-$(CONFIG_ARCH_MARCO) += timer-marco.o
2021
obj-$(CONFIG_ARCH_MXS) += mxs_timer.o
@@ -30,5 +31,6 @@ obj-$(CONFIG_CLKSRC_SAMSUNG_PWM) += samsung_pwm_timer.o
3031
obj-$(CONFIG_VF_PIT_TIMER) += vf_pit_timer.o
3132

3233
obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o
34+
obj-$(CONFIG_ARM_GLOBAL_TIMER) += arm_global_timer.o
3335
obj-$(CONFIG_CLKSRC_METAG_GENERIC) += metag_generic.o
3436
obj-$(CONFIG_ARCH_HAS_TICK_BROADCAST) += dummy_timer.o

0 commit comments

Comments
 (0)