Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123922
b: refs/heads/master
c: 24e7857
h: refs/heads/master
v: v3
  • Loading branch information
Uwe Kleine-König committed Dec 9, 2008
1 parent e4889ee commit 02f6abe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9853848860d7ece7d84ac43cfde5390b2638eb89
refs/heads/master: 24e7857677fe3cb87f1dd7fa1418a73795e9f4c5
12 changes: 7 additions & 5 deletions trunk/arch/arm/mach-netx/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <asm/mach/time.h>
#include <mach/netx-regs.h>

#define TIMER_CLOCKSOURCE 1

/*
* IRQ handler for the timer
*/
Expand All @@ -49,7 +51,7 @@ static struct irqaction netx_timer_irq = {

cycle_t netx_get_cycles(void)
{
return readl(NETX_GPIO_COUNTER_CURRENT(1));
return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE));
}

static struct clocksource clocksource_netx = {
Expand Down Expand Up @@ -87,12 +89,12 @@ static void __init netx_timer_init(void)
setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq);

/* Setup timer one for clocksource */
writel(0, NETX_GPIO_COUNTER_CTRL(1));
writel(0, NETX_GPIO_COUNTER_CURRENT(1));
writel(0xffffffff, NETX_GPIO_COUNTER_MAX(1));
writel(0, NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE));
writel(0, NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE));
writel(0xffffffff, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKSOURCE));

writel(NETX_GPIO_COUNTER_CTRL_RUN,
NETX_GPIO_COUNTER_CTRL(1));
NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE));

clocksource_netx.mult =
clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_netx.shift);
Expand Down

0 comments on commit 02f6abe

Please sign in to comment.