diff options
Diffstat (limited to 'arch/arm/mach-netx/time.c')
-rw-r--r-- | arch/arm/mach-netx/time.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c index be833bd1048e..34a6a157f355 100644 --- a/arch/arm/mach-netx/time.c +++ b/arch/arm/mach-netx/time.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <asm/mach/time.h> | 27 | #include <asm/mach/time.h> |
28 | #include <mach/netx-regs.h> | 28 | #include <mach/netx-regs.h> |
29 | 29 | ||
30 | #define TIMER_CLOCKSOURCE 1 | ||
31 | |||
30 | /* | 32 | /* |
31 | * IRQ handler for the timer | 33 | * IRQ handler for the timer |
32 | */ | 34 | */ |
@@ -49,7 +51,7 @@ static struct irqaction netx_timer_irq = { | |||
49 | 51 | ||
50 | cycle_t netx_get_cycles(void) | 52 | cycle_t netx_get_cycles(void) |
51 | { | 53 | { |
52 | return readl(NETX_GPIO_COUNTER_CURRENT(1)); | 54 | return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE)); |
53 | } | 55 | } |
54 | 56 | ||
55 | static struct clocksource clocksource_netx = { | 57 | static struct clocksource clocksource_netx = { |
@@ -87,12 +89,12 @@ static void __init netx_timer_init(void) | |||
87 | setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq); | 89 | setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq); |
88 | 90 | ||
89 | /* Setup timer one for clocksource */ | 91 | /* Setup timer one for clocksource */ |
90 | writel(0, NETX_GPIO_COUNTER_CTRL(1)); | 92 | writel(0, NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE)); |
91 | writel(0, NETX_GPIO_COUNTER_CURRENT(1)); | 93 | writel(0, NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE)); |
92 | writel(0xffffffff, NETX_GPIO_COUNTER_MAX(1)); | 94 | writel(0xffffffff, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKSOURCE)); |
93 | 95 | ||
94 | writel(NETX_GPIO_COUNTER_CTRL_RUN, | 96 | writel(NETX_GPIO_COUNTER_CTRL_RUN, |
95 | NETX_GPIO_COUNTER_CTRL(1)); | 97 | NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE)); |
96 | 98 | ||
97 | clocksource_netx.mult = | 99 | clocksource_netx.mult = |
98 | clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_netx.shift); | 100 | clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_netx.shift); |