public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Stephen Warren <swarren@nvidia.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	Colin Cross <ccross@android.com>, Olof Johansson <olof@lixom.net>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 2/6] arm/tegra: prepare pinmux code for multiple tegra variants
Date: Mon, 31 Oct 2011 11:02:49 +0200	[thread overview]
Message-ID: <20111031090249.GL1001@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF173EDAB4A4@HQMAIL01.nvidia.com>

On Fri, Oct 28, 2011 at 06:18:27PM +0200, Stephen Warren wrote:
> Peter De Schrijver wrote at Friday, October 28, 2011 2:18 AM:
> > On Thu, Oct 27, 2011 at 09:59:49PM +0200, Stephen Warren wrote:
> > > Peter De Schrijver wrote at Tuesday, October 25, 2011 10:54 AM:
> > > > This patch modifies the pinmux code to be useable for multiple tegra variants.
> > > > Some tegra20 specific constants will be replaced by variables which will be
> > > > initialized to the appropriate value at runtime.
> ...
> > > > @@ -668,11 +668,24 @@ void tegra_pinmux_config_pullupdown_table(const struct tegra_pingroup_config *co
> > > >  	}
> > > >  }
> > > >
> > > > +static struct of_device_id tegra_pinmux_of_match[] __devinitdata = {
> > > > +	{ .compatible = "nvidia,tegra20-pinmux", tegra20_pinmux_init },
> > > > +	{ },
> > > > +};
> > > > +
> > > >  static int __devinit tegra_pinmux_probe(struct platform_device *pdev)
> > > >  {
> > > >  	struct resource *res;
> > > >  	int i;
> > > >  	int config_bad = 0;
> > > > +	const struct of_device_id *match;
> > > > +
> > > > +#ifdef CONFIG_OF
> > > > +	match = of_match_device(tegra_pinmux_of_match, &pdev->dev);
> > >
> > > What if match==NULL? I suppose that "can't" happen with DT, since the
> > > device wouldn't have been probed unless there was a matching entry...
> > 
> > Exactly. That was my reasoning as well. We can't get here unless there is a
> > match.
> > 
> > > Does this work when booting without DT; IIRC the internal patches I saw
> > > fell back to hard-coding a call to tegra20_pinmux_init() when booting
> > > a static board file (i.e. not booting device-tree)? Perhaps that's in a
> > 

Indeed. Something went wrong here.

> > Unfortunately I don't have a tegra20 board which is supported without
> > devicetree.
> 
> Oh, that's quite unfortunate. Still, you need to write the code so it's
> expected to work for the non-DT case. Once you've fixed this, if you
> push a complete branch somewhere, I can boot-test it on a few non-DT
> boards. Hopefully I can test on Cardhu too.

I know. But alas I have to base myself on assumptions, which is suboptimal of
course. I will see if I can find a tegra20 board which doesn't require
devicetree here in finland or push a complete branch somewhere.

Cheers,

Peter.

  reply	other threads:[~2011-10-31  9:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-25 16:53 [PATCH 0/6] Add support for tegra30 and cardhu pdeschrijver-DDmLM1+adcrQT0dZR+AlfA
2011-10-25 16:53 ` [PATCH 1/6] arm/tegra: initial device tree for tegra30 pdeschrijver
     [not found]   ` <1319561644-6160-2-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-10-27 19:45     ` Stephen Warren
2011-10-25 16:53 ` [PATCH 2/6] arm/tegra: prepare pinmux code for multiple tegra variants pdeschrijver
     [not found]   ` <1319561644-6160-3-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-10-27 19:59     ` Stephen Warren
     [not found]       ` <74CDBE0F657A3D45AFBB94109FB122FF173E1B49AA-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-10-28  8:17         ` Peter De Schrijver
     [not found]           ` <20111028081738.GA12383-Rysk9IDjsxmJz7etNGeUX8VPkgjIgRvpAL8bYrjMMd8@public.gmane.org>
2011-10-28  9:19             ` Olof Johansson
2011-10-28 16:18           ` Stephen Warren
2011-10-31  9:02             ` Peter De Schrijver [this message]
     [not found] ` <1319561644-6160-1-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-10-25 16:53   ` [PATCH 3/6] arm/tegra: prepare early init " pdeschrijver-DDmLM1+adcrQT0dZR+AlfA
     [not found]     ` <1319561644-6160-4-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-10-27 20:06       ` Stephen Warren
2011-10-27 20:16         ` Russell King - ARM Linux
2011-10-28 16:19           ` Will Deacon
     [not found]             ` <20111028161933.GK23539-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2011-11-01 13:37               ` Peter De Schrijver
     [not found]         ` <74CDBE0F657A3D45AFBB94109FB122FF173E1B49B2-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-01 13:37           ` Peter De Schrijver
2011-10-25 16:53 ` [PATCH 4/6] arm/tegra: implement support for tegra30 pdeschrijver
     [not found]   ` <1319561644-6160-5-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-10-27 20:10     ` Stephen Warren
2011-10-27 20:24       ` Russell King - ARM Linux
2011-10-25 16:53 ` [PATCH 5/6] arm/tegra: pinmux tables and definitions " pdeschrijver
     [not found]   ` <1319561644-6160-6-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-10-27 20:18     ` Stephen Warren
2011-10-25 16:54 ` [PATCH 6/6] arm/tegra: add support for tegra30 based board cardhu pdeschrijver
     [not found]   ` <1319561644-6160-7-git-send-email-pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-10-27 20:22     ` Stephen Warren

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=20111031090249.GL1001@tbergstrom-lnx.Nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=ccross@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --cc=swarren@nvidia.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