diff options
| -rw-r--r-- | arch/arm/mach-shmobile/pfc-sh7367.c | 16 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/pfc-sh7372.c | 16 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/pfc-sh7377.c | 17 | ||||
| -rw-r--r-- | arch/arm/mach-shmobile/pfc-sh73a0.c | 12 | ||||
| -rw-r--r-- | include/linux/sh_pfc.h | 17 |
5 files changed, 17 insertions, 61 deletions
diff --git a/arch/arm/mach-shmobile/pfc-sh7367.c b/arch/arm/mach-shmobile/pfc-sh7367.c index 32fbf0206b38..e6e524654e67 100644 --- a/arch/arm/mach-shmobile/pfc-sh7367.c +++ b/arch/arm/mach-shmobile/pfc-sh7367.c | |||
| @@ -1287,22 +1287,6 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
| 1287 | GPIO_FN(DIVLOCK), | 1287 | GPIO_FN(DIVLOCK), |
| 1288 | }; | 1288 | }; |
| 1289 | 1289 | ||
| 1290 | /* helper for top 4 bits in PORTnCR */ | ||
| 1291 | #define PCRH(in, in_pd, in_pu, out) \ | ||
| 1292 | 0, (out), (in), 0, \ | ||
| 1293 | 0, 0, 0, 0, \ | ||
| 1294 | 0, 0, (in_pd), 0, \ | ||
| 1295 | 0, 0, (in_pu), 0 | ||
| 1296 | |||
| 1297 | #define PORTCR(nr, reg) \ | ||
| 1298 | { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
| 1299 | PCRH(PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
| 1300 | PORT##nr##_IN_PU, PORT##nr##_OUT), \ | ||
| 1301 | PORT##nr##_FN0, PORT##nr##_FN1, PORT##nr##_FN2, \ | ||
| 1302 | PORT##nr##_FN3, PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
| 1303 | PORT##nr##_FN6, PORT##nr##_FN7 } \ | ||
| 1304 | } | ||
| 1305 | |||
| 1306 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 1290 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |
| 1307 | PORTCR(0, 0xe6050000), /* PORT0CR */ | 1291 | PORTCR(0, 0xe6050000), /* PORT0CR */ |
| 1308 | PORTCR(1, 0xe6050001), /* PORT1CR */ | 1292 | PORTCR(1, 0xe6050001), /* PORT1CR */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh7372.c b/arch/arm/mach-shmobile/pfc-sh7372.c index 4b43626598ca..1bd6585a6acf 100644 --- a/arch/arm/mach-shmobile/pfc-sh7372.c +++ b/arch/arm/mach-shmobile/pfc-sh7372.c | |||
| @@ -1199,22 +1199,6 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
| 1199 | GPIO_FN(SDENC_DV_CLKI), | 1199 | GPIO_FN(SDENC_DV_CLKI), |
| 1200 | }; | 1200 | }; |
| 1201 | 1201 | ||
| 1202 | /* helper for top 4 bits in PORTnCR */ | ||
| 1203 | #define PCRH(in, in_pd, in_pu, out) \ | ||
| 1204 | 0, (out), (in), 0, \ | ||
| 1205 | 0, 0, 0, 0, \ | ||
| 1206 | 0, 0, (in_pd), 0, \ | ||
| 1207 | 0, 0, (in_pu), 0 | ||
| 1208 | |||
| 1209 | #define PORTCR(nr, reg) \ | ||
| 1210 | { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
| 1211 | PCRH(PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
| 1212 | PORT##nr##_IN_PU, PORT##nr##_OUT), \ | ||
| 1213 | PORT##nr##_FN0, PORT##nr##_FN1, PORT##nr##_FN2, \ | ||
| 1214 | PORT##nr##_FN3, PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
| 1215 | PORT##nr##_FN6, PORT##nr##_FN7 } \ | ||
| 1216 | } | ||
| 1217 | |||
| 1218 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 1202 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |
| 1219 | PORTCR(0, 0xE6051000), /* PORT0CR */ | 1203 | PORTCR(0, 0xE6051000), /* PORT0CR */ |
| 1220 | PORTCR(1, 0xE6051001), /* PORT1CR */ | 1204 | PORTCR(1, 0xE6051001), /* PORT1CR */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh7377.c b/arch/arm/mach-shmobile/pfc-sh7377.c index fb3cfd3cff46..2f10511946ad 100644 --- a/arch/arm/mach-shmobile/pfc-sh7377.c +++ b/arch/arm/mach-shmobile/pfc-sh7377.c | |||
| @@ -1300,23 +1300,6 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
| 1300 | GPIO_FN(RESETOUTS), | 1300 | GPIO_FN(RESETOUTS), |
| 1301 | }; | 1301 | }; |
| 1302 | 1302 | ||
| 1303 | /* helper for top 4 bits in PORTnCR */ | ||
| 1304 | #define PCRH(in, in_pd, in_pu, out) \ | ||
| 1305 | 0, (out), (in), 0, \ | ||
| 1306 | 0, 0, 0, 0, \ | ||
| 1307 | 0, 0, (in_pd), 0, \ | ||
| 1308 | 0, 0, (in_pu), 0 | ||
| 1309 | |||
| 1310 | #define PORTCR(nr, reg) \ | ||
| 1311 | { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
| 1312 | PCRH(PORT##nr##_IN, PORT##nr##_IN_PD, \ | ||
| 1313 | PORT##nr##_IN_PU, PORT##nr##_OUT), \ | ||
| 1314 | PORT##nr##_FN0, PORT##nr##_FN1, \ | ||
| 1315 | PORT##nr##_FN2, PORT##nr##_FN3, \ | ||
| 1316 | PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
| 1317 | PORT##nr##_FN6, PORT##nr##_FN7 } \ | ||
| 1318 | } | ||
| 1319 | |||
| 1320 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 1303 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |
| 1321 | PORTCR(0, 0xe6050000), /* PORT0CR */ | 1304 | PORTCR(0, 0xe6050000), /* PORT0CR */ |
| 1322 | PORTCR(1, 0xe6050001), /* PORT1CR */ | 1305 | PORTCR(1, 0xe6050001), /* PORT1CR */ |
diff --git a/arch/arm/mach-shmobile/pfc-sh73a0.c b/arch/arm/mach-shmobile/pfc-sh73a0.c index a1ea11956b15..e05634ce2e0d 100644 --- a/arch/arm/mach-shmobile/pfc-sh73a0.c +++ b/arch/arm/mach-shmobile/pfc-sh73a0.c | |||
| @@ -2221,18 +2221,6 @@ static struct pinmux_gpio pinmux_gpios[] = { | |||
| 2221 | GPIO_FN(FSIAISLD_PU), | 2221 | GPIO_FN(FSIAISLD_PU), |
| 2222 | }; | 2222 | }; |
| 2223 | 2223 | ||
| 2224 | #define PORTCR(nr, reg) \ | ||
| 2225 | { PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \ | ||
| 2226 | 0, \ | ||
| 2227 | /*0001*/ PORT##nr##_OUT , \ | ||
| 2228 | /*0010*/ PORT##nr##_IN , 0, 0, 0, 0, 0, 0, 0, \ | ||
| 2229 | /*1010*/ PORT##nr##_IN_PD, 0, 0, 0, \ | ||
| 2230 | /*1110*/ PORT##nr##_IN_PU, 0, \ | ||
| 2231 | PORT##nr##_FN0, PORT##nr##_FN1, PORT##nr##_FN2, \ | ||
| 2232 | PORT##nr##_FN3, PORT##nr##_FN4, PORT##nr##_FN5, \ | ||
| 2233 | PORT##nr##_FN6, PORT##nr##_FN7, 0, 0, 0, 0, 0, 0, 0, 0 } \ | ||
| 2234 | } | ||
| 2235 | |||
| 2236 | static struct pinmux_cfg_reg pinmux_config_regs[] = { | 2224 | static struct pinmux_cfg_reg pinmux_config_regs[] = { |
| 2237 | PORTCR(0, 0xe6050000), /* PORT0CR */ | 2225 | PORTCR(0, 0xe6050000), /* PORT0CR */ |
| 2238 | PORTCR(1, 0xe6050001), /* PORT1CR */ | 2226 | PORTCR(1, 0xe6050001), /* PORT1CR */ |
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 */ |
