* [PATCH v2 resend 1/4] sh: sh7722: Remove nonexistent GPIO_PTQ7 to fix pinctrl registration
2017-09-12 8:40 [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration Geert Uytterhoeven
@ 2017-09-12 8:40 ` Geert Uytterhoeven
2017-09-12 8:40 ` [PATCH v2 resend 2/4] sh: sh7757: Remove nonexistent GPIO_PT[JLNQ]7_RESV " Geert Uytterhoeven
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2017-09-12 8:40 UTC (permalink / raw)
To: Andrew Morton
Cc: Yoshinori Sato, Rich Felker, Magnus Damm, Laurent Pinchart,
Yoshihiro Shimoda, linux-sh, linux-renesas-soc, linux-gpio,
linux-kernel, Geert Uytterhoeven
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 pinctrl registration 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>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
Tested on sh7722/Migo-R.
v2:
- Add Reviewed-by, Tested-by.
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 resend 2/4] sh: sh7757: Remove nonexistent GPIO_PT[JLNQ]7_RESV to fix pinctrl registration
2017-09-12 8:40 [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration Geert Uytterhoeven
2017-09-12 8:40 ` [PATCH v2 resend 1/4] sh: sh7722: Remove nonexistent GPIO_PTQ7 to fix " Geert Uytterhoeven
@ 2017-09-12 8:40 ` Geert Uytterhoeven
2017-09-12 8:40 ` [PATCH v2 resend 3/4] sh: sh7264: Remove nonexistent GPIO_PH[0-7] " Geert Uytterhoeven
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2017-09-12 8:40 UTC (permalink / raw)
To: Andrew Morton
Cc: Yoshinori Sato, Rich Felker, Magnus Damm, Laurent Pinchart,
Yoshihiro Shimoda, linux-sh, linux-renesas-soc, linux-gpio,
linux-kernel, Geert Uytterhoeven
Commit 3810e96056ffddf6 ("sh: modify pinmux for SH7757 2nd cut") renamed
GPIO_PT[JLNQ]7 to GPIO_PT[JLNQ]7_RESV, and removed the existing users
from the pinmux_pins[] array.
However, pinmux_pins[] is initialized through PINMUX_GPIO(), using
designated array initializers, where the GPIO_* enums serve as indices.
Hence entries were not really removed, but replaced by (zero-filled)
holes. Such entries are treated as pin zero, which was registered
before, thus leading to pinctrl registration failures, as seen on
sh7722:
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
Remove GPIO_PT[JLNQ]7_RESV from the enum to fix this.
Fixes: 3810e96056ffddf6 ("sh: modify pinmux for SH7757 2nd cut")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Untested due to lack of hardware and datasheet.
v2:
- Replace fake error messages by reference to sh7722,
- Add Reviewed-by.
---
arch/sh/include/cpu-sh4/cpu/sh7757.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7757.h b/arch/sh/include/cpu-sh4/cpu/sh7757.h
index 5340f3bc1863c389..b40fb541e72a78ae 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7757.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7757.h
@@ -40,7 +40,7 @@ enum {
/* PTJ */
GPIO_PTJ0, GPIO_PTJ1, GPIO_PTJ2, GPIO_PTJ3,
- GPIO_PTJ4, GPIO_PTJ5, GPIO_PTJ6, GPIO_PTJ7_RESV,
+ GPIO_PTJ4, GPIO_PTJ5, GPIO_PTJ6,
/* PTK */
GPIO_PTK0, GPIO_PTK1, GPIO_PTK2, GPIO_PTK3,
@@ -48,7 +48,7 @@ enum {
/* PTL */
GPIO_PTL0, GPIO_PTL1, GPIO_PTL2, GPIO_PTL3,
- GPIO_PTL4, GPIO_PTL5, GPIO_PTL6, GPIO_PTL7_RESV,
+ GPIO_PTL4, GPIO_PTL5, GPIO_PTL6,
/* PTM */
GPIO_PTM0, GPIO_PTM1, GPIO_PTM2, GPIO_PTM3,
@@ -56,7 +56,7 @@ enum {
/* PTN */
GPIO_PTN0, GPIO_PTN1, GPIO_PTN2, GPIO_PTN3,
- GPIO_PTN4, GPIO_PTN5, GPIO_PTN6, GPIO_PTN7_RESV,
+ GPIO_PTN4, GPIO_PTN5, GPIO_PTN6,
/* PTO */
GPIO_PTO0, GPIO_PTO1, GPIO_PTO2, GPIO_PTO3,
@@ -68,7 +68,7 @@ enum {
/* PTQ */
GPIO_PTQ0, GPIO_PTQ1, GPIO_PTQ2, GPIO_PTQ3,
- GPIO_PTQ4, GPIO_PTQ5, GPIO_PTQ6, GPIO_PTQ7_RESV,
+ GPIO_PTQ4, GPIO_PTQ5, GPIO_PTQ6,
/* PTR */
GPIO_PTR0, GPIO_PTR1, GPIO_PTR2, GPIO_PTR3,
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 resend 3/4] sh: sh7264: Remove nonexistent GPIO_PH[0-7] to fix pinctrl registration
2017-09-12 8:40 [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration Geert Uytterhoeven
2017-09-12 8:40 ` [PATCH v2 resend 1/4] sh: sh7722: Remove nonexistent GPIO_PTQ7 to fix " Geert Uytterhoeven
2017-09-12 8:40 ` [PATCH v2 resend 2/4] sh: sh7757: Remove nonexistent GPIO_PT[JLNQ]7_RESV " Geert Uytterhoeven
@ 2017-09-12 8:40 ` Geert Uytterhoeven
2017-09-12 8:40 ` [PATCH v2 resend 4/4] sh: sh7269: " Geert Uytterhoeven
2017-09-19 8:19 ` [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix " Linus Walleij
4 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2017-09-12 8:40 UTC (permalink / raw)
To: Andrew Morton
Cc: Yoshinori Sato, Rich Felker, Magnus Damm, Laurent Pinchart,
Yoshihiro Shimoda, linux-sh, linux-renesas-soc, linux-gpio,
linux-kernel, Geert Uytterhoeven
Pinmux_pins[] is initialized through PINMUX_GPIO(), using designated
array initializers, where the GPIO_* enums serve as indices.
If enum values are defined, but never used, pinmux_pins[] contains
(zero-filled) holes. Such entries are treated as pin zero, which was
registered before, thus leading to pinctrl registration failures, as
seen on sh7722:
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
Remove GPIO_PH[0-7] from the enum to fix this.
Fixes: 41797f75486d8ca3 ("sh: Add pinmux for sh7264")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Untested due to lack of hardware.
v2:
- Replace fake error messages by reference to sh7722,
- Add Reviewed-by.
---
arch/sh/include/cpu-sh2a/cpu/sh7264.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/sh/include/cpu-sh2a/cpu/sh7264.h b/arch/sh/include/cpu-sh2a/cpu/sh7264.h
index 4d1ef6d74bd6050c..2ae0e938b657a109 100644
--- a/arch/sh/include/cpu-sh2a/cpu/sh7264.h
+++ b/arch/sh/include/cpu-sh2a/cpu/sh7264.h
@@ -43,9 +43,7 @@ enum {
GPIO_PG7, GPIO_PG6, GPIO_PG5, GPIO_PG4,
GPIO_PG3, GPIO_PG2, GPIO_PG1, GPIO_PG0,
- /* Port H */
- GPIO_PH7, GPIO_PH6, GPIO_PH5, GPIO_PH4,
- GPIO_PH3, GPIO_PH2, GPIO_PH1, GPIO_PH0,
+ /* Port H - Port H does not have a Data Register */
/* Port I - not on device */
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 resend 4/4] sh: sh7269: Remove nonexistent GPIO_PH[0-7] to fix pinctrl registration
2017-09-12 8:40 [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration Geert Uytterhoeven
` (2 preceding siblings ...)
2017-09-12 8:40 ` [PATCH v2 resend 3/4] sh: sh7264: Remove nonexistent GPIO_PH[0-7] " Geert Uytterhoeven
@ 2017-09-12 8:40 ` Geert Uytterhoeven
2017-09-19 8:19 ` [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix " Linus Walleij
4 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2017-09-12 8:40 UTC (permalink / raw)
To: Andrew Morton
Cc: Yoshinori Sato, Rich Felker, Magnus Damm, Laurent Pinchart,
Yoshihiro Shimoda, linux-sh, linux-renesas-soc, linux-gpio,
linux-kernel, Geert Uytterhoeven
Pinmux_pins[] is initialized through PINMUX_GPIO(), using designated
array initializers, where the GPIO_* enums serve as indices.
If enum values are defined, but never used, pinmux_pins[] contains
(zero-filled) holes. Such entries are treated as pin zero, which was
registered before, thus leading to pinctrl registration failures, as
seen on sh7722:
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
Remove GPIO_PH[0-7] from the enum to fix this.
Fixes: ef0fa5331a73e479 ("sh: Add pinmux for sh7269")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Untested due to lack of hardware.
v2:
- Replace fake error messages by reference to sh7722,
- Add Reviewed-by.
---
arch/sh/include/cpu-sh2a/cpu/sh7269.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/sh/include/cpu-sh2a/cpu/sh7269.h b/arch/sh/include/cpu-sh2a/cpu/sh7269.h
index 2a0ca8780f0d8c34..13c495a9fc0007b4 100644
--- a/arch/sh/include/cpu-sh2a/cpu/sh7269.h
+++ b/arch/sh/include/cpu-sh2a/cpu/sh7269.h
@@ -45,9 +45,7 @@ enum {
GPIO_PG7, GPIO_PG6, GPIO_PG5, GPIO_PG4,
GPIO_PG3, GPIO_PG2, GPIO_PG1, GPIO_PG0,
- /* Port H */
- GPIO_PH7, GPIO_PH6, GPIO_PH5, GPIO_PH4,
- GPIO_PH3, GPIO_PH2, GPIO_PH1, GPIO_PH0,
+ /* Port H - Port H does not have a Data Register */
/* Port I - not on device */
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration
2017-09-12 8:40 [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration Geert Uytterhoeven
` (3 preceding siblings ...)
2017-09-12 8:40 ` [PATCH v2 resend 4/4] sh: sh7269: " Geert Uytterhoeven
@ 2017-09-19 8:19 ` Linus Walleij
2017-09-19 8:31 ` Geert Uytterhoeven
4 siblings, 1 reply; 7+ messages in thread
From: Linus Walleij @ 2017-09-19 8:19 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Andrew Morton, Yoshinori Sato, Rich Felker, Magnus Damm,
Laurent Pinchart, Yoshihiro Shimoda, linux-sh@vger.kernel.org,
Linux-Renesas, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
On Tue, Sep 12, 2017 at 10:40 AM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> Hi Andrew,
>
> I'm resending this to you due to unresponsiveness from the SuperH
> maintainers (v2 sent before on May 11, pinged on June 30 and August 14).
I'm happy to take this into the pinctrl tree if need be.
It is pinctrl related so it makes sense to carry it there if SH
maintainers are not responding.
Just send a separate pull request and indicate if it needs to
go in for fixes or devel.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix pinctrl registration
2017-09-19 8:19 ` [PATCH v2 resend 0/4] sh: sh7722/sh7757i/sh7264/sh7269: Fix " Linus Walleij
@ 2017-09-19 8:31 ` Geert Uytterhoeven
0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2017-09-19 8:31 UTC (permalink / raw)
To: Linus Walleij
Cc: Geert Uytterhoeven, Andrew Morton, Yoshinori Sato, Rich Felker,
Magnus Damm, Laurent Pinchart, Yoshihiro Shimoda,
linux-sh@vger.kernel.org, Linux-Renesas,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Hi Linus,
On Tue, Sep 19, 2017 at 10:19 AM, Linus Walleij
<linus.walleij@linaro.org> wrote:
> On Tue, Sep 12, 2017 at 10:40 AM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
>> I'm resending this to you due to unresponsiveness from the SuperH
>> maintainers (v2 sent before on May 11, pinged on June 30 and August 14).
>
> I'm happy to take this into the pinctrl tree if need be.
>
> It is pinctrl related so it makes sense to carry it there if SH
> maintainers are not responding.
>
> Just send a separate pull request and indicate if it needs to
> go in for fixes or devel.
In the mean time, Andrew took it (thanks!), so it's now in linux-next.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread