From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v4 30/88] ARM: shmobile: armadillo800eva: Register pinctrl mappings for SDHI and MMCIF
Date: Fri, 26 Apr 2013 09:54:13 +0000 [thread overview]
Message-ID: <3296309.YXgKFg3aQu@avalon> (raw)
In-Reply-To: <1363215633-4264-31-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
Hi Guennadi,
On Friday 26 April 2013 09:38:42 Guennadi Liakhovetski wrote:
> Hi Laurent
>
> Maybe we can simplify this a bit by an incremental patch:
>
> On Wed, 13 Mar 2013, Laurent Pinchart wrote:
> > Replace the GPIO-based SDHI and MMCIF pinmux configuration by pinctrl
> > mappings.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> >
> > arch/arm/mach-shmobile/board-armadillo800eva.c | 58 ++++++++++-----------
> > 1 file changed, 25 insertions(+), 33 deletions(-)
> >
> > diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c
> > b/arch/arm/mach-shmobile/board-armadillo800eva.c index aa812cf..04eff93
> > 100644
> > --- a/arch/arm/mach-shmobile/board-armadillo800eva.c
> > +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
> > @@ -657,6 +657,17 @@ static struct platform_device sdhi1_device = {
> > .resource = sdhi1_resources,
> > };
> >
> > +static const struct pinctrl_map eva_sdhi1_pinctrl_map[] = {
> > + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7740",
> > + "sdhi1_data4", "sdhi1"),
> > + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7740",
> > + "sdhi1_ctrl", "sdhi1"),
> > + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7740",
> > + "sdhi1_cd", "sdhi1"),
> > + PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7740",
> > + "sdhi1_wp", "sdhi1"),
> > +};
> > +
> > /* MMCIF */
> > static struct sh_mmcif_plat_data sh_mmcif_plat = {
> > .sup_pclk = 0,
>
> [snip]
>
> > @@ -1124,14 +1122,8 @@ static void __init eva_init(void)
> > /* CON14 enable */
> > } else {
> > /* CON8 (SDHI1) enable */
> > - gpio_request(GPIO_FN_SDHI1_CLK, NULL);
> > - gpio_request(GPIO_FN_SDHI1_CMD, NULL);
> > - gpio_request(GPIO_FN_SDHI1_D0, NULL);
> > - gpio_request(GPIO_FN_SDHI1_D1, NULL);
> > - gpio_request(GPIO_FN_SDHI1_D2, NULL);
> > - gpio_request(GPIO_FN_SDHI1_D3, NULL);
> > - gpio_request(GPIO_FN_SDHI1_CD, NULL);
> > - gpio_request(GPIO_FN_SDHI1_WP, NULL);
> > + pinctrl_register_mappings(eva_sdhi1_pinctrl_map,
> > + ARRAY_SIZE(eva_sdhi1_pinctrl_map));
>
> What if we just add SDHI1 pin mappings in the global array and register
> them together with the rest - it shouldn't hurt, right? They'd only be
> activated if the respective device is probed, and this won't happen unless
> we detect the respective switch position, right? So, we shouldn't need
> this separate map? Yes, I can cook up a patch, just wanted to check with
> you first.
Yes that's a good idea.
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2013-04-26 9:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 22:59 [PATCH v4 30/88] ARM: shmobile: armadillo800eva: Register pinctrl mappings for SDHI and MMCIF Laurent Pinchart
2013-04-26 7:38 ` Guennadi Liakhovetski
2013-04-26 9:54 ` Laurent Pinchart [this message]
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=3296309.YXgKFg3aQu@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-sh@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).