From: Stephen Warren <swarren@wwwdotorg.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Pawel Moll <pawel.moll@arm.com>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Magnus Damm <magnus.damm@gmail.com>, Chris Ball <cjb@laptop.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Simon Horman <horms@verge.net.au>,
Ian Campbell <ian.campbell@citrix.com>,
Mark Rutland <Mark.Rutland@arm.com>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>
Subject: Re: [PATCH 1/2] mmc: add Device Tree properties for UHS modes
Date: Mon, 29 Jul 2013 11:21:19 -0600 [thread overview]
Message-ID: <51F6A48F.9090309@wwwdotorg.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1307291523120.14405@axis700.grange>
On 07/29/2013 07:30 AM, Guennadi Liakhovetski wrote:
> On Mon, 29 Jul 2013, Pawel Moll wrote:
>
>> On Mon, 2013-07-29 at 13:05 +0100, Guennadi Liakhovetski wrote:
>>> No, that's exactly the problem. We absolutely do not want to write
>>> compatible="vendor,soc-v1"; in a .dts file for SoC v2 just because we
>>> currently think, that we don't have to distinguish between those SoC
>>> versions in this specific driver. I think we all know it quite well, that
>>> there are (practically) always differences - sometimes documented,
>>> sometimes undocumented. And if you later find out, that you do have to
>>> differentiate in the driver - it's too late. Even if we disregard the
>>> argument of ugliness of having to set compatibility with soc-v1, soc-v2,
>>> soc-v3 in different DT nodes on an SoC v4.
>>
>> First of all I think your example calls for more than one compatible
>> string - if it seems that soc,v2 is almost like soc,v1, make it
>> compatible = "soc-v2", "soc-v1" and don't touch the driver (as in: keep
>> it compatible with "soc-v1" only). Then, when the realisation comes, you
>> can simply add the "soc-v2" of_device_id with .data pointing at new
>> features.
>
> Yes, this is also a possibility, but it seems only a little bit better.
> Why should a DT node on SoC vN have a compatible string with SoC vK for
> some random for an abstract user absolutely unrelated SoC version?...
Precisely because the HW /is/ compatible.
If the HW interface (registers) in two chips A and B is such that a
driver for chip A can be expected to run unmodified on chip B too
(albeit perhaps without yet supporting any new features, or perhaps not
running at full performance etc.), then chip B /is/ compatible with chip
A, and it makes sense to mark it so in DT. That way, an old kernel which
had support for chip A can run on chip B. A newer kernel might come
along later with explicit support for chip B, and hence run faster
and/or expose new features, but the driver for chip A can still work on
chip B.
> And
> that vK would be different for different devices... So on SoC v5 MMC can
> be compatible with with v1, sound with v2, camera with v3... Don't you
> think it would look like a mess?
I don't consider that a mess, no. It's nice evolutionary HW design:-)
WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Pawel Moll <pawel.moll@arm.com>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Magnus Damm <magnus.damm@gmail.com>, Chris Ball <cjb@laptop.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Simon Horman <horms@verge.net.au>,
Ian Campbell <ian.campbell@citrix.com>,
Mark Rutland <Mark.Rutland@arm.com>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>
Subject: Re: [PATCH 1/2] mmc: add Device Tree properties for UHS modes
Date: Mon, 29 Jul 2013 17:21:19 +0000 [thread overview]
Message-ID: <51F6A48F.9090309@wwwdotorg.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1307291523120.14405@axis700.grange>
On 07/29/2013 07:30 AM, Guennadi Liakhovetski wrote:
> On Mon, 29 Jul 2013, Pawel Moll wrote:
>
>> On Mon, 2013-07-29 at 13:05 +0100, Guennadi Liakhovetski wrote:
>>> No, that's exactly the problem. We absolutely do not want to write
>>> compatible="vendor,soc-v1"; in a .dts file for SoC v2 just because we
>>> currently think, that we don't have to distinguish between those SoC
>>> versions in this specific driver. I think we all know it quite well, that
>>> there are (practically) always differences - sometimes documented,
>>> sometimes undocumented. And if you later find out, that you do have to
>>> differentiate in the driver - it's too late. Even if we disregard the
>>> argument of ugliness of having to set compatibility with soc-v1, soc-v2,
>>> soc-v3 in different DT nodes on an SoC v4.
>>
>> First of all I think your example calls for more than one compatible
>> string - if it seems that soc,v2 is almost like soc,v1, make it
>> compatible = "soc-v2", "soc-v1" and don't touch the driver (as in: keep
>> it compatible with "soc-v1" only). Then, when the realisation comes, you
>> can simply add the "soc-v2" of_device_id with .data pointing at new
>> features.
>
> Yes, this is also a possibility, but it seems only a little bit better.
> Why should a DT node on SoC vN have a compatible string with SoC vK for
> some random for an abstract user absolutely unrelated SoC version?...
Precisely because the HW /is/ compatible.
If the HW interface (registers) in two chips A and B is such that a
driver for chip A can be expected to run unmodified on chip B too
(albeit perhaps without yet supporting any new features, or perhaps not
running at full performance etc.), then chip B /is/ compatible with chip
A, and it makes sense to mark it so in DT. That way, an old kernel which
had support for chip A can run on chip B. A newer kernel might come
along later with explicit support for chip B, and hence run faster
and/or expose new features, but the driver for chip A can still work on
chip B.
> And
> that vK would be different for different devices... So on SoC v5 MMC can
> be compatible with with v1, sound with v2, camera with v3... Don't you
> think it would look like a mess?
I don't consider that a mess, no. It's nice evolutionary HW design:-)
next prev parent reply other threads:[~2013-07-29 17:21 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 15:51 [PATCH 1/2] mmc: add Device Tree properties for UHS modes Guennadi Liakhovetski
2013-07-26 15:51 ` Guennadi Liakhovetski
2013-07-26 15:51 ` [PATCH/RFC 2/2] ARM: shmobile: kzm9g: support DDR50 mode with 1.8V VccQ on MMCIF Guennadi Liakhovetski
2013-07-26 15:51 ` Guennadi Liakhovetski
2013-07-30 2:18 ` Simon Horman
2013-07-30 2:18 ` Simon Horman
2013-07-26 17:10 ` [PATCH 1/2] mmc: add Device Tree properties for UHS modes Stephen Warren
2013-07-26 17:10 ` Stephen Warren
2013-07-26 20:23 ` Guennadi Liakhovetski
2013-07-26 20:23 ` Guennadi Liakhovetski
2013-07-26 21:36 ` Stephen Warren
2013-07-26 21:36 ` Stephen Warren
2013-07-29 6:20 ` Guennadi Liakhovetski
2013-07-29 6:20 ` Guennadi Liakhovetski
2013-07-29 7:18 ` Guennadi Liakhovetski
2013-07-29 7:18 ` Guennadi Liakhovetski
2013-07-29 10:50 ` Pawel Moll
2013-07-29 10:50 ` Pawel Moll
2013-07-29 11:27 ` Guennadi Liakhovetski
2013-07-29 11:27 ` Guennadi Liakhovetski
2013-07-29 11:42 ` Pawel Moll
2013-07-29 11:42 ` Pawel Moll
2013-07-29 12:05 ` Guennadi Liakhovetski
2013-07-29 12:05 ` Guennadi Liakhovetski
2013-07-29 13:07 ` Pawel Moll
2013-07-29 13:07 ` Pawel Moll
2013-07-29 13:30 ` Guennadi Liakhovetski
2013-07-29 13:30 ` Guennadi Liakhovetski
2013-07-29 13:37 ` Pawel Moll
2013-07-29 13:37 ` Pawel Moll
2013-07-29 17:21 ` Stephen Warren [this message]
2013-07-29 17:21 ` Stephen Warren
2013-07-29 13:39 ` Rob Herring
2013-07-29 13:39 ` Rob Herring
2013-07-29 14:40 ` Guennadi Liakhovetski
2013-07-29 14:40 ` Guennadi Liakhovetski
2013-07-29 17:28 ` Stephen Warren
2013-07-29 17:28 ` Stephen Warren
2013-07-29 10:57 ` Pawel Moll
2013-07-29 10:57 ` Pawel Moll
2013-07-29 11:10 ` Guennadi Liakhovetski
2013-07-29 11:10 ` Guennadi Liakhovetski
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=51F6A48F.9090309@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=Mark.Rutland@arm.com \
--cc=cjb@laptop.org \
--cc=devicetree@vger.kernel.org \
--cc=g.liakhovetski@gmx.de \
--cc=horms@verge.net.au \
--cc=ian.campbell@citrix.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.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.