* [PATCH] mmc: tegra: convert to device tree support only
@ 2012-08-17 7:04 Joseph Lo
[not found] ` <1345187071-6619-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Joseph Lo @ 2012-08-17 7:04 UTC (permalink / raw)
To: Chris Ball, Stephen Warren
Cc: Olof Johansson, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, Joseph Lo
When compiling a kernel that supports only Tegra30 and not Tegra20,
the SDHCI driver will fail to compile since the of_match_device() failure
fallback code unconditinally references soc_data_tegra20, which is only
compiled in when Tegra20 support is enabled.
In Kernel 3.7, both Tegra20 and Tegra30 will only support booting using
device tree, Hence, there is never a need to fall back to using
soc_data_tegra20 if of_mach_device() fails. Instead, make this case an
error. This removes the reference to soc_data_tegra20, and hence solves
the compile failure.
Signed-off-by: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/mmc/host/sdhci-tegra.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 0810ccc..436186c 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -257,10 +257,9 @@ static int __devinit sdhci_tegra_probe(struct platform_device *pdev)
int rc;
match = of_match_device(sdhci_tegra_dt_match, &pdev->dev);
- if (match)
- soc_data = match->data;
- else
- soc_data = &soc_data_tegra20;
+ if (!match)
+ return -EINVAL;
+ soc_data = match->data;
host = sdhci_pltfm_init(pdev, soc_data->pdata);
if (IS_ERR(host))
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: tegra: convert to device tree support only
[not found] ` <1345187071-6619-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2012-08-17 19:01 ` Stephen Warren
2012-08-24 1:40 ` Joseph Lo
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2012-08-17 19:01 UTC (permalink / raw)
To: Chris Ball
Cc: Joseph Lo, Olof Johansson, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-mmc-u79uwXL29TY76Z2rM5mHXA
On 08/17/2012 01:04 AM, Joseph Lo wrote:
> When compiling a kernel that supports only Tegra30 and not Tegra20,
> the SDHCI driver will fail to compile since the of_match_device() failure
> fallback code unconditinally references soc_data_tegra20, which is only
> compiled in when Tegra20 support is enabled.
>
> In Kernel 3.7, both Tegra20 and Tegra30 will only support booting using
> device tree, Hence, there is never a need to fall back to using
> soc_data_tegra20 if of_mach_device() fails. Instead, make this case an
> error. This removes the reference to soc_data_tegra20, and hence solves
> the compile failure.
Tested-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
(built and tested both Tegra20-only and Tegr30-only kernels with this
applied on top of next-20120816).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: tegra: convert to device tree support only
2012-08-17 19:01 ` Stephen Warren
@ 2012-08-24 1:40 ` Joseph Lo
[not found] ` <1345772433.5081.1.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Joseph Lo @ 2012-08-24 1:40 UTC (permalink / raw)
To: Stephen Warren
Cc: Chris Ball, Olof Johansson, linux-tegra@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org
On Sat, 2012-08-18 at 03:01 +0800, Stephen Warren wrote:
> On 08/17/2012 01:04 AM, Joseph Lo wrote:
> > When compiling a kernel that supports only Tegra30 and not Tegra20,
> > the SDHCI driver will fail to compile since the of_match_device() failure
> > fallback code unconditinally references soc_data_tegra20, which is only
> > compiled in when Tegra20 support is enabled.
> >
> > In Kernel 3.7, both Tegra20 and Tegra30 will only support booting using
> > device tree, Hence, there is never a need to fall back to using
> > soc_data_tegra20 if of_mach_device() fails. Instead, make this case an
> > error. This removes the reference to soc_data_tegra20, and hence solves
> > the compile failure.
>
> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
>
> (built and tested both Tegra20-only and Tegr30-only kernels with this
> applied on top of next-20120816).
Ping.
Could anyone help to review this?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmc: tegra: convert to device tree support only
[not found] ` <1345772433.5081.1.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
@ 2012-08-27 22:28 ` Chris Ball
0 siblings, 0 replies; 4+ messages in thread
From: Chris Ball @ 2012-08-27 22:28 UTC (permalink / raw)
To: Joseph Lo
Cc: Stephen Warren, Olof Johansson, linux-tegra@vger.kernel.org,
linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Hi,
On Thu, Aug 23 2012, Joseph Lo wrote:
> On Sat, 2012-08-18 at 03:01 +0800, Stephen Warren wrote:
>> On 08/17/2012 01:04 AM, Joseph Lo wrote:
>> > When compiling a kernel that supports only Tegra30 and not Tegra20,
>> > the SDHCI driver will fail to compile since the of_match_device() failure
>> > fallback code unconditinally references soc_data_tegra20, which is only
>> > compiled in when Tegra20 support is enabled.
>> >
>> > In Kernel 3.7, both Tegra20 and Tegra30 will only support booting using
>> > device tree, Hence, there is never a need to fall back to using
>> > soc_data_tegra20 if of_mach_device() fails. Instead, make this case an
>> > error. This removes the reference to soc_data_tegra20, and hence solves
>> > the compile failure.
>>
>> Tested-by: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
>>
>> (built and tested both Tegra20-only and Tegr30-only kernels with this
>> applied on top of next-20120816).
>
> Ping.
Thanks, pushed to mmc-next for 3.7.
- Chris.
--
Chris Ball <cjb-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-27 22:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-17 7:04 [PATCH] mmc: tegra: convert to device tree support only Joseph Lo
[not found] ` <1345187071-6619-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-08-17 19:01 ` Stephen Warren
2012-08-24 1:40 ` Joseph Lo
[not found] ` <1345772433.5081.1.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2012-08-27 22:28 ` Chris Ball
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).