Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ARM] Fix arch-realview/system.h to use __io_address()

Move __io_address to arch-realview/hardware.h, drop core.h from platsmp.c
and localtimer.c, and include asm/io.h where required.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Russell King and committed by
Russell King
ce07d90a f6ff56cd

+3 -7
-2
arch/arm/mach-realview/core.h
··· 26 26 #include <asm/leds.h> 27 27 #include <asm/io.h> 28 28 29 - #define __io_address(n) __io(IO_ADDRESS(n)) 30 - 31 29 extern struct sys_timer realview_timer; 32 30 33 31 #define AMBA_DEVICE(name,busid,base,plat) \
-2
arch/arm/mach-realview/localtimer.c
··· 21 21 #include <asm/io.h> 22 22 #include <asm/irq.h> 23 23 24 - #include "core.h" 25 - 26 24 #define TWD_BASE(cpu) (__io_address(REALVIEW_TWD_BASE) + \ 27 25 ((cpu) * REALVIEW_TWD_SIZE)) 28 26
+1 -2
arch/arm/mach-realview/platsmp.c
··· 17 17 #include <asm/cacheflush.h> 18 18 #include <asm/hardware/arm_scu.h> 19 19 #include <asm/hardware.h> 20 - 21 - #include "core.h" 20 + #include <asm/io.h> 22 21 23 22 extern void realview_secondary_startup(void); 24 23
+1
include/asm-arm/arch-realview/hardware.h
··· 27 27 28 28 /* macro to get at IO space when running virtually */ 29 29 #define IO_ADDRESS(x) (((x) & 0x0fffffff) + (((x) >> 4) & 0x0f000000) + 0xf0000000) 30 + #define __io_address(n) __io(IO_ADDRESS(n)) 30 31 31 32 #endif
+1 -1
include/asm-arm/arch-realview/system.h
··· 36 36 37 37 static inline void arch_reset(char mode) 38 38 { 39 - unsigned int hdr_ctrl = (IO_ADDRESS(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET); 39 + void __iomem *hdr_ctrl = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_RESETCTL_OFFSET; 40 40 unsigned int val; 41 41 42 42 /*