aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinmux-u300.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinmux-u300.c')
-rw-r--r--drivers/pinctrl/pinmux-u300.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinmux-u300.c b/drivers/pinctrl/pinmux-u300.c
index 4858a64131f8..145a84dc16e6 100644
--- a/drivers/pinctrl/pinmux-u300.c
+++ b/drivers/pinctrl/pinmux-u300.c
@@ -940,20 +940,23 @@ static void u300_pmx_endisable(struct u300_pmx *upmx, unsigned selector,
940{ 940{
941 u16 regval, val, mask; 941 u16 regval, val, mask;
942 int i; 942 int i;
943 const struct u300_pmx_mask *upmx_mask;
943 944
945 upmx_mask = u300_pmx_functions[selector].mask;
944 for (i = 0; i < ARRAY_SIZE(u300_pmx_registers); i++) { 946 for (i = 0; i < ARRAY_SIZE(u300_pmx_registers); i++) {
945 if (enable) 947 if (enable)
946 val = u300_pmx_functions[selector].mask->bits; 948 val = upmx_mask->bits;
947 else 949 else
948 val = 0; 950 val = 0;
949 951
950 mask = u300_pmx_functions[selector].mask->mask; 952 mask = upmx_mask->mask;
951 if (mask != 0) { 953 if (mask != 0) {
952 regval = readw(upmx->virtbase + u300_pmx_registers[i]); 954 regval = readw(upmx->virtbase + u300_pmx_registers[i]);
953 regval &= ~mask; 955 regval &= ~mask;
954 regval |= val; 956 regval |= val;
955 writew(regval, upmx->virtbase + u300_pmx_registers[i]); 957 writew(regval, upmx->virtbase + u300_pmx_registers[i]);
956 } 958 }
959 upmx_mask++;
957 } 960 }
958} 961}
959 962