summaryrefslogtreecommitdiff
path: root/arch/arm/plat-stmp3xxx/include/mach/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-stmp3xxx/include/mach/platform.h')
-rw-r--r--arch/arm/plat-stmp3xxx/include/mach/platform.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/plat-stmp3xxx/include/mach/platform.h b/arch/arm/plat-stmp3xxx/include/mach/platform.h
index 525c41379bb..7007ddaa91e 100644
--- a/arch/arm/plat-stmp3xxx/include/mach/platform.h
+++ b/arch/arm/plat-stmp3xxx/include/mach/platform.h
@@ -14,6 +14,9 @@
#ifndef __ASM_PLAT_PLATFORM_H
#define __ASM_PLAT_PLATFORM_H
+#ifndef __ASSEMBLER__
+#include <linux/io.h>
+#endif
#include <asm/sizes.h>
/* Virtual address where registers are mapped */
@@ -44,4 +47,22 @@
#define IRQ_PRIORITY_REG_WR HW_ICOLL_INTERRUPTn_WR
#endif
+#define HW_STMP3XXX_SET 0x04
+#define HW_STMP3XXX_CLR 0x08
+#define HW_STMP3XXX_TOG 0x0c
+
+#ifndef __ASSEMBLER__
+static inline void stmp3xxx_clearl(u32 v, void __iomem *r)
+{
+ __raw_writel(v, r + HW_STMP3XXX_CLR);
+}
+
+static inline void stmp3xxx_setl(u32 v, void __iomem *r)
+{
+ __raw_writel(v, r + HW_STMP3XXX_SET);
+}
+#endif
+
+#define BF(value, field) (((value) << BP_##field) & BM_##field)
+
#endif /* __ASM_ARCH_PLATFORM_H */