Commit 5d276194 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Linus Walleij

sh-pfc: r8a7740: Fix pin bias setup

When computing the pin configuration register offset the bias setup code
erroneously compares the pin number range with the loop index instead of
the pin number. Fix it.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a9e51fe5
...@@ -3720,7 +3720,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin) ...@@ -3720,7 +3720,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
const struct r8a7740_portcr_group *group = const struct r8a7740_portcr_group *group =
&r8a7740_portcr_offsets[i]; &r8a7740_portcr_offsets[i];
if (i <= group->end_pin) if (pin <= group->end_pin)
return pfc->window->virt + group->offset + pin; return pfc->window->virt + group->offset + pin;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment