diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-11-10 21:45:43 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-11-11 02:45:35 -0500 |
commit | 9b49139b34a66907662e0be8efe79316dc63f8e0 (patch) | |
tree | 545a6b85d86536e9be40cf80857f9c55de50eef5 /include/linux/sh_pfc.h | |
parent | 972c3fb69cd1cd8d549b8a06ce42611eab405c20 (diff) |
ARM: mach-shmobile: move helper macro PORTCR to sh_pfc.h
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/sh_pfc.h')
-rw-r--r-- | include/linux/sh_pfc.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/sh_pfc.h b/include/linux/sh_pfc.h index 5f6322ac63e7..8446789216e5 100644 --- a/include/linux/sh_pfc.h +++ b/include/linux/sh_pfc.h | |||
@@ -162,5 +162,22 @@ int unregister_pinmux(struct pinmux_info *pip); | |||
162 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ | 162 | PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ |
163 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) | 163 | PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) |
164 | 164 | ||
165 | /* helper macro for top 4 bits in PORTnCR */ | ||
166 | #define _PCRH(in, in_pd, in_pu, out) \ | ||
167 | 0, (out), (in), 0, \ | ||
168 | 0, 0, 0, 0, \ | ||
169 | 0, 0, (in_pd), 0, \ | ||
170 | 0, 0, (in_pu), 0 | ||
171 | |||
172 | #define PORTCR(nr, reg) \ | ||
173 | { \ | ||
174 | PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
175 | _PCRH(PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
176 | PORT##nr##_IN_PU, PORT##nr##_OUT), \ | ||
177 | PORT##nr##_FN0, PORT##nr##_FN1, \ | ||
178 | PORT##nr##_FN2, PORT##nr##_FN3, \ | ||
179 | PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
180 | PORT##nr##_FN6, PORT##nr##_FN7 } \ | ||
181 | } | ||
165 | 182 | ||
166 | #endif /* __SH_PFC_H */ | 183 | #endif /* __SH_PFC_H */ |