summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mmp/mfp.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-04-15 22:38:32 +0400
committerArnd Bergmann <arnd@arndb.de>2015-12-01 23:44:30 +0300
commitb501fd7b1c0f10d3967d3abbd6c9d091b3384999 (patch)
tree105508f3767a356ef517360fd0e58eb9d34a1e6f /arch/arm/mach-mmp/mfp.h
parent8bf42cc8888f1475728104d386fc9306b8ef7e3e (diff)
downloadlinux-b501fd7b1c0f10d3967d3abbd6c9d091b3384999.tar.xz
ARM: mmp: make all header files local
The mach/*.h headers are now inaccessible to any external code, so we can move them all into the mach-mmp directory itself and remove the subdirectories. A few headers are not used at all, so we remove them here. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-mmp/mfp.h')
-rw-r--r--arch/arm/mach-mmp/mfp.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/mfp.h b/arch/arm/mach-mmp/mfp.h
new file mode 100644
index 000000000000..62e510e80a58
--- /dev/null
+++ b/arch/arm/mach-mmp/mfp.h
@@ -0,0 +1,34 @@
+#ifndef __ASM_MACH_MFP_H
+#define __ASM_MACH_MFP_H
+
+#include <plat/mfp.h>
+
+/*
+ * NOTE: the MFPR register bit definitions on PXA168 processor lines are a
+ * bit different from those on PXA3xx. Bit [7:10] are now reserved, which
+ * were SLEEP_OE_N, SLEEP_DATA, SLEEP_SEL and the LSB of DRIVE bits.
+ *
+ * To cope with this difference and re-use the pxa3xx mfp code as much as
+ * possible, we make the following compromise:
+ *
+ * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT)
+ * 2. DRIVE strength definitions redefined to include the reserved bit
+ * - the reserved bit differs between pxa168 and pxa910, and the
+ * MFP_DRIVE_* macros are individually defined in mfp-pxa{168,910}.h
+ * 3. Override MFP_CFG() and MFP_CFG_DRV()
+ * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X()
+ */
+
+#undef MFP_CFG
+#undef MFP_CFG_DRV
+#undef MFP_CFG_LPM
+#undef MFP_CFG_X
+#undef MFP_CFG_DEFAULT
+
+#define MFP_CFG(pin, af) \
+ (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
+
+#define MFP_CFG_DRV(pin, af, drv) \
+ (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
+
+#endif /* __ASM_MACH_MFP_H */