From: Tomasz Figa <t.figa@samsung.com>
To: Sachin Kamat <sachin.kamat@linaro.org>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
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>,
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: Fri, 21 Feb 2014 14:18:49 +0100 [thread overview]
Message-ID: <53075239.4010603@samsung.com> (raw)
In-Reply-To: <CAK9yfHyWG1ac6isTRSB3VWfxER9cSuDJHwY3b7svyEk9EozpWQ@mail.gmail.com>
On 21.02.2014 07:08, Sachin Kamat wrote:
> On 20 February 2014 23:18, Arnd Bergmann <arnd@arndb.de> wrote:
>> 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.
>
> Now that we have a broader agreement on this, I think we can go ahead with the
> following steps as an initial approach:
> 1. Have a common machine file for both exynos4 and 5 files, mach-exynos-dt.c.
> 2. Introduce a generic compatible string "samsung,exynos".
> 3. Append this to the compatible property list for existing boards.
>
> If this plan looks OK, I can send across patches doing this.
>
Looks good. I would also merge common.c with this resulting
mach-exynos-dt.c, as it would be the only user of the code there.
Best regards,
Tomasz
next prev parent reply other threads:[~2014-02-21 13:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1392809645-631-1-git-send-email-sachin.kamat@linaro.org>
[not found] ` <5304A779.1060702@samsung.com>
[not found] ` <CAK9yfHy7YHDLCfUGA-ua4iLzK2PMotVZvC=51t-bMkVZVBQFaA@mail.gmail.com>
[not found] ` <CAK9yfHy7YHDLCfUGA-ua4iLzK2PMotVZvC=51t-bMkVZVBQFaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-20 14:51 ` [PATCH 1/1] ARM: Exynos: Add generic compatible string Tomasz Figa
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:48 ` Arnd Bergmann
2014-02-21 6:08 ` Sachin Kamat
2014-02-21 13:18 ` Tomasz Figa [this message]
2014-02-21 14:48 ` Arnd Bergmann
2014-02-21 15:21 ` Tomasz Figa
[not found] ` <53076F00.7000001-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-02-21 15:31 ` Tomasz Figa
2014-02-24 12:03 ` Sachin Kamat
2014-02-25 0:35 ` Kukjin Kim
2014-02-25 0:52 ` Tomasz Figa
2014-02-25 1:00 ` Kukjin Kim
2014-02-25 3:03 ` Sachin Kamat
2014-02-25 4:42 ` Olof Johansson
2014-02-25 11:42 ` Arnd Bergmann
2014-03-05 8:25 ` Sachin Kamat
2014-03-05 12:12 ` Tomasz Figa
2014-03-05 15:30 ` 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=53075239.4010603@samsung.com \
--to=t.figa@samsung.com \
--cc=Mark.Rutland@arm.com \
--cc=arnd@arndb.de \
--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 \
/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).