5252 *
5353 * Setup a VA for the Versatile Vectored Interrupt Controller.
5454 */
55- #define VA_VIC_BASE IO_ADDRESS(VERSATILE_VIC_BASE)
56- #define VA_SIC_BASE IO_ADDRESS(VERSATILE_SIC_BASE)
55+ #define __io_address (n ) __io(IO_ADDRESS(n))
56+ #define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE)
57+ #define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE)
5758
5859static void vic_mask_irq (unsigned int irq )
5960{
@@ -214,7 +215,7 @@ void __init versatile_map_io(void)
214215 iotable_init (versatile_io_desc , ARRAY_SIZE (versatile_io_desc ));
215216}
216217
217- #define VERSATILE_REFCOUNTER (IO_ADDRESS (VERSATILE_SYS_BASE) + VERSATILE_SYS_24MHz_OFFSET)
218+ #define VERSATILE_REFCOUNTER (__io_address (VERSATILE_SYS_BASE) + VERSATILE_SYS_24MHz_OFFSET)
218219
219220/*
220221 * This is the Versatile sched_clock implementation. This has
@@ -231,7 +232,7 @@ unsigned long long sched_clock(void)
231232}
232233
233234
234- #define VERSATILE_FLASHCTRL (IO_ADDRESS (VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET)
235+ #define VERSATILE_FLASHCTRL (__io_address (VERSATILE_SYS_BASE) + VERSATILE_SYS_FLASH_OFFSET)
235236
236237static int versatile_flash_init (void )
237238{
@@ -309,7 +310,7 @@ static struct platform_device smc91x_device = {
309310 .resource = smc91x_resources ,
310311};
311312
312- #define VERSATILE_SYSMCI (IO_ADDRESS (VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET)
313+ #define VERSATILE_SYSMCI (__io_address (VERSATILE_SYS_BASE) + VERSATILE_SYS_MCI_OFFSET)
313314
314315unsigned int mmc_status (struct device * dev )
315316{
@@ -343,11 +344,11 @@ static const struct icst307_params versatile_oscvco_params = {
343344
344345static void versatile_oscvco_set (struct clk * clk , struct icst307_vco vco )
345346{
346- unsigned long sys_lock = IO_ADDRESS (VERSATILE_SYS_BASE ) + VERSATILE_SYS_LOCK_OFFSET ;
347+ void __iomem * sys_lock = __io_address (VERSATILE_SYS_BASE ) + VERSATILE_SYS_LOCK_OFFSET ;
347348#if defined(CONFIG_ARCH_VERSATILE_PB )
348- unsigned long sys_osc = IO_ADDRESS (VERSATILE_SYS_BASE ) + VERSATILE_SYS_OSC4_OFFSET ;
349+ void __iomem * sys_osc = __io_address (VERSATILE_SYS_BASE ) + VERSATILE_SYS_OSC4_OFFSET ;
349350#elif defined(CONFIG_MACH_VERSATILE_AB )
350- unsigned long sys_osc = IO_ADDRESS (VERSATILE_SYS_BASE ) + VERSATILE_SYS_OSC1_OFFSET ;
351+ void __iomem * sys_osc = __io_address (VERSATILE_SYS_BASE ) + VERSATILE_SYS_OSC1_OFFSET ;
351352#endif
352353 u32 val ;
353354
@@ -483,7 +484,7 @@ static struct clcd_panel epson_2_2_in = {
483484 */
484485static struct clcd_panel * versatile_clcd_panel (void )
485486{
486- unsigned long sys_clcd = IO_ADDRESS (VERSATILE_SYS_BASE ) + VERSATILE_SYS_CLCD_OFFSET ;
487+ void __iomem * sys_clcd = __io_address (VERSATILE_SYS_BASE ) + VERSATILE_SYS_CLCD_OFFSET ;
487488 struct clcd_panel * panel = & vga ;
488489 u32 val ;
489490
@@ -510,7 +511,7 @@ static struct clcd_panel *versatile_clcd_panel(void)
510511 */
511512static void versatile_clcd_disable (struct clcd_fb * fb )
512513{
513- unsigned long sys_clcd = IO_ADDRESS (VERSATILE_SYS_BASE ) + VERSATILE_SYS_CLCD_OFFSET ;
514+ void __iomem * sys_clcd = __io_address (VERSATILE_SYS_BASE ) + VERSATILE_SYS_CLCD_OFFSET ;
514515 u32 val ;
515516
516517 val = readl (sys_clcd );
@@ -522,7 +523,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb)
522523 * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light off
523524 */
524525 if (fb -> panel == & sanyo_2_5_in ) {
525- unsigned long versatile_ib2_ctrl = IO_ADDRESS (VERSATILE_IB2_CTRL );
526+ void __iomem * versatile_ib2_ctrl = __io_address (VERSATILE_IB2_CTRL );
526527 unsigned long ctrl ;
527528
528529 ctrl = readl (versatile_ib2_ctrl );
@@ -537,7 +538,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb)
537538 */
538539static void versatile_clcd_enable (struct clcd_fb * fb )
539540{
540- unsigned long sys_clcd = IO_ADDRESS (VERSATILE_SYS_BASE ) + VERSATILE_SYS_CLCD_OFFSET ;
541+ void __iomem * sys_clcd = __io_address (VERSATILE_SYS_BASE ) + VERSATILE_SYS_CLCD_OFFSET ;
541542 u32 val ;
542543
543544 val = readl (sys_clcd );
@@ -571,7 +572,7 @@ static void versatile_clcd_enable(struct clcd_fb *fb)
571572 * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light on
572573 */
573574 if (fb -> panel == & sanyo_2_5_in ) {
574- unsigned long versatile_ib2_ctrl = IO_ADDRESS (VERSATILE_IB2_CTRL );
575+ void __iomem * versatile_ib2_ctrl = __io_address (VERSATILE_IB2_CTRL );
575576 unsigned long ctrl ;
576577
577578 ctrl = readl (versatile_ib2_ctrl );
@@ -720,7 +721,7 @@ static struct amba_device *amba_devs[] __initdata = {
720721};
721722
722723#ifdef CONFIG_LEDS
723- #define VA_LEDS_BASE (IO_ADDRESS (VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET)
724+ #define VA_LEDS_BASE (__io_address (VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET)
724725
725726static void versatile_leds_event (led_event_t ledevt )
726727{
@@ -778,11 +779,11 @@ void __init versatile_init(void)
778779/*
779780 * Where is the timer (VA)?
780781 */
781- #define TIMER0_VA_BASE IO_ADDRESS (VERSATILE_TIMER0_1_BASE)
782- #define TIMER1_VA_BASE (IO_ADDRESS (VERSATILE_TIMER0_1_BASE) + 0x20)
783- #define TIMER2_VA_BASE IO_ADDRESS (VERSATILE_TIMER2_3_BASE)
784- #define TIMER3_VA_BASE (IO_ADDRESS (VERSATILE_TIMER2_3_BASE) + 0x20)
785- #define VA_IC_BASE IO_ADDRESS (VERSATILE_VIC_BASE)
782+ #define TIMER0_VA_BASE __io_address (VERSATILE_TIMER0_1_BASE)
783+ #define TIMER1_VA_BASE (__io_address (VERSATILE_TIMER0_1_BASE) + 0x20)
784+ #define TIMER2_VA_BASE __io_address (VERSATILE_TIMER2_3_BASE)
785+ #define TIMER3_VA_BASE (__io_address (VERSATILE_TIMER2_3_BASE) + 0x20)
786+ #define VA_IC_BASE __io_address (VERSATILE_VIC_BASE)
786787
787788/*
788789 * How long is the timer interval?
@@ -877,12 +878,12 @@ static void __init versatile_timer_init(void)
877878 * VERSATILE_REFCLK is 32KHz
878879 * VERSATILE_TIMCLK is 1MHz
879880 */
880- val = readl (IO_ADDRESS (VERSATILE_SCTL_BASE ));
881+ val = readl (__io_address (VERSATILE_SCTL_BASE ));
881882 writel ((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel ) |
882883 (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel ) |
883884 (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel ) |
884885 (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel ) | val ,
885- IO_ADDRESS (VERSATILE_SCTL_BASE ));
886+ __io_address (VERSATILE_SCTL_BASE ));
886887
887888 /*
888889 * Initialise to a known state (all timers off)
0 commit comments