All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Tomasz Figa <t.figa@samsung.com>,
	Mark Rutland <Mark.Rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Sachin Kamat <sachin.kamat@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Olof Johansson <olof@lixom.net>
Subject: Re: [PATCH 1/1] ARM: Exynos: Add generic compatible string
Date: Thu, 20 Feb 2014 18:48:25 +0100	[thread overview]
Message-ID: <16785833.BhsvfRuRRo@wuerfel> (raw)
In-Reply-To: <53063C9F.4060307@samsung.com>

On Thursday 20 February 2014 18:34:23 Tomasz Figa wrote:
> On 20.02.2014 18:00, Arnd Bergmann wrote:
> >> Of course nothing stops you from retaining more specific compatible
> >> strings. In fact, this is probably the most appropriate solution,
> >> because in future you might find out that certain SoCs need some special
> >> differentiation, e.g. same ID value on two SoCs.
> >>
> >> So, to apply this to our case, our Exynos 5250 based Arndale board would
> >> be changed from
> >>
> >> compatible = "insignal,arndale", "samsung,exynos5260";
> >>
> >> to
> >>
> >> compatible = "insignal,arndale", "samsung,exynos5260", "samsung,exynos";
> >
> > Right, this would make sense.
> >
> >> Now, the board file will be able to match simply by "samsung,exynos"
> >> compatible string and SoC-specific code in mach-exynos (hopefully none
> >> after it gets cleaned up fully) will use soc_is_exynos*() macros (what
> >> AFAIK it is already doing at the moment).
> >
> > On principle, I would not take things out of the match list, if that
> > would break booting with old DT file that don't list "samsung,exynos"
> > as compatible. But for new SoCs that would work.
> 
> My proposal was about simply adding a fully generic string, without 
> removing the specific ones. For already supported SoCs this is pretty 
> obvious, as existing DTBs would not have this generic string listed. But 
> the specific strings should be also present in DTSes of new SoCs, even 
> if not recognized by the kernel, to make sure that in future any 
> SoC-specific quirks could be easily handled.

Yes, that's ideal.

> > Using soc_is_exynos*() too much of course also isn't good. A lot of
> > the things tested for should probably be checked from individual DT
> > properties, but again we have to find the right balance. I wouldn't
> > mind getting rid of the soc_is_exynos*() macros completely, because
> > a) we can't use them in device drivers
> > b) all platform code is supposed to be in drivers
> > c) both rules are enforced for arm64
> 
> I fully agree. As I said, after cleaning up mach-exynos/ there should be 
> no more code left using soc_is_*() macros. Ideally, the whole 
> mach-exynos/ should collapse into a single, trivial file, with 
> everything done in dedicated drivers.

Right.


	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] ARM: Exynos: Add generic compatible string
Date: Thu, 20 Feb 2014 18:48:25 +0100	[thread overview]
Message-ID: <16785833.BhsvfRuRRo@wuerfel> (raw)
In-Reply-To: <53063C9F.4060307@samsung.com>

On Thursday 20 February 2014 18:34:23 Tomasz Figa wrote:
> On 20.02.2014 18:00, Arnd Bergmann wrote:
> >> Of course nothing stops you from retaining more specific compatible
> >> strings. In fact, this is probably the most appropriate solution,
> >> because in future you might find out that certain SoCs need some special
> >> differentiation, e.g. same ID value on two SoCs.
> >>
> >> So, to apply this to our case, our Exynos 5250 based Arndale board would
> >> be changed from
> >>
> >> compatible = "insignal,arndale", "samsung,exynos5260";
> >>
> >> to
> >>
> >> compatible = "insignal,arndale", "samsung,exynos5260", "samsung,exynos";
> >
> > Right, this would make sense.
> >
> >> Now, the board file will be able to match simply by "samsung,exynos"
> >> compatible string and SoC-specific code in mach-exynos (hopefully none
> >> after it gets cleaned up fully) will use soc_is_exynos*() macros (what
> >> AFAIK it is already doing at the moment).
> >
> > On principle, I would not take things out of the match list, if that
> > would break booting with old DT file that don't list "samsung,exynos"
> > as compatible. But for new SoCs that would work.
> 
> My proposal was about simply adding a fully generic string, without 
> removing the specific ones. For already supported SoCs this is pretty 
> obvious, as existing DTBs would not have this generic string listed. But 
> the specific strings should be also present in DTSes of new SoCs, even 
> if not recognized by the kernel, to make sure that in future any 
> SoC-specific quirks could be easily handled.

Yes, that's ideal.

> > Using soc_is_exynos*() too much of course also isn't good. A lot of
> > the things tested for should probably be checked from individual DT
> > properties, but again we have to find the right balance. I wouldn't
> > mind getting rid of the soc_is_exynos*() macros completely, because
> > a) we can't use them in device drivers
> > b) all platform code is supposed to be in drivers
> > c) both rules are enforced for arm64
> 
> I fully agree. As I said, after cleaning up mach-exynos/ there should be 
> no more code left using soc_is_*() macros. Ideally, the whole 
> mach-exynos/ should collapse into a single, trivial file, with 
> everything done in dedicated drivers.

Right.


	Arnd

  reply	other threads:[~2014-02-20 17:48 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 11:34 [PATCH 1/1] ARM: Exynos: Add generic compatible string Sachin Kamat
2014-02-19 12:45 ` Tomasz Figa
2014-02-19 12:45   ` Tomasz Figa
2014-02-20  4:14   ` Sachin Kamat
2014-02-20  4:14     ` Sachin Kamat
     [not found]     ` <CAK9yfHy7YHDLCfUGA-ua4iLzK2PMotVZvC=51t-bMkVZVBQFaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-20 14:51       ` Tomasz Figa
2014-02-20 14:51         ` Tomasz Figa
2014-02-20 17:00         ` Arnd Bergmann
2014-02-20 17:00           ` Arnd Bergmann
     [not found]           ` <201402201800.49425.arnd-r2nGTMty4D4@public.gmane.org>
2014-02-20 17:34             ` Tomasz Figa
2014-02-20 17:34               ` Tomasz Figa
2014-02-20 17:48               ` Arnd Bergmann [this message]
2014-02-20 17:48                 ` Arnd Bergmann
2014-02-21  6:08                 ` Sachin Kamat
2014-02-21  6:08                   ` Sachin Kamat
2014-02-21 13:18                   ` Tomasz Figa
2014-02-21 13:18                     ` Tomasz Figa
2014-02-21 14:48                     ` Arnd Bergmann
2014-02-21 14:48                       ` Arnd Bergmann
2014-02-21 15:21                       ` Tomasz Figa
2014-02-21 15:21                         ` Tomasz Figa
     [not found]                         ` <53076F00.7000001-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-02-21 15:31                           ` Tomasz Figa
2014-02-21 15:31                             ` Tomasz Figa
2014-02-24 12:03                             ` Sachin Kamat
2014-02-24 12:03                               ` Sachin Kamat
2014-02-25  0:35                               ` Kukjin Kim
2014-02-25  0:35                                 ` Kukjin Kim
2014-02-25  0:52                                 ` Tomasz Figa
2014-02-25  0:52                                   ` Tomasz Figa
2014-02-25  1:00                                   ` Kukjin Kim
2014-02-25  1:00                                     ` Kukjin Kim
2014-02-25  3:03                                   ` Sachin Kamat
2014-02-25  3:03                                     ` Sachin Kamat
2014-02-25  4:42                                     ` Olof Johansson
2014-02-25  4:42                                       ` Olof Johansson
2014-02-25 11:42                                       ` Arnd Bergmann
2014-02-25 11:42                                         ` Arnd Bergmann
2014-03-05  8:25                                         ` Sachin Kamat
2014-03-05  8:25                                           ` Sachin Kamat
2014-03-05 12:12                                           ` Tomasz Figa
2014-03-05 12:12                                             ` Tomasz Figa
2014-03-05 15:30                                             ` Sachin Kamat
2014-03-05 15:30                                               ` Sachin Kamat
2014-02-24 12:02                         ` Sachin Kamat
2014-02-24 12:02                           ` Sachin Kamat

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=16785833.BhsvfRuRRo@wuerfel \
    --to=arnd@arndb.de \
    --cc=Mark.Rutland@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@secretlab.ca \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=t.figa@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.