From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: linus.walleij@linaro.org, linux-sh@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3 1/3] sh-pfc: fix sparse GPIOs for R-Car SoCs
Date: Tue, 07 Jul 2015 20:39:42 +0300 [thread overview]
Message-ID: <1756227.uoeezymTmX@avalon> (raw)
In-Reply-To: <2925145.E3lLFJfWJW@wasted.cogentembedded.com>
Hi Sergei,
Thank you for the patch.
On Friday 26 June 2015 01:40:56 Sergei Shtylyov wrote:
> The PFC driver causes the kernel to hang on the R-Car gen2 SoC based boards
> when the CPU_ALL_PORT() macro is fixed to reflect the reality, i.e. when
> the GPIO space becomes actually sparse. This happens because the
> _GP_GPIO() macro includes an indexed initializer which causes the "holes"
> (array entries filled with all 0s) between the groups of the existing
> GPIOs; and the driver can't cope with that. There seems to be no reason
> to use the indexed initializer, so we can remove the index specifier and so
> avoid the "holes".
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
I initially thought that this patch looked too good to be true. The fix is so
simple, there must have been a reason why _GP_GPIO used indexed initializers.
I then tried to find that reason and failed.
I still feel that this is too simple to be true, but I have no objective
reason to push back, so
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
for the whole series, provided you have tested it, and paid attention to pins
after the holes.
> ---
> Changes in version 3:
> - new patch.
>
> drivers/pinctrl/sh-pfc/sh_pfc.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-pinctrl/drivers/pinctrl/sh-pfc/sh_pfc.h
> ===================================================================
> --- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/sh_pfc.h
> +++ linux-pinctrl/drivers/pinctrl/sh-pfc/sh_pfc.h
> @@ -224,7 +224,7 @@ struct sh_pfc_soc_info {
>
> /* PINMUX_GPIO_GP_ALL - Expand to a list of sh_pfc_pin entries */
> #define _GP_GPIO(bank, _pin, _name, sfx) \
> - [(bank * 32) + _pin] = { \
> + { \
> .pin = (bank * 32) + _pin, \
> .name = __stringify(_name), \
> .enum_id = _name##_DATA, \
--
Regards,
Laurent Pinchart
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: linus.walleij@linaro.org, linux-sh@vger.kernel.org,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3 1/3] sh-pfc: fix sparse GPIOs for R-Car SoCs
Date: Tue, 07 Jul 2015 17:39:42 +0000 [thread overview]
Message-ID: <1756227.uoeezymTmX@avalon> (raw)
In-Reply-To: <2925145.E3lLFJfWJW@wasted.cogentembedded.com>
Hi Sergei,
Thank you for the patch.
On Friday 26 June 2015 01:40:56 Sergei Shtylyov wrote:
> The PFC driver causes the kernel to hang on the R-Car gen2 SoC based boards
> when the CPU_ALL_PORT() macro is fixed to reflect the reality, i.e. when
> the GPIO space becomes actually sparse. This happens because the
> _GP_GPIO() macro includes an indexed initializer which causes the "holes"
> (array entries filled with all 0s) between the groups of the existing
> GPIOs; and the driver can't cope with that. There seems to be no reason
> to use the indexed initializer, so we can remove the index specifier and so
> avoid the "holes".
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
I initially thought that this patch looked too good to be true. The fix is so
simple, there must have been a reason why _GP_GPIO used indexed initializers.
I then tried to find that reason and failed.
I still feel that this is too simple to be true, but I have no objective
reason to push back, so
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
for the whole series, provided you have tested it, and paid attention to pins
after the holes.
> ---
> Changes in version 3:
> - new patch.
>
> drivers/pinctrl/sh-pfc/sh_pfc.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-pinctrl/drivers/pinctrl/sh-pfc/sh_pfc.h
> =================================> --- linux-pinctrl.orig/drivers/pinctrl/sh-pfc/sh_pfc.h
> +++ linux-pinctrl/drivers/pinctrl/sh-pfc/sh_pfc.h
> @@ -224,7 +224,7 @@ struct sh_pfc_soc_info {
>
> /* PINMUX_GPIO_GP_ALL - Expand to a list of sh_pfc_pin entries */
> #define _GP_GPIO(bank, _pin, _name, sfx) \
> - [(bank * 32) + _pin] = { \
> + { \
> .pin = (bank * 32) + _pin, \
> .name = __stringify(_name), \
> .enum_id = _name##_DATA, \
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2015-07-07 17:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 22:39 [PATCH v3 0/3] Remove non-existing GPIO pins for R8A7790/1 Sergei Shtylyov
2015-06-25 22:39 ` Sergei Shtylyov
2015-06-25 22:40 ` [PATCH v3 1/3] sh-pfc: fix sparse GPIOs for R-Car SoCs Sergei Shtylyov
2015-06-25 22:40 ` Sergei Shtylyov
2015-07-07 17:39 ` Laurent Pinchart [this message]
2015-07-07 17:39 ` Laurent Pinchart
2015-07-08 7:37 ` Geert Uytterhoeven
2015-07-08 7:37 ` Geert Uytterhoeven
2015-07-13 20:29 ` Linus Walleij
2015-07-13 20:29 ` Linus Walleij
2015-06-25 22:42 ` [PATCH v3 2/3] sh-pfc: r8a7790: remove non-existing GPIO pins Sergei Shtylyov
2015-06-25 22:42 ` Sergei Shtylyov
2015-07-13 20:30 ` Linus Walleij
2015-07-13 20:30 ` Linus Walleij
2015-06-25 22:43 ` [PATCH v3 3/3] sh-pfc: r8a7791: " Sergei Shtylyov
2015-06-25 22:43 ` Sergei Shtylyov
2015-07-08 7:38 ` Geert Uytterhoeven
2015-07-08 7:38 ` Geert Uytterhoeven
2015-07-13 20:32 ` Linus Walleij
2015-07-13 20:32 ` Linus Walleij
2015-06-26 20:51 ` [PATCH v3 0/3] Remove non-existing GPIO pins for R8A7790/1 Sergei Shtylyov
2015-06-26 20:51 ` Sergei Shtylyov
2015-06-29 10:43 ` Linus Walleij
2015-06-29 10:43 ` Linus Walleij
2015-07-03 23:29 ` Laurent Pinchart
2015-07-03 23:29 ` Laurent Pinchart
2015-07-07 20:58 ` Laurent Pinchart
2015-07-07 20:58 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1756227.uoeezymTmX@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.