From: Tony Lindgren <tony@atomide.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: linus.walleij@stericsson.com, linux-omap@vger.kernel.org,
linaro-dev@lists.linaro.org
Subject: Re: [RFC 1/3] pinctrl: add a driver for the OMAP pinmux
Date: Mon, 14 Nov 2011 09:23:12 -0800 [thread overview]
Message-ID: <20111114172312.GI31337@atomide.com> (raw)
In-Reply-To: <1321274409-24643-2-git-send-email-rnayak@ti.com>
* Rajendra Nayak <rnayak@ti.com> [111114 04:05]:
> --- /dev/null
> +++ b/drivers/pinctrl/pinmux-omap.c
> @@ -0,0 +1,735 @@
> +
> +/* omap4 core pads */
> +static const struct pinctrl_pin_desc omap4_core_pads[] = {
> + PINCTRL_PIN(0, "c12"),
> + PINCTRL_PIN(1, "d12"),
> + PINCTRL_PIN(2, "c13"),
...
Let's not even plan on adding this data here. We already have
about 6000 lines of pinmux data for omaps even without this patch.
Instead, just write something as a separate patch that populates
omap pinmux data from the existing data until we have the data
coming from DT.
> +/* omap4 wkup pads */
> +static const struct pinctrl_pin_desc omap4_wkup_pads[] = {
> + PINCTRL_PIN(0, "c12"),
> + PINCTRL_PIN(1, "d12"),
> + PINCTRL_PIN(2, "c13"),
...
This too needs to go.
> +static const unsigned hdmi_pins[] = {
> + 44, /* HDMI_HPD */
> + 45, /* HDMI_CEC */
> + 46, /* HDMI_DDC_SCL */
> + 47, /* HDMI_DDC_SDA */
> +};
> +
> +static const unsigned hdmi_muxmodes[] = {
> + OMAP_MUX_MODE0,
> + OMAP_MUX_MODE0,
> + OMAP_MUX_MODE0,
> + OMAP_MUX_MODE0,
> +};
> +
> +static const unsigned sdmmc5_pins[] = {
> + 132, /* WLAN SDIO: MMC5 CMD */
> + 133, /* WLAN SDIO: MMC5 CLK */
> + 134, /* WLAN SDIO: MMC5 DAT0 */
> + 135, /* WLAN SDIO: MMC5 DAT1 */
> + 136, /* WLAN SDIO: MMC5 DAT2 */
> + 137, /* WLAN SDIO: MMC5 DAT3 */
> +};
> +
> +static const unsigned sdmmc5_muxmodes[] = {
> + OMAP_MUX_MODE0,
> + OMAP_MUX_MODE0,
> + OMAP_MUX_MODE0,
> + OMAP_MUX_MODE0,
> + OMAP_MUX_MODE0,
> + OMAP_MUX_MODE0,
> +};
> +
> +static const unsigned dispc2_pins[] = {
> + 145, /* dispc2_data23 */
> + 146, /* dispc2_data22 */
> + 147, /* dispc2_data21 */
...
And all of the above.. The same goes for all the static package
specific data.
> +/* handle 8 bit registers too, for now only worry about 16bit ones*/
> +static u16 omap_pmx_read(struct omap_pmx *opmx, unsigned pin)
> +{
> + return __raw_readw(opmx->virtbase + (pin * 2));
> +}
> +
> +static void omap_pmx_write(u16 val, struct omap_pmx *opmx, unsigned pin)
> +{
> + __raw_writew(val, opmx->virtbase + (pin * 2));
> +}
Might as well fix this one since we already have it working.
The rest looks OK to me as a minimal driver. I don't know if
we should still populate it with platform_data though, that
seems already broken as it's omap4 only. Might as well go with
the DT support to start with.
Regards,
Tony
next prev parent reply other threads:[~2011-11-14 17:23 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 12:40 [RFC 0/3] OMAP pinmux driver Rajendra Nayak
2011-11-14 12:40 ` [RFC 1/3] pinctrl: add a driver for the OMAP pinmux Rajendra Nayak
2011-11-14 17:23 ` Tony Lindgren [this message]
2011-11-15 4:33 ` Rajendra Nayak
2011-11-17 8:08 ` Linus Walleij
2011-11-17 11:26 ` Thomas Abraham
2011-11-17 13:57 ` Linus Walleij
[not found] ` <CACRpkdbBQoOU8hyew6tXth3Ohrg5_rN7M+tbVsYFcOjgq73aCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-22 11:09 ` Thomas Abraham
2011-11-22 12:05 ` Linus Walleij
2011-11-22 17:54 ` Tony Lindgren
2011-11-23 0:28 ` Stephen Warren
2011-11-23 10:14 ` Jean-Christophe PLAGNIOL-VILLARD
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF174F08C5B3-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-24 10:09 ` Linus Walleij
2011-11-23 15:21 ` Koen Kooi
2011-11-24 5:07 ` Hiremath, Vaibhav
2011-11-24 10:04 ` Linus Walleij
2011-11-24 19:54 ` Tony Lindgren
2011-11-25 8:53 ` Linus Walleij
2011-11-17 8:20 ` Linus Walleij
2011-11-17 10:50 ` Rajendra Nayak
2011-11-14 12:40 ` [RFC 2/3] ARM: omap4: Add omap4 pinmux devices for core and wkup Rajendra Nayak
2011-11-14 12:40 ` [RFC 3/3] ARM: omap4: Add pinmux map in SDP and PANDA board files Rajendra Nayak
2011-11-17 8:22 ` [RFC 0/3] OMAP pinmux driver Linus Walleij
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=20111114172312.GI31337@atomide.com \
--to=tony@atomide.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linus.walleij@stericsson.com \
--cc=linux-omap@vger.kernel.org \
--cc=rnayak@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox