aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/sh-pfc/pfc-r8a73a4.c')
-rw-r--r--drivers/pinctrl/sh-pfc/pfc-r8a73a4.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
index d25fd4ea0a1d..d39ca87353e4 100644
--- a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
+++ b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
@@ -1272,7 +1272,7 @@ static const u16 pinmux_data[] = {
1272#define R8A73A4_PIN_IO_PU_PD(pin) SH_PFC_PIN_CFG(pin, __IO | __PUD) 1272#define R8A73A4_PIN_IO_PU_PD(pin) SH_PFC_PIN_CFG(pin, __IO | __PUD)
1273#define R8A73A4_PIN_O(pin) SH_PFC_PIN_CFG(pin, __O) 1273#define R8A73A4_PIN_O(pin) SH_PFC_PIN_CFG(pin, __O)
1274 1274
1275static struct sh_pfc_pin pinmux_pins[] = { 1275static const struct sh_pfc_pin pinmux_pins[] = {
1276 R8A73A4_PIN_IO_PU_PD(0), R8A73A4_PIN_IO_PU_PD(1), 1276 R8A73A4_PIN_IO_PU_PD(0), R8A73A4_PIN_IO_PU_PD(1),
1277 R8A73A4_PIN_IO_PU_PD(2), R8A73A4_PIN_IO_PU_PD(3), 1277 R8A73A4_PIN_IO_PU_PD(2), R8A73A4_PIN_IO_PU_PD(3),
1278 R8A73A4_PIN_IO_PU_PD(4), R8A73A4_PIN_IO_PU_PD(5), 1278 R8A73A4_PIN_IO_PU_PD(4), R8A73A4_PIN_IO_PU_PD(5),
@@ -2061,17 +2061,6 @@ static const struct sh_pfc_function pinmux_functions[] = {
2061 SH_PFC_FUNCTION(sdhi2), 2061 SH_PFC_FUNCTION(sdhi2),
2062}; 2062};
2063 2063
2064#undef PORTCR
2065#define PORTCR(nr, reg) \
2066 { \
2067 PINMUX_CFG_REG("PORT" nr "CR", reg, 8, 4) { \
2068 _PCRH(PORT##nr##_IN, 0, 0, PORT##nr##_OUT), \
2069 PORT##nr##_FN0, PORT##nr##_FN1, \
2070 PORT##nr##_FN2, PORT##nr##_FN3, \
2071 PORT##nr##_FN4, PORT##nr##_FN5, \
2072 PORT##nr##_FN6, PORT##nr##_FN7 } \
2073 }
2074
2075static const struct pinmux_cfg_reg pinmux_config_regs[] = { 2064static const struct pinmux_cfg_reg pinmux_config_regs[] = {
2076 PORTCR(0, 0xe6050000), 2065 PORTCR(0, 0xe6050000),
2077 PORTCR(1, 0xe6050001), 2066 PORTCR(1, 0xe6050001),
@@ -2691,7 +2680,7 @@ static unsigned int r8a73a4_pinmux_get_bias(struct sh_pfc *pfc,
2691{ 2680{
2692 void __iomem *addr; 2681 void __iomem *addr;
2693 2682
2694 addr = pfc->window->virt + r8a73a4_portcr_offsets[pin >> 5] + pin; 2683 addr = pfc->windows->virt + r8a73a4_portcr_offsets[pin >> 5] + pin;
2695 2684
2696 switch (ioread8(addr) & PORTCR_PULMD_MASK) { 2685 switch (ioread8(addr) & PORTCR_PULMD_MASK) {
2697 case PORTCR_PULMD_UP: 2686 case PORTCR_PULMD_UP:
@@ -2710,7 +2699,7 @@ static void r8a73a4_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
2710 void __iomem *addr; 2699 void __iomem *addr;
2711 u32 value; 2700 u32 value;
2712 2701
2713 addr = pfc->window->virt + r8a73a4_portcr_offsets[pin >> 5] + pin; 2702 addr = pfc->windows->virt + r8a73a4_portcr_offsets[pin >> 5] + pin;
2714 value = ioread8(addr) & ~PORTCR_PULMD_MASK; 2703 value = ioread8(addr) & ~PORTCR_PULMD_MASK;
2715 2704
2716 switch (bias) { 2705 switch (bias) {