aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-versatile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r--arch/arm/mach-versatile/core.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 6a291e6fdabd..a30e0451df72 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -51,8 +51,9 @@
51 * 51 *
52 * Setup a VA for the Versatile Vectored Interrupt Controller. 52 * Setup a VA for the Versatile Vectored Interrupt Controller.
53 */ 53 */
54#define VA_VIC_BASE IO_ADDRESS(VERSATILE_VIC_BASE) 54#define __io_address(n) __io(IO_ADDRESS(n))
55#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)
56 57
57static void vic_mask_irq(unsigned int irq) 58static void vic_mask_irq(unsigned int irq)
58{ 59{
@@ -213,7 +214,7 @@ void __init versatile_map_io(void)
213 iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc)); 214 iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc));
214} 215}
215 216
216#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)
217 218
218/* 219/*
219 * This is the Versatile sched_clock implementation. This has 220 * This is the Versatile sched_clock implementation. This has
@@ -230,7 +231,7 @@ unsigned long long sched_clock(void)
230} 231}
231 232
232 233
233#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)
234 235
235static int versatile_flash_init(void) 236static int versatile_flash_init(void)
236{ 237{
@@ -308,7 +309,7 @@ static struct platform_device smc91x_device = {
308 .resource = smc91x_resources, 309 .resource = smc91x_resources,
309}; 310};
310 311
311#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)
312 313
313unsigned int mmc_status(struct device *dev) 314unsigned int mmc_status(struct device *dev)
314{ 315{
@@ -342,11 +343,11 @@ static const struct icst307_params versatile_oscvco_params = {
342 343
343static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) 344static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco)
344{ 345{
345 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;
346#if defined(CONFIG_ARCH_VERSATILE_PB) 347#if defined(CONFIG_ARCH_VERSATILE_PB)
347 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;
348#elif defined(CONFIG_MACH_VERSATILE_AB) 349#elif defined(CONFIG_MACH_VERSATILE_AB)
349 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;
350#endif 351#endif
351 u32 val; 352 u32 val;
352 353
@@ -482,7 +483,7 @@ static struct clcd_panel epson_2_2_in = {
482 */ 483 */
483static struct clcd_panel *versatile_clcd_panel(void) 484static struct clcd_panel *versatile_clcd_panel(void)
484{ 485{
485 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;
486 struct clcd_panel *panel = &vga; 487 struct clcd_panel *panel = &vga;
487 u32 val; 488 u32 val;
488 489
@@ -509,7 +510,7 @@ static struct clcd_panel *versatile_clcd_panel(void)
509 */ 510 */
510static void versatile_clcd_disable(struct clcd_fb *fb) 511static void versatile_clcd_disable(struct clcd_fb *fb)
511{ 512{
512 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;
513 u32 val; 514 u32 val;
514 515
515 val = readl(sys_clcd); 516 val = readl(sys_clcd);
@@ -521,7 +522,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb)
521 * 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
522 */ 523 */
523 if (fb->panel == &sanyo_2_5_in) { 524 if (fb->panel == &sanyo_2_5_in) {
524 unsigned long versatile_ib2_ctrl = IO_ADDRESS(VERSATILE_IB2_CTRL); 525 void __iomem *versatile_ib2_ctrl = __io_address(VERSATILE_IB2_CTRL);
525 unsigned long ctrl; 526 unsigned long ctrl;
526 527
527 ctrl = readl(versatile_ib2_ctrl); 528 ctrl = readl(versatile_ib2_ctrl);
@@ -536,7 +537,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb)
536 */ 537 */
537static void versatile_clcd_enable(struct clcd_fb *fb) 538static void versatile_clcd_enable(struct clcd_fb *fb)
538{ 539{
539 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;
540 u32 val; 541 u32 val;
541 542
542 val = readl(sys_clcd); 543 val = readl(sys_clcd);
@@ -570,7 +571,7 @@ static void versatile_clcd_enable(struct clcd_fb *fb)
570 * 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
571 */ 572 */
572 if (fb->panel == &sanyo_2_5_in) { 573 if (fb->panel == &sanyo_2_5_in) {
573 unsigned long versatile_ib2_ctrl = IO_ADDRESS(VERSATILE_IB2_CTRL); 574 void __iomem *versatile_ib2_ctrl = __io_address(VERSATILE_IB2_CTRL);
574 unsigned long ctrl; 575 unsigned long ctrl;
575 576
576 ctrl = readl(versatile_ib2_ctrl); 577 ctrl = readl(versatile_ib2_ctrl);
@@ -719,7 +720,7 @@ static struct amba_device *amba_devs[] __initdata = {
719}; 720};
720 721
721#ifdef CONFIG_LEDS 722#ifdef CONFIG_LEDS
722#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)
723 724
724static void versatile_leds_event(led_event_t ledevt) 725static void versatile_leds_event(led_event_t ledevt)
725{ 726{
@@ -777,11 +778,11 @@ void __init versatile_init(void)
777/* 778/*
778 * Where is the timer (VA)? 779 * Where is the timer (VA)?
779 */ 780 */
780#define TIMER0_VA_BASE IO_ADDRESS(VERSATILE_TIMER0_1_BASE) 781#define TIMER0_VA_BASE __io_address(VERSATILE_TIMER0_1_BASE)
781#define TIMER1_VA_BASE (IO_ADDRESS(VERSATILE_TIMER0_1_BASE) + 0x20) 782#define TIMER1_VA_BASE (__io_address(VERSATILE_TIMER0_1_BASE) + 0x20)
782#define TIMER2_VA_BASE IO_ADDRESS(VERSATILE_TIMER2_3_BASE) 783#define TIMER2_VA_BASE __io_address(VERSATILE_TIMER2_3_BASE)
783#define TIMER3_VA_BASE (IO_ADDRESS(VERSATILE_TIMER2_3_BASE) + 0x20) 784#define TIMER3_VA_BASE (__io_address(VERSATILE_TIMER2_3_BASE) + 0x20)
784#define VA_IC_BASE IO_ADDRESS(VERSATILE_VIC_BASE) 785#define VA_IC_BASE __io_address(VERSATILE_VIC_BASE)
785 786
786/* 787/*
787 * How long is the timer interval? 788 * How long is the timer interval?
@@ -876,12 +877,12 @@ static void __init versatile_timer_init(void)
876 * VERSATILE_REFCLK is 32KHz 877 * VERSATILE_REFCLK is 32KHz
877 * VERSATILE_TIMCLK is 1MHz 878 * VERSATILE_TIMCLK is 1MHz
878 */ 879 */
879 val = readl(IO_ADDRESS(VERSATILE_SCTL_BASE)); 880 val = readl(__io_address(VERSATILE_SCTL_BASE));
880 writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | 881 writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) |
881 (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | 882 (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) |
882 (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | 883 (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) |
883 (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val, 884 (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val,
884 IO_ADDRESS(VERSATILE_SCTL_BASE)); 885 __io_address(VERSATILE_SCTL_BASE));
885 886
886 /* 887 /*
887 * Initialise to a known state (all timers off) 888 * Initialise to a known state (all timers off)