aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-versatile
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2005-09-28 19:09:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-29 11:46:26 -0400
commit2ad4f86b60b649fd7428265c08d73a3bd360c81b (patch)
tree827d9076685968dc03d4b59d9d419b3f4b188693 /arch/arm/mach-versatile
parent775b048d09c85d87a65a7ccd9c4f9372953a5d95 (diff)
[PATCH] arm/versatile iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 3c8862fde51a..58c1330d8638 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -52,8 +52,9 @@
52 * 52 *
53 * Setup a VA for the Versatile Vectored Interrupt Controller. 53 * Setup a VA for the Versatile Vectored Interrupt Controller.
54 */ 54 */
55#define VA_VIC_BASE IO_ADDRESS(VERSATILE_VIC_BASE) 55#define __io_address(n) __io(IO_ADDRESS(n))
56#define VA_SIC_BASE IO_ADDRESS(VERSATILE_SIC_BASE) 56#define VA_VIC_BASE __io_address(VERSATILE_VIC_BASE)
57#define VA_SIC_BASE __io_address(VERSATILE_SIC_BASE)
57 58
58static void vic_mask_irq(unsigned int irq) 59static void vic_mask_irq(unsigned int irq)
59{ 60{
@@ -214,7 +215,7 @@ void __init versatile_map_io(void)
214 iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc)); 215 iotable_init(versatile_io_desc, ARRAY_SIZE(versatile_io_desc));
215} 216}
216 217
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)
218 219
219/* 220/*
220 * This is the Versatile sched_clock implementation. This has 221 * This is the Versatile sched_clock implementation. This has
@@ -231,7 +232,7 @@ unsigned long long sched_clock(void)
231} 232}
232 233
233 234
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)
235 236
236static int versatile_flash_init(void) 237static int versatile_flash_init(void)
237{ 238{
@@ -309,7 +310,7 @@ static struct platform_device smc91x_device = {
309 .resource = smc91x_resources, 310 .resource = smc91x_resources,
310}; 311};
311 312
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)
313 314
314unsigned int mmc_status(struct device *dev) 315unsigned int mmc_status(struct device *dev)
315{ 316{
@@ -343,11 +344,11 @@ static const struct icst307_params versatile_oscvco_params = {
343 344
344static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) 345static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco)
345{ 346{
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;
347#if defined(CONFIG_ARCH_VERSATILE_PB) 348#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;
349#elif defined(CONFIG_MACH_VERSATILE_AB) 350#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;
351#endif 352#endif
352 u32 val; 353 u32 val;
353 354
@@ -483,7 +484,7 @@ static struct clcd_panel epson_2_2_in = {
483 */ 484 */
484static struct clcd_panel *versatile_clcd_panel(void) 485static struct clcd_panel *versatile_clcd_panel(void)
485{ 486{
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;
487 struct clcd_panel *panel = &vga; 488 struct clcd_panel *panel = &vga;
488 u32 val; 489 u32 val;
489 490
@@ -510,7 +511,7 @@ static struct clcd_panel *versatile_clcd_panel(void)
510 */ 511 */
511static void versatile_clcd_disable(struct clcd_fb *fb) 512static void versatile_clcd_disable(struct clcd_fb *fb)
512{ 513{
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;
514 u32 val; 515 u32 val;
515 516
516 val = readl(sys_clcd); 517 val = readl(sys_clcd);
@@ -522,7 +523,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 523 * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light off
523 */ 524 */
524 if (fb->panel == &sanyo_2_5_in) { 525 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);
526 unsigned long ctrl; 527 unsigned long ctrl;
527 528
528 ctrl = readl(versatile_ib2_ctrl); 529 ctrl = readl(versatile_ib2_ctrl);
@@ -537,7 +538,7 @@ static void versatile_clcd_disable(struct clcd_fb *fb)
537 */ 538 */
538static void versatile_clcd_enable(struct clcd_fb *fb) 539static void versatile_clcd_enable(struct clcd_fb *fb)
539{ 540{
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;
541 u32 val; 542 u32 val;
542 543
543 val = readl(sys_clcd); 544 val = readl(sys_clcd);
@@ -571,7 +572,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 572 * If the LCD is Sanyo 2x5 in on the IB2 board, turn the back-light on
572 */ 573 */
573 if (fb->panel == &sanyo_2_5_in) { 574 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);
575 unsigned long ctrl; 576 unsigned long ctrl;
576 577
577 ctrl = readl(versatile_ib2_ctrl); 578 ctrl = readl(versatile_ib2_ctrl);
@@ -720,7 +721,7 @@ static struct amba_device *amba_devs[] __initdata = {
720}; 721};
721 722
722#ifdef CONFIG_LEDS 723#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)
724 725
725static void versatile_leds_event(led_event_t ledevt) 726static void versatile_leds_event(led_event_t ledevt)
726{ 727{
@@ -778,11 +779,11 @@ void __init versatile_init(void)
778/* 779/*
779 * Where is the timer (VA)? 780 * Where is the timer (VA)?
780 */ 781 */
781#define TIMER0_VA_BASE IO_ADDRESS(VERSATILE_TIMER0_1_BASE) 782#define TIMER0_VA_BASE __io_address(VERSATILE_TIMER0_1_BASE)
782#define TIMER1_VA_BASE (IO_ADDRESS(VERSATILE_TIMER0_1_BASE) + 0x20) 783#define TIMER1_VA_BASE (__io_address(VERSATILE_TIMER0_1_BASE) + 0x20)
783#define TIMER2_VA_BASE IO_ADDRESS(VERSATILE_TIMER2_3_BASE) 784#define TIMER2_VA_BASE __io_address(VERSATILE_TIMER2_3_BASE)
784#define TIMER3_VA_BASE (IO_ADDRESS(VERSATILE_TIMER2_3_BASE) + 0x20) 785#define TIMER3_VA_BASE (__io_address(VERSATILE_TIMER2_3_BASE) + 0x20)
785#define VA_IC_BASE IO_ADDRESS(VERSATILE_VIC_BASE) 786#define VA_IC_BASE __io_address(VERSATILE_VIC_BASE)
786 787
787/* 788/*
788 * How long is the timer interval? 789 * How long is the timer interval?
@@ -877,12 +878,12 @@ static void __init versatile_timer_init(void)
877 * VERSATILE_REFCLK is 32KHz 878 * VERSATILE_REFCLK is 32KHz
878 * VERSATILE_TIMCLK is 1MHz 879 * VERSATILE_TIMCLK is 1MHz
879 */ 880 */
880 val = readl(IO_ADDRESS(VERSATILE_SCTL_BASE)); 881 val = readl(__io_address(VERSATILE_SCTL_BASE));
881 writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | 882 writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) |
882 (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | 883 (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) |
883 (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | 884 (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) |
884 (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val, 885 (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val,
885 IO_ADDRESS(VERSATILE_SCTL_BASE)); 886 __io_address(VERSATILE_SCTL_BASE));
886 887
887 /* 888 /*
888 * Initialise to a known state (all timers off) 889 * Initialise to a known state (all timers off)