Orion: move I/O macros out of orion.h
authorLennert Buytenhek <buytenh@wantstofly.org>
Thu, 27 Mar 2008 18:51:41 +0000 (14:51 -0400)
committerNicolas Pitre <nico@marvell.com>
Thu, 27 Mar 2008 18:51:41 +0000 (14:51 -0400)
Move the Orion register accessor macros out of orion.h, to prevent
them from ending up in the decompressor image (Orion uncompress.h
includes orion.h.)  Move them into io.h, which seems a better place
for this kind of stuff.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Reviewed-by: Tzachi Perelstein <tzachi@marvell.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
arch/arm/mach-orion/addr-map.c
arch/arm/mach-orion/gpio.c
arch/arm/mach-orion/irq.c
include/asm-arm/arch-orion/io.h
include/asm-arm/arch-orion/orion.h

index ca641db6214d90d6a1953b7db5ebe0136abe8a41..ecca987b57e93a243cb66ef68b782f13dacfc1d6 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/mbus.h>
 #include <asm/hardware.h>
+#include <asm/io.h>
 #include "common.h"
 
 /*
index f713818c66a3dd3814f45c44fe31f02fa7e5dc64..5a7d9cc9b8004d4219eedb3919bdcc2085ea94ec 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/spinlock.h>
 #include <linux/bitops.h>
 #include <asm/gpio.h>
+#include <asm/io.h>
 #include <asm/arch/orion.h>
 #include "common.h"
 
index 855793afcca817716cf32b86154f31afbc148d45..dc8cb15a817f748bb5d6f1f191f34b6763634286 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <asm/gpio.h>
+#include <asm/io.h>
 #include <asm/arch/orion.h>
 #include <asm/plat-orion/irq.h>
 #include "common.h"
index e0b8c39b9167cdbc5ac4d4b992455471cccdce29..42abd297ae5fbdd450931386bf3a80d45c6744b7 100644 (file)
@@ -24,4 +24,19 @@ static inline void __iomem *__io(unsigned long addr)
 #define __io(a)                        __io(a)
 #define __mem_pci(a)           (a)
 
+
+/*****************************************************************************
+ * Helpers to access Orion registers
+ ****************************************************************************/
+#define orion_read(r)          __raw_readl(r)
+#define orion_write(r, val)    __raw_writel(val, r)
+
+/*
+ * These are not preempt-safe.  Locks, if needed, must be taken
+ * care of by the caller.
+ */
+#define orion_setbits(r, mask) orion_write((r), orion_read(r) | (mask))
+#define orion_clrbits(r, mask) orion_write((r), orion_read(r) & ~(mask))
+
+
 #endif
index 95f67081bb9c3a1e18b232b7cbd3f279f317dc9f..d0b32c379ae43dd3e977f26a9c2f685c95bec882 100644 (file)
 
 #define TIMER_VIRT_BASE                (ORION_BRIDGE_VIRT_BASE | 0x300)
 
-#ifndef __ASSEMBLY__
 
-/*******************************************************************************
- * Helpers to access Orion registers
- ******************************************************************************/
-#include <asm/types.h>
-#include <asm/io.h>
-
-#define orion_read(r)          __raw_readl(r)
-#define orion_write(r, val)    __raw_writel(val, r)
-
-/*
- * These are not preempt safe. Locks, if needed, must be taken care by caller.
- */
-#define orion_setbits(r, mask) orion_write((r), orion_read(r) | (mask))
-#define orion_clrbits(r, mask) orion_write((r), orion_read(r) & ~(mask))
-
-#endif /* __ASSEMBLY__ */
-
-#endif /* __ASM_ARCH_ORION_H__ */
+#endif