From b1a7673ba0654f371ec5b7aaf6b80b22085524c4 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 10 Nov 2011 18:45:43 -0800 Subject: [PATCH] --- yaml --- r: 275453 b: refs/heads/master c: 9b49139b34a66907662e0be8efe79316dc63f8e0 h: refs/heads/master i: 275451: 7d77aec6b166f56d1674a6fd42d2aec6ab5c3be4 v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-shmobile/pfc-sh7367.c | 16 ---------------- trunk/arch/arm/mach-shmobile/pfc-sh7372.c | 16 ---------------- trunk/arch/arm/mach-shmobile/pfc-sh7377.c | 17 ----------------- trunk/arch/arm/mach-shmobile/pfc-sh73a0.c | 12 ------------ trunk/include/linux/sh_pfc.h | 17 +++++++++++++++++ 6 files changed, 18 insertions(+), 62 deletions(-) diff --git a/[refs] b/[refs] index 90152c36b674..efe251d0db5c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 972c3fb69cd1cd8d549b8a06ce42611eab405c20 +refs/heads/master: 9b49139b34a66907662e0be8efe79316dc63f8e0 diff --git a/trunk/arch/arm/mach-shmobile/pfc-sh7367.c b/trunk/arch/arm/mach-shmobile/pfc-sh7367.c index 32fbf0206b38..e6e524654e67 100644 --- a/trunk/arch/arm/mach-shmobile/pfc-sh7367.c +++ b/trunk/arch/arm/mach-shmobile/pfc-sh7367.c @@ -1287,22 +1287,6 @@ static struct pinmux_gpio pinmux_gpios[] = { GPIO_FN(DIVLOCK), }; -/* helper 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 } \ - } - static struct pinmux_cfg_reg pinmux_config_regs[] = { PORTCR(0, 0xe6050000), /* PORT0CR */ PORTCR(1, 0xe6050001), /* PORT1CR */ diff --git a/trunk/arch/arm/mach-shmobile/pfc-sh7372.c b/trunk/arch/arm/mach-shmobile/pfc-sh7372.c index 4b43626598ca..1bd6585a6acf 100644 --- a/trunk/arch/arm/mach-shmobile/pfc-sh7372.c +++ b/trunk/arch/arm/mach-shmobile/pfc-sh7372.c @@ -1199,22 +1199,6 @@ static struct pinmux_gpio pinmux_gpios[] = { GPIO_FN(SDENC_DV_CLKI), }; -/* helper 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 } \ - } - static struct pinmux_cfg_reg pinmux_config_regs[] = { PORTCR(0, 0xE6051000), /* PORT0CR */ PORTCR(1, 0xE6051001), /* PORT1CR */ diff --git a/trunk/arch/arm/mach-shmobile/pfc-sh7377.c b/trunk/arch/arm/mach-shmobile/pfc-sh7377.c index fb3cfd3cff46..2f10511946ad 100644 --- a/trunk/arch/arm/mach-shmobile/pfc-sh7377.c +++ b/trunk/arch/arm/mach-shmobile/pfc-sh7377.c @@ -1300,23 +1300,6 @@ static struct pinmux_gpio pinmux_gpios[] = { GPIO_FN(RESETOUTS), }; -/* helper 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 } \ - } - static struct pinmux_cfg_reg pinmux_config_regs[] = { PORTCR(0, 0xe6050000), /* PORT0CR */ PORTCR(1, 0xe6050001), /* PORT1CR */ diff --git a/trunk/arch/arm/mach-shmobile/pfc-sh73a0.c b/trunk/arch/arm/mach-shmobile/pfc-sh73a0.c index a1ea11956b15..e05634ce2e0d 100644 --- a/trunk/arch/arm/mach-shmobile/pfc-sh73a0.c +++ b/trunk/arch/arm/mach-shmobile/pfc-sh73a0.c @@ -2221,18 +2221,6 @@ static struct pinmux_gpio pinmux_gpios[] = { GPIO_FN(FSIAISLD_PU), }; -#define PORTCR(nr, reg) \ - { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ - 0, \ - /*0001*/ PORT##nr##_OUT , \ - /*0010*/ PORT##nr##_IN , 0, 0, 0, 0, 0, 0, 0, \ - /*1010*/ PORT##nr##_IN_PD, 0, 0, 0, \ - /*1110*/ PORT##nr##_IN_PU, 0, \ - PORT##nr##_FN0, PORT##nr##_FN1, PORT##nr##_FN2, \ - PORT##nr##_FN3, PORT##nr##_FN4, PORT##nr##_FN5, \ - PORT##nr##_FN6, PORT##nr##_FN7, 0, 0, 0, 0, 0, 0, 0, 0 } \ - } - static struct pinmux_cfg_reg pinmux_config_regs[] = { PORTCR(0, 0xe6050000), /* PORT0CR */ PORTCR(1, 0xe6050001), /* PORT1CR */ diff --git a/trunk/include/linux/sh_pfc.h b/trunk/include/linux/sh_pfc.h index 5f6322ac63e7..8446789216e5 100644 --- a/trunk/include/linux/sh_pfc.h +++ b/trunk/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 */