devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Grant Likely <grant.likely@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"patches@linaro.org" <patches@linaro.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Rob Herring <robherring2@gmail.com>,
	Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH 3/3] of: Handle memory@0 node on PPC32 only
Date: Wed, 23 Apr 2014 11:45:28 +0100	[thread overview]
Message-ID: <20140423104528.GD30036@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <20140422133515.E7A0BC40754@trevor.secretlab.ca>

On Tue, Apr 22, 2014 at 02:35:15PM +0100, Grant Likely wrote:
> On Fri, 18 Apr 2014 13:59:24 +0100, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > Hi Geert,
> > 
> > On Fri, Apr 18, 2014 at 10:04:15AM +0200, Geert Uytterhoeven wrote:
> > > On Thu, Apr 17, 2014 at 7:42 PM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > > > In order to deal with an firmware bug on a specific ppc32 platform
> > > > (longtrail), early_init_dt_scan_memory() looks for a node called
> > > > memory@0 on all platforms. Restrict this quirk to ppc32 kernels only.
> > > 
> > > This breaks backwards compatibilty with old DTSes (at least on ARM/MIPS,
> > > where you added the missing property in patches 1 and 2 of the series)?
> > 
> > As Rob said in response to 0/3, the MIPSs would likely not be affected,
> > since they embed the DT.
> > 
> > > For the Longtrail, I don't care much anymore, as mine died in 2004.
> > > AFAIK, there have never been many users anyway.
> > 
> > There are still a few mentions of it under arch/powerpc/, so I wouldn't
> > want to be the one to kill it off...
> > 
> > How about the below v2 3/3 to address the ARM platform?
> 
> The problem with this approach is that selecting one board that needs it
> automatically makes it active for all boards. It would need to be
> something more like the following:
> 
> diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
> index 399e242e1a42..55d65b2b4c74 100644
> --- a/drivers/of/fdt.c
> +++ b/drivers/of/fdt.c
> @@ -887,12 +887,10 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
>  
>  	/* We are scanning "memory" nodes only */
>  	if (type == NULL) {
> -		/*
> -		 * The longtrail doesn't have a device_type on the
> -		 * /memory node, so look for the node called /memory@0.
> -		 */
>  		if (depth != 1 || strcmp(uname, "memory@0") != 0)
>  			return 0;
> +		if (!of_flat_dt_match(dt_root, memory_quirk_list))
> +			return 0;
>  	} else if (strcmp(type, "memory") != 0)
>  		return 0;
>  
> With a list of compatible properties for affected boards.

That looks sane to me.

Does anyone have a LongTrail DT to hand, and if so does the root have a
compatible string? From grepping through the kernel I could only find a
model string ("IBM,LongTrail").

Is anyone aware of strings other than that and "st-ericsson,ccu8540" to
look out for?

Cheers,
Mark.

  reply	other threads:[~2014-04-23 10:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17 17:41 [PATCH 0/3] of: dts: enable memory@0 quirk for PPC32 only Leif Lindholm
2014-04-17 17:41 ` [PATCH 1/3] arm: dts: add device_type="memory" for ste-ccu8540 Leif Lindholm
2014-04-22  7:39   ` Lee Jones
2014-04-22 13:09     ` Grant Likely
2014-04-22 13:26   ` Linus Walleij
     [not found]     ` <CACRpkda6+0LyHsqP5J-OTHaau1QPJaJRAup1d3KQq5zu2XC=HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-15 14:50       ` Grant Likely
2014-04-17 17:42 ` [PATCH 2/3] mips: dts: add device_type="memory" where missing Leif Lindholm
     [not found]   ` <1397756521-29387-3-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-18 17:16     ` John Crispin
2014-04-22 13:13   ` Grant Likely
2014-05-15 14:50     ` Grant Likely
2014-04-17 17:42 ` [PATCH 3/3] of: Handle memory@0 node on PPC32 only Leif Lindholm
     [not found]   ` <1397756521-29387-4-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-18  8:04     ` Geert Uytterhoeven
2014-04-18 12:59       ` Leif Lindholm
2014-04-18 13:11         ` Geert Uytterhoeven
     [not found]         ` <20140418125924.GF5904-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-04-21 12:56           ` Rob Herring
     [not found]             ` <CAL_JsqJTMWKh3gsv0TnRap82+7BM4XaT4ZAWkQmyfvzTqOq12g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-23 10:35               ` Mark Rutland
2014-04-22 13:35         ` Grant Likely
2014-04-23 10:45           ` Mark Rutland [this message]
2014-04-23 11:14             ` Geert Uytterhoeven
2014-04-23 13:10             ` Grant Likely
2014-04-24  9:26               ` Leif Lindholm
2014-05-15 14:59                 ` Grant Likely
     [not found] ` <1397756521-29387-1-git-send-email-leif.lindholm-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-04-18  0:43   ` [PATCH 0/3] of: dts: enable memory@0 quirk for " Rob Herring
     [not found]     ` <CAL_JsqL8B2ZY7ACXKX3J8VN5ukjKWuycgfDZpp4kYzBxg6BLmQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-18 12:48       ` Leif Lindholm
2014-04-18 15:37         ` Rob Herring
     [not found]           ` <CAL_JsqKdFyhHfkcC1E9QuKjQTrXwoELYG+CFTpgf2-jqDvxGmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-18 20:13             ` Leif Lindholm
     [not found]               ` <20140418201313.GG5904-t77nlHhSwNqAroYi2ySoxKxOck334EZe@public.gmane.org>
2014-04-18 21:28                 ` Rob Herring
     [not found]                   ` <CAL_Jsq+L14rgYq5swC3H109DThiyDajmTJpO=y562jcE97K-fg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-19  0:36                     ` Leif Lindholm
2014-04-22 13:08           ` Grant Likely
2014-04-22 14:05             ` Leif Lindholm
2014-04-23 13:15               ` Grant Likely
     [not found]                 ` <20140423131508.6E53BC408D2-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2014-04-23 17:25                   ` Leif Lindholm
2014-04-23 13:17               ` Grant Likely

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=20140423104528.GD30036@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=grant.likely@linaro.org \
    --cc=lee.jones@linaro.org \
    --cc=leif.lindholm@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=patches@linaro.org \
    --cc=robherring2@gmail.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;
as well as URLs for NNTP newsgroup(s).