diff options
Diffstat (limited to 'arch/arm/mach-realview/core.c')
-rw-r--r-- | arch/arm/mach-realview/core.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index f3cf5712091..131990d196f 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -444,10 +444,10 @@ void realview_leds_event(led_event_t ledevt) | |||
444 | /* | 444 | /* |
445 | * Where is the timer (VA)? | 445 | * Where is the timer (VA)? |
446 | */ | 446 | */ |
447 | #define TIMER0_VA_BASE __io_address(REALVIEW_TIMER0_1_BASE) | 447 | void __iomem *timer0_va_base; |
448 | #define TIMER1_VA_BASE (__io_address(REALVIEW_TIMER0_1_BASE) + 0x20) | 448 | void __iomem *timer1_va_base; |
449 | #define TIMER2_VA_BASE __io_address(REALVIEW_TIMER2_3_BASE) | 449 | void __iomem *timer2_va_base; |
450 | #define TIMER3_VA_BASE (__io_address(REALVIEW_TIMER2_3_BASE) + 0x20) | 450 | void __iomem *timer3_va_base; |
451 | 451 | ||
452 | /* | 452 | /* |
453 | * How long is the timer interval? | 453 | * How long is the timer interval? |
@@ -474,7 +474,7 @@ static void timer_set_mode(enum clock_event_mode mode, | |||
474 | 474 | ||
475 | switch(mode) { | 475 | switch(mode) { |
476 | case CLOCK_EVT_MODE_PERIODIC: | 476 | case CLOCK_EVT_MODE_PERIODIC: |
477 | writel(TIMER_RELOAD, TIMER0_VA_BASE + TIMER_LOAD); | 477 | writel(TIMER_RELOAD, timer0_va_base + TIMER_LOAD); |
478 | 478 | ||
479 | ctrl = TIMER_CTRL_PERIODIC; | 479 | ctrl = TIMER_CTRL_PERIODIC; |
480 | ctrl |= TIMER_CTRL_32BIT | TIMER_CTRL_IE | TIMER_CTRL_ENABLE; | 480 | ctrl |= TIMER_CTRL_32BIT | TIMER_CTRL_IE | TIMER_CTRL_ENABLE; |
@@ -490,16 +490,16 @@ static void timer_set_mode(enum clock_event_mode mode, | |||
490 | ctrl = 0; | 490 | ctrl = 0; |
491 | } | 491 | } |
492 | 492 | ||
493 | writel(ctrl, TIMER0_VA_BASE + TIMER_CTRL); | 493 | writel(ctrl, timer0_va_base + TIMER_CTRL); |
494 | } | 494 | } |
495 | 495 | ||
496 | static int timer_set_next_event(unsigned long evt, | 496 | static int timer_set_next_event(unsigned long evt, |
497 | struct clock_event_device *unused) | 497 | struct clock_event_device *unused) |
498 | { | 498 | { |
499 | unsigned long ctrl = readl(TIMER0_VA_BASE + TIMER_CTRL); | 499 | unsigned long ctrl = readl(timer0_va_base + TIMER_CTRL); |
500 | 500 | ||
501 | writel(evt, TIMER0_VA_BASE + TIMER_LOAD); | 501 | writel(evt, timer0_va_base + TIMER_LOAD); |
502 | writel(ctrl | TIMER_CTRL_ENABLE, TIMER0_VA_BASE + TIMER_CTRL); | 502 | writel(ctrl | TIMER_CTRL_ENABLE, timer0_va_base + TIMER_CTRL); |
503 | 503 | ||
504 | return 0; | 504 | return 0; |
505 | } | 505 | } |
@@ -535,7 +535,7 @@ static irqreturn_t realview_timer_interrupt(int irq, void *dev_id) | |||
535 | struct clock_event_device *evt = &timer0_clockevent; | 535 | struct clock_event_device *evt = &timer0_clockevent; |
536 | 536 | ||
537 | /* clear the interrupt */ | 537 | /* clear the interrupt */ |
538 | writel(1, TIMER0_VA_BASE + TIMER_INTCLR); | 538 | writel(1, timer0_va_base + TIMER_INTCLR); |
539 | 539 | ||
540 | evt->event_handler(evt); | 540 | evt->event_handler(evt); |
541 | 541 | ||
@@ -550,7 +550,7 @@ static struct irqaction realview_timer_irq = { | |||
550 | 550 | ||
551 | static cycle_t realview_get_cycles(void) | 551 | static cycle_t realview_get_cycles(void) |
552 | { | 552 | { |
553 | return ~readl(TIMER3_VA_BASE + TIMER_VALUE); | 553 | return ~readl(timer3_va_base + TIMER_VALUE); |
554 | } | 554 | } |
555 | 555 | ||
556 | static struct clocksource clocksource_realview = { | 556 | static struct clocksource clocksource_realview = { |
@@ -565,11 +565,11 @@ static struct clocksource clocksource_realview = { | |||
565 | static void __init realview_clocksource_init(void) | 565 | static void __init realview_clocksource_init(void) |
566 | { | 566 | { |
567 | /* setup timer 0 as free-running clocksource */ | 567 | /* setup timer 0 as free-running clocksource */ |
568 | writel(0, TIMER3_VA_BASE + TIMER_CTRL); | 568 | writel(0, timer3_va_base + TIMER_CTRL); |
569 | writel(0xffffffff, TIMER3_VA_BASE + TIMER_LOAD); | 569 | writel(0xffffffff, timer3_va_base + TIMER_LOAD); |
570 | writel(0xffffffff, TIMER3_VA_BASE + TIMER_VALUE); | 570 | writel(0xffffffff, timer3_va_base + TIMER_VALUE); |
571 | writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC, | 571 | writel(TIMER_CTRL_32BIT | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC, |
572 | TIMER3_VA_BASE + TIMER_CTRL); | 572 | timer3_va_base + TIMER_CTRL); |
573 | 573 | ||
574 | clocksource_realview.mult = | 574 | clocksource_realview.mult = |
575 | clocksource_khz2mult(1000, clocksource_realview.shift); | 575 | clocksource_khz2mult(1000, clocksource_realview.shift); |
@@ -606,10 +606,10 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
606 | /* | 606 | /* |
607 | * Initialise to a known state (all timers off) | 607 | * Initialise to a known state (all timers off) |
608 | */ | 608 | */ |
609 | writel(0, TIMER0_VA_BASE + TIMER_CTRL); | 609 | writel(0, timer0_va_base + TIMER_CTRL); |
610 | writel(0, TIMER1_VA_BASE + TIMER_CTRL); | 610 | writel(0, timer1_va_base + TIMER_CTRL); |
611 | writel(0, TIMER2_VA_BASE + TIMER_CTRL); | 611 | writel(0, timer2_va_base + TIMER_CTRL); |
612 | writel(0, TIMER3_VA_BASE + TIMER_CTRL); | 612 | writel(0, timer3_va_base + TIMER_CTRL); |
613 | 613 | ||
614 | /* | 614 | /* |
615 | * Make irqs happen for the system timer | 615 | * Make irqs happen for the system timer |