devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olofj-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org"
	<glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	"linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org"
	<linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
Subject: Re: [RFC 1/2] ARM: Tegra: Device Tree Support: Update how sdhci devices are initialized
Date: Tue, 10 May 2011 15:06:31 -0700	[thread overview]
Message-ID: <BANLkTingm7PCJPC-xCremYg_Ab7qFvPSag@mail.gmail.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF04986AA06A-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2381 bytes --]

On Tue, May 10, 2011 at 3:03 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:

> John Bonesio wrote at Tuesday, May 10, 2011 2:14 PM:
> > This patch changes how sdhci devices are initialized so that a later
> patch can
> > easily add support for i2c devies.
> >
> > Signed-off-by: John Bonesio <bones-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
>
> > @@ -134,6 +57,25 @@ static __initdata struct tegra_clk_init_table
> > tegra_dt_clk_init_table[] = {
> >       { NULL,         NULL,           0,              0},
> >  };
> >
> > +static struct tegra_sdhci_platform_data sdhci_pdata1 = {
> > +     .cd_gpio        = -1,
> > +     .wp_gpio        = -1,
> > +     .power_gpio     = -1,
> > +};
> > +
> > +static struct tegra_sdhci_platform_data sdhci_pdata2 = {
> > +     .cd_gpio        = TEGRA_GPIO_SD2_CD,
> > +     .wp_gpio        = TEGRA_GPIO_SD2_WP,
> > +     .power_gpio     = TEGRA_GPIO_SD2_POWER,
> > +};
> > +
> > +static struct tegra_sdhci_platform_data sdhci_pdata4 = {
> > +     .cd_gpio        = TEGRA_GPIO_SD4_CD,
> > +     .wp_gpio        = TEGRA_GPIO_SD4_WP,
> > +     .power_gpio     = TEGRA_GPIO_SD4_POWER,
> > +     .is_8bit        = 1,
> > +};
> > +
>
> So I understand why board-dt is itself registering the SDHCI platform
> devices itself; so that the pdev initialization path is identical
> between fully hard-coded boards and board-dt.c.
>
> However, I'm surprised that we would include the platform data for
> those devices within that argument; if we do that, we'll end up needing
> different platform data for every board, and devicetree won't have
> bought us anything.
>
> In other words, I understood that board-dt would register all the
> platform devices within Tegra, but not set up any of the plataform
> data, and the device drivers for those devices would be updated to
> get their platform data from devicetree if available, then fall back
> to old-style platform data. In other words, the way the SDHCI drivers
> work today in the devicetree/test branch.
>
> If my understanding is correct, shouldn't the chunk above and the
> one below be removed?
>

That's if we cut everything over, I think. until then, this code should fill
in the platform_device and register it. But the values should come from the
device tree, and it should only register the controllers that are in the
tree (and not marked as disabled).


-Olof

[-- Attachment #1.2: Type: text/html, Size: 3049 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

  parent reply	other threads:[~2011-05-10 22:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10 20:14 [RFC 0/2] Tegra Harmony: Device Tree Initial Steps John Bonesio
2011-05-10 20:14 ` [RFC 1/2] ARM: Tegra: Device Tree Support: Update how sdhci devices are initialized John Bonesio
2011-05-10 22:03   ` Stephen Warren
     [not found]     ` <74CDBE0F657A3D45AFBB94109FB122FF04986AA06A-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-05-10 22:06       ` Olof Johansson [this message]
     [not found]         ` <BANLkTingm7PCJPC-xCremYg_Ab7qFvPSag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-10 22:16           ` Stephen Warren
     [not found]             ` <74CDBE0F657A3D45AFBB94109FB122FF04986AA077-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-05-10 22:33               ` John Bonesio
     [not found]                 ` <4DC9BD39.30108-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
2011-05-10 22:42                   ` Mark Brown
2011-05-10 23:22                   ` Stephen Warren
     [not found]                     ` <74CDBE0F657A3D45AFBB94109FB122FF04986AA0A6-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-05-10 23:33                       ` John Bonesio
     [not found]                         ` <4DC9CB47.9000900-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
2011-05-11  5:01                           ` Stephen Warren
     [not found]                             ` <74CDBE0F657A3D45AFBB94109FB122FF04986AA0E4-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-05-11 17:40                               ` John Bonesio
2011-05-11 18:21                               ` Grant Likely
2011-05-10 20:14 ` [RFC 2/2] ARM: Tegra: Device Tree Support: Add i2c devices John Bonesio
2011-05-10 22:10   ` Stephen Warren
     [not found]     ` <74CDBE0F657A3D45AFBB94109FB122FF04986AA070-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-05-10 22:41       ` John Bonesio

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=BANLkTingm7PCJPC-xCremYg_Ab7qFvPSag@mail.gmail.com \
    --to=olofj-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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).