Message ID | 1494339117-31221-2-git-send-email-geert+renesas@glider.be (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Geert, On Tue, May 09, 2017 at 04:11:54PM +0200, Geert Uytterhoeven wrote: > On sh7722/Migo-R, pinctrl registration fails with: > > sh-pfc pfc-sh7722: pin 0 already registered > sh-pfc pfc-sh7722: error during pin registration > sh-pfc pfc-sh7722: could not register: -22 > sh-pfc: probe of pfc-sh7722 failed with error -22 > > pinmux_pins[] is initialized through PINMUX_GPIO(), using designated > array initializers, where the GPIO_* enums serve as indices. > As GPIO_PTQ7 is defined in the enum, but never used, pinmux_pins[] > contains a (zero-filled) hole. Hence this entry is treated as pin zero, > which was registered before, and initialization fails. > > According to the datasheet, port PTQ7 does not exist. Hence remove > GPIO_PTQ7 from the enum to fix this. > > Fixes: 8d7b5b0af7e070b9 ("sh: Add sh7722 pinmux code") > Reported-by: Magnus Damm <magnus.damm@gmail.com> > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Thank you j > --- > Tested on sh7722/Migo-R. > --- > arch/sh/include/cpu-sh4/cpu/sh7722.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h > index 3bb74e534d0f8ca4..78961ab78a5a9c83 100644 > --- a/arch/sh/include/cpu-sh4/cpu/sh7722.h > +++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h > @@ -67,7 +67,7 @@ enum { > GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0, > > /* PTQ */ > - GPIO_PTQ7, GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4, > + GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4, > GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0, > > /* PTR */ > -- > 2.7.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7722.h b/arch/sh/include/cpu-sh4/cpu/sh7722.h index 3bb74e534d0f8ca4..78961ab78a5a9c83 100644 --- a/arch/sh/include/cpu-sh4/cpu/sh7722.h +++ b/arch/sh/include/cpu-sh4/cpu/sh7722.h @@ -67,7 +67,7 @@ enum { GPIO_PTN3, GPIO_PTN2, GPIO_PTN1, GPIO_PTN0, /* PTQ */ - GPIO_PTQ7, GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4, + GPIO_PTQ6, GPIO_PTQ5, GPIO_PTQ4, GPIO_PTQ3, GPIO_PTQ2, GPIO_PTQ1, GPIO_PTQ0, /* PTR */
On sh7722/Migo-R, pinctrl registration fails with: sh-pfc pfc-sh7722: pin 0 already registered sh-pfc pfc-sh7722: error during pin registration sh-pfc pfc-sh7722: could not register: -22 sh-pfc: probe of pfc-sh7722 failed with error -22 pinmux_pins[] is initialized through PINMUX_GPIO(), using designated array initializers, where the GPIO_* enums serve as indices. As GPIO_PTQ7 is defined in the enum, but never used, pinmux_pins[] contains a (zero-filled) hole. Hence this entry is treated as pin zero, which was registered before, and initialization fails. According to the datasheet, port PTQ7 does not exist. Hence remove GPIO_PTQ7 from the enum to fix this. Fixes: 8d7b5b0af7e070b9 ("sh: Add sh7722 pinmux code") Reported-by: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- Tested on sh7722/Migo-R. --- arch/sh/include/cpu-sh4/cpu/sh7722.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)