summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/common.h
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2012-02-11 01:29:09 +0100
committerRob Herring <rob.herring@calxeda.com>2012-03-07 04:34:40 +0100
commit8a52dd4f94abe147bbd4080664817a389c8b6818 (patch)
treeea1410f98400ba20dca0224aaf891f0cf823a06c /arch/arm/mach-orion5x/common.h
parentARM: davinci: remove unneeded mach/io.h include (diff)
downloadlinux-8a52dd4f94abe147bbd4080664817a389c8b6818.tar.xz
linux-8a52dd4f94abe147bbd4080664817a389c8b6818.zip
ARM: orion5x: clean-up mach/io.h
Move orion5x specific mach/io.h parts into common.h. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Cc: Lennert Buytenhek <kernel@wantstofly.org> Acked-by: Nicolas Pitre <nico@linaro.org>
Diffstat (limited to 'arch/arm/mach-orion5x/common.h')
-rw-r--r--arch/arm/mach-orion5x/common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index d2513ac79ff5..2e6454c8d4ba 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -57,5 +57,14 @@ struct meminfo;
struct tag;
extern void __init tag_fixup_mem32(struct tag *, char **, struct meminfo *);
+/*****************************************************************************
+ * Helpers to access Orion registers
+ ****************************************************************************/
+/*
+ * These are not preempt-safe. Locks, if needed, must be taken
+ * care of by the caller.
+ */
+#define orion5x_setbits(r, mask) writel(readl(r) | (mask), (r))
+#define orion5x_clrbits(r, mask) writel(readl(r) & ~(mask), (r))
#endif