From 9b49139b34a66907662e0be8efe79316dc63f8e0 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 10 Nov 2011 18:45:43 -0800 Subject: ARM: mach-shmobile: move helper macro PORTCR to sh_pfc.h Signed-off-by: Kuninori Morimoto Signed-off-by: Paul Mundt --- include/linux/sh_pfc.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/linux/sh_pfc.h') 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); PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_OUT, \ PORT##nr##_IN, PORT##nr##_IN_PD, PORT##nr##_IN_PU) +/* helper macro for top 4 bits in PORTnCR */ +#define _PCRH(in, in_pd, in_pu, out) \ + 0, (out), (in), 0, \ + 0, 0, 0, 0, \ + 0, 0, (in_pd), 0, \ + 0, 0, (in_pu), 0 + +#define PORTCR(nr, reg) \ + { \ + PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ + _PCRH(PORT##nr##_IN, PORT##nr##_IN_PD, \ + PORT##nr##_IN_PU, PORT##nr##_OUT), \ + PORT##nr##_FN0, PORT##nr##_FN1, \ + PORT##nr##_FN2, PORT##nr##_FN3, \ + PORT##nr##_FN4, PORT##nr##_FN5, \ + PORT##nr##_FN6, PORT##nr##_FN7 } \ + } #endif /* __SH_PFC_H */ -- cgit v1.2.3