Commit 640c0f5c authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Ingo Molnar:
 "Three clockevents/clocksource driver fixes"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  clocksource: pxa: Fix section mismatch
  clocksource: mtk: Fix race conditions in probe code
  clockevents: asm9260: Fix compilation error with sparc/sparc64 allyesconfig
parents d7b48fec e3eff6fe
...@@ -2,5 +2,7 @@ config MACH_ASM9260 ...@@ -2,5 +2,7 @@ config MACH_ASM9260
bool "Alphascale ASM9260" bool "Alphascale ASM9260"
depends on ARCH_MULTI_V5 depends on ARCH_MULTI_V5
select CPU_ARM926T select CPU_ARM926T
select ASM9260_TIMER
select GENERIC_CLOCKEVENTS
help help
Support for Alphascale ASM9260 based platform. Support for Alphascale ASM9260 based platform.
...@@ -63,6 +63,11 @@ config VT8500_TIMER ...@@ -63,6 +63,11 @@ config VT8500_TIMER
config CADENCE_TTC_TIMER config CADENCE_TTC_TIMER
bool bool
config ASM9260_TIMER
bool
select CLKSRC_MMIO
select CLKSRC_OF
config CLKSRC_NOMADIK_MTU config CLKSRC_NOMADIK_MTU
bool bool
depends on (ARCH_NOMADIK || ARCH_U8500) depends on (ARCH_NOMADIK || ARCH_U8500)
...@@ -245,15 +250,4 @@ config CLKSRC_PXA ...@@ -245,15 +250,4 @@ config CLKSRC_PXA
help help
This enables OST0 support available on PXA and SA-11x0 This enables OST0 support available on PXA and SA-11x0
platforms. platforms.
config ASM9260_TIMER
bool "Alphascale ASM9260 timer driver"
depends on GENERIC_CLOCKEVENTS
select CLKSRC_MMIO
select CLKSRC_OF
default y if MACH_ASM9260
help
This enables build of a clocksource and clockevent driver for
the 32-bit System Timer hardware available on a Alphascale ASM9260.
endmenu endmenu
...@@ -224,6 +224,8 @@ static void __init mtk_timer_init(struct device_node *node) ...@@ -224,6 +224,8 @@ static void __init mtk_timer_init(struct device_node *node)
} }
rate = clk_get_rate(clk); rate = clk_get_rate(clk);
mtk_timer_global_reset(evt);
if (request_irq(evt->dev.irq, mtk_timer_interrupt, if (request_irq(evt->dev.irq, mtk_timer_interrupt,
IRQF_TIMER | IRQF_IRQPOLL, "mtk_timer", evt)) { IRQF_TIMER | IRQF_IRQPOLL, "mtk_timer", evt)) {
pr_warn("failed to setup irq %d\n", evt->dev.irq); pr_warn("failed to setup irq %d\n", evt->dev.irq);
...@@ -232,8 +234,6 @@ static void __init mtk_timer_init(struct device_node *node) ...@@ -232,8 +234,6 @@ static void __init mtk_timer_init(struct device_node *node)
evt->ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); evt->ticks_per_jiffy = DIV_ROUND_UP(rate, HZ);
mtk_timer_global_reset(evt);
/* Configure clock source */ /* Configure clock source */
mtk_timer_setup(evt, GPT_CLK_SRC, TIMER_CTRL_OP_FREERUN); mtk_timer_setup(evt, GPT_CLK_SRC, TIMER_CTRL_OP_FREERUN);
clocksource_mmio_init(evt->gpt_base + TIMER_CNT_REG(GPT_CLK_SRC), clocksource_mmio_init(evt->gpt_base + TIMER_CNT_REG(GPT_CLK_SRC),
...@@ -241,10 +241,11 @@ static void __init mtk_timer_init(struct device_node *node) ...@@ -241,10 +241,11 @@ static void __init mtk_timer_init(struct device_node *node)
/* Configure clock event */ /* Configure clock event */
mtk_timer_setup(evt, GPT_CLK_EVT, TIMER_CTRL_OP_REPEAT); mtk_timer_setup(evt, GPT_CLK_EVT, TIMER_CTRL_OP_REPEAT);
mtk_timer_enable_irq(evt, GPT_CLK_EVT);
clockevents_config_and_register(&evt->dev, rate, 0x3, clockevents_config_and_register(&evt->dev, rate, 0x3,
0xffffffff); 0xffffffff);
mtk_timer_enable_irq(evt, GPT_CLK_EVT);
return; return;
err_clk_disable: err_clk_disable:
......
...@@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = { ...@@ -163,7 +163,7 @@ static struct irqaction pxa_ost0_irq = {
.dev_id = &ckevt_pxa_osmr0, .dev_id = &ckevt_pxa_osmr0,
}; };
static void pxa_timer_common_init(int irq, unsigned long clock_tick_rate) static void __init pxa_timer_common_init(int irq, unsigned long clock_tick_rate)
{ {
timer_writel(0, OIER); timer_writel(0, OIER);
timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR); timer_writel(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment