diff options
Diffstat (limited to 'arch/arm/mach-versatile/core.c')
-rw-r--r-- | arch/arm/mach-versatile/core.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 3c8862fde51a..a30e0451df72 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <asm/io.h> | 30 | #include <asm/io.h> |
31 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
32 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
33 | #include <asm/mach-types.h> | ||
34 | #include <asm/hardware/amba.h> | 33 | #include <asm/hardware/amba.h> |
35 | #include <asm/hardware/amba_clcd.h> | 34 | #include <asm/hardware/amba_clcd.h> |
36 | #include <asm/hardware/arm_timer.h> | 35 | #include <asm/hardware/arm_timer.h> |
@@ -52,8 +51,9 @@ | |||
52 | * | 51 | * |
53 | * Setup a VA for the Versatile Vectored Interrupt Controller. | 52 | * Setup a VA for the Versatile Vectored Interrupt Controller. |
54 | */ | 53 | */ |
55 | #define VA_VIC_BASE IO_ADDRESS(VERSATILE_VIC_BASE) | 54 | #define __io_address(n) __io(IO_ADDRESS(n)) |
56 | #define VA_SIC_BASE IO_ADDRESS(VERSATILE_SIC_BASE) | 55 | #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE) |
56 | #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE) | ||
57 | 57 | ||
58 | static void vic_mask_irq(unsigned int irq) | 58 | static void vic_mask_irq(unsigned int irq) |
59 | { | 59 | { |
@@ -214,7 +214,7 @@ void __init versatile_map_io(void) | |||
214 | iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc)); | 214 | iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc)); |
215 | } | 215 | } |
216 | 216 | ||
217 | #define VERSATILE_REFCOUNTER (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_24MHz_OFFSET) | 217 | #define VERSATILE_REFCOUNTER (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_24MHz_OFFSET) |
218 | 218 | ||
219 | /* | 219 | /* |
220 | * This is the Versatile sched_clock implementation. This has | 220 | * This is the Versatile sched_clock implementation. This has |
@@ -231,7 +231,7 @@ unsigned long long sched_clock(void) | |||
231 | } | 231 | } |
232 | 232 | ||
233 | 233 | ||
234 | #define VERSATILE_FLASHCTRL (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET) | 234 | #define VERSATILE_FLASHCTRL (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET) |
235 | 235 | ||
236 | static int versatile_flash_init(void) | 236 | static int versatile_flash_init(void) |
237 | { | 237 | { |
@@ -309,7 +309,7 @@ static struct platform_device smc91x_device = { | |||
309 | .resource = smc91x_resources, | 309 | .resource = smc91x_resources, |
310 | }; | 310 | }; |
311 | 311 | ||
312 | #define VERSATILE_SYSMCI (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET) | 312 | #define VERSATILE_SYSMCI (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET) |
313 | 313 | ||
314 | unsigned int mmc_status(struct device *dev) | 314 | unsigned int mmc_status(struct device *dev) |
315 | { | 315 | { |
@@ -343,11 +343,11 @@ static const struct icst307_params versatile_oscvco_params = { | |||
343 | 343 | ||
344 | static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) | 344 | static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) |
345 | { | 345 | { |
346 | unsigned long sys_lock = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; | 346 | void __iomem *sys_lock = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; |
347 | #if defined(CONFIG_ARCH_VERSATILE_PB) | 347 | #if defined(CONFIG_ARCH_VERSATILE_PB) |
348 | unsigned long sys_osc = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC4_OFFSET; | 348 | void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC4_OFFSET; |
349 | #elif defined(CONFIG_MACH_VERSATILE_AB) | 349 | #elif defined(CONFIG_MACH_VERSATILE_AB) |
350 | unsigned long sys_osc = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC1_OFFSET; | 350 | void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSC1_OFFSET; |
351 | #endif | 351 | #endif |
352 | u32 val; | 352 | u32 val; |
353 | 353 | ||
@@ -483,7 +483,7 @@ static struct clcd_panel epson_2_2_in = { | |||
483 | */ | 483 | */ |
484 | static struct clcd_panel *versatile_clcd_panel(void) | 484 | static struct clcd_panel *versatile_clcd_panel(void) |
485 | { | 485 | { |
486 | unsigned long sys_clcd = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_CLCD_OFFSET; | 486 | void __iomem *sys_clcd = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_CLCD_OFFSET; |
487 | struct clcd_panel *panel = &vga; | 487 | struct clcd_panel *panel = &vga; |
488 | u32 val; | 488 | u32 val; |
489 | 489 | ||
@@ -510,7 +510,7 @@ static struct clcd_panel *versatile_clcd_panel(void) | |||
510 | */ | 510 | */ |
511 | static void versatile_clcd_disable(struct clcd_fb *fb) | 511 | static void versatile_clcd_disable(struct clcd_fb *fb) |
512 | { | 512 | { |
513 | unsigned long sys_clcd = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_CLCD_OFFSET; | 513 | void __iomem *sys_clcd = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_CLCD_OFFSET; |
514 | u32 val; | 514 | u32 val; |
515 | 515 | ||
516 | val = readl(sys_clcd); | 516 | val = readl(sys_clcd); |
@@ -522,7 +522,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb) | |||
522 | * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light off | 522 | * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light off |
523 | */ | 523 | */ |
524 | if (fb->panel == &sanyo_2_5_in) { | 524 | if (fb->panel == &sanyo_2_5_in) { |
525 | unsigned long versatile_ib2_ctrl = IO_ADDRESS(VERSATILE_IB2_CTRL); | 525 | void __iomem *versatile_ib2_ctrl = __io_address(VERSATILE_IB2_CTRL); |
526 | unsigned long ctrl; | 526 | unsigned long ctrl; |
527 | 527 | ||
528 | ctrl = readl(versatile_ib2_ctrl); | 528 | ctrl = readl(versatile_ib2_ctrl); |
@@ -537,7 +537,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb) | |||
537 | */ | 537 | */ |
538 | static void versatile_clcd_enable(struct clcd_fb *fb) | 538 | static void versatile_clcd_enable(struct clcd_fb *fb) |
539 | { | 539 | { |
540 | unsigned long sys_clcd = IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_CLCD_OFFSET; | 540 | void __iomem *sys_clcd = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_CLCD_OFFSET; |
541 | u32 val; | 541 | u32 val; |
542 | 542 | ||
543 | val = readl(sys_clcd); | 543 | val = readl(sys_clcd); |
@@ -571,7 +571,7 @@ static void versatile_clcd_enable(struct clcd_fb *fb) | |||
571 | * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light on | 571 | * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light on |
572 | */ | 572 | */ |
573 | if (fb->panel == &sanyo_2_5_in) { | 573 | if (fb->panel == &sanyo_2_5_in) { |
574 | unsigned long versatile_ib2_ctrl = IO_ADDRESS(VERSATILE_IB2_CTRL); | 574 | void __iomem *versatile_ib2_ctrl = __io_address(VERSATILE_IB2_CTRL); |
575 | unsigned long ctrl; | 575 | unsigned long ctrl; |
576 | 576 | ||
577 | ctrl = readl(versatile_ib2_ctrl); | 577 | ctrl = readl(versatile_ib2_ctrl); |
@@ -720,7 +720,7 @@ static struct amba_device *amba_devs[] __initdata = { | |||
720 | }; | 720 | }; |
721 | 721 | ||
722 | #ifdef CONFIG_LEDS | 722 | #ifdef CONFIG_LEDS |
723 | #define VA_LEDS_BASE (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET) | 723 | #define VA_LEDS_BASE (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET) |
724 | 724 | ||
725 | static void versatile_leds_event(led_event_t ledevt) | 725 | static void versatile_leds_event(led_event_t ledevt) |
726 | { | 726 | { |
@@ -778,11 +778,11 @@ void __init versatile_init(void) | |||
778 | /* | 778 | /* |
779 | * Where is the timer (VA)? | 779 | * Where is the timer (VA)? |
780 | */ | 780 | */ |
781 | #define TIMER0_VA_BASE IO_ADDRESS(VERSATILE_TIMER0_1_BASE) | 781 | #define TIMER0_VA_BASE __io_address(VERSATILE_TIMER0_1_BASE) |
782 | #define TIMER1_VA_BASE (IO_ADDRESS(VERSATILE_TIMER0_1_BASE) + 0x20) | 782 | #define TIMER1_VA_BASE (__io_address(VERSATILE_TIMER0_1_BASE) + 0x20) |
783 | #define TIMER2_VA_BASE IO_ADDRESS(VERSATILE_TIMER2_3_BASE) | 783 | #define TIMER2_VA_BASE __io_address(VERSATILE_TIMER2_3_BASE) |
784 | #define TIMER3_VA_BASE (IO_ADDRESS(VERSATILE_TIMER2_3_BASE) + 0x20) | 784 | #define TIMER3_VA_BASE (__io_address(VERSATILE_TIMER2_3_BASE) + 0x20) |
785 | #define VA_IC_BASE IO_ADDRESS(VERSATILE_VIC_BASE) | 785 | #define VA_IC_BASE __io_address(VERSATILE_VIC_BASE) |
786 | 786 | ||
787 | /* | 787 | /* |
788 | * How long is the timer interval? | 788 | * How long is the timer interval? |
@@ -877,12 +877,12 @@ static void __init versatile_timer_init(void) | |||
877 | * VERSATILE_REFCLK is 32KHz | 877 | * VERSATILE_REFCLK is 32KHz |
878 | * VERSATILE_TIMCLK is 1MHz | 878 | * VERSATILE_TIMCLK is 1MHz |
879 | */ | 879 | */ |
880 | val = readl(IO_ADDRESS(VERSATILE_SCTL_BASE)); | 880 | val = readl(__io_address(VERSATILE_SCTL_BASE)); |
881 | writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | | 881 | writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | |
882 | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | | 882 | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | |
883 | (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | | 883 | (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | |
884 | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val, | 884 | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val, |
885 | IO_ADDRESS(VERSATILE_SCTL_BASE)); | 885 | __io_address(VERSATILE_SCTL_BASE)); |
886 | 886 | ||
887 | /* | 887 | /* |
888 | * Initialise to a known state (all timers off) | 888 | * Initialise to a known state (all timers off) |