From b590bc5cd0ced1019f02ca7c9b8594482304987f Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Thu, 27 Mar 2008 14:51:41 -0400 Subject: [PATCH] Orion: move I/O macros out of orion.h 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 Reviewed-by: Tzachi Perelstein Acked-by: Russell King Signed-off-by: Nicolas Pitre --- arch/arm/mach-orion/addr-map.c | 1 + arch/arm/mach-orion/gpio.c | 1 + arch/arm/mach-orion/irq.c | 1 + include/asm-arm/arch-orion/io.h | 15 +++++++++++++++ include/asm-arm/arch-orion/orion.h | 20 +------------------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-orion/addr-map.c b/arch/arm/mach-orion/addr-map.c index ca641db621..ecca987b57 100644 --- a/arch/arm/mach-orion/addr-map.c +++ b/arch/arm/mach-orion/addr-map.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "common.h" /* diff --git a/arch/arm/mach-orion/gpio.c b/arch/arm/mach-orion/gpio.c index f713818c66..5a7d9cc9b8 100644 --- a/arch/arm/mach-orion/gpio.c +++ b/arch/arm/mach-orion/gpio.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "common.h" diff --git a/arch/arm/mach-orion/irq.c b/arch/arm/mach-orion/irq.c index 855793afcc..dc8cb15a81 100644 --- a/arch/arm/mach-orion/irq.c +++ b/arch/arm/mach-orion/irq.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include "common.h" diff --git a/include/asm-arm/arch-orion/io.h b/include/asm-arm/arch-orion/io.h index e0b8c39b91..42abd297ae 100644 --- a/include/asm-arm/arch-orion/io.h +++ b/include/asm-arm/arch-orion/io.h @@ -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 diff --git a/include/asm-arm/arch-orion/orion.h b/include/asm-arm/arch-orion/orion.h index 95f67081bb..d0b32c379a 100644 --- a/include/asm-arm/arch-orion/orion.h +++ b/include/asm-arm/arch-orion/orion.h @@ -156,23 +156,5 @@ #define TIMER_VIRT_BASE (ORION_BRIDGE_VIRT_BASE | 0x300) -#ifndef __ASSEMBLY__ -/******************************************************************************* - * Helpers to access Orion registers - ******************************************************************************/ -#include -#include - -#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 -- 2.39.2