[ARM] shark: avoid polluting the kernel's namespace
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Fri, 28 Nov 2008 16:13:44 +0000 (16:13 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 28 Nov 2008 22:08:13 +0000 (22:08 +0000)
Avoid unnecessarily pollution of the kernel's namespace by avoiding
mach/hardware.h in mach/io.h.  Include this header file where necessary.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-shark/core.c
arch/arm/mach-shark/include/mach/hardware.h
arch/arm/mach-shark/include/mach/io.h

index a9400d98445160e9f6b61f9d6efd852373cfe404..a23fd3d0163ac973c360f2875140602b7decd3c6 100644 (file)
@@ -16,6 +16,8 @@
 #include <asm/leds.h>
 #include <asm/param.h>
 
+#include <mach/hardware.h>
+
 #include <asm/mach/map.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
index cb0ee2943c1acb13bbc44cbeefe6303a47e1e998..01bf76099ce5f65525d0ed99ad95227f1d17f94f 100644 (file)
@@ -28,8 +28,6 @@
 #define ROMCARD_SIZE           0x08000000
 #define ROMCARD_START          0x10000000
 
-#define PCIO_BASE              0xe0000000
-
 
 /* defines for the Framebuffer */
 #define FB_START               0x06000000
index 751ab419e4ff4b42e2752a9362d7274dc6780aed..c5cee829fc87e59dd402e797f1242451b248c9a0 100644 (file)
 #ifndef __ASM_ARM_ARCH_IO_H
 #define __ASM_ARM_ARCH_IO_H
 
-#include <mach/hardware.h>
+#define PCIO_BASE      0xe0000000
+#define IO_SPACE_LIMIT 0xffffffff
 
-#define IO_SPACE_LIMIT 0xffffffff
-
-/*
- * We use two different types of addressing - PC style addresses, and ARM
- * addresses.  PC style accesses the PC hardware with the normal PC IO
- * addresses, eg 0x3f8 for serial#1.  ARM addresses are 0x80000000+
- * and are translated to the start of IO.
- */
-#define __PORT_PCIO(x) (!((x) & 0x80000000))
-
-#define __io(a)                 ((void __iomem *)(PCIO_BASE + (a)))
-
-
-static inline unsigned int __ioaddr (unsigned int port)                        \
-{                                                                              \
-       if (__PORT_PCIO(port))                                                  \
-               return (unsigned int)(PCIO_BASE + (port));                      \
-       else                                                                    \
-               return (unsigned int)(IO_BASE + (port));                        \
-}
-
-#define __mem_pci(addr) (addr)
+#define __io(a)                ((void __iomem *)(PCIO_BASE + (a)))
+#define __mem_pci(addr)        (addr)
 
 #endif