From: Dilip Kota <eswara.kota@linux.intel.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Philipp Zabel <pza@pengutronix.de>
Cc: "Chuan Hua, Lei" <chuanhua.lei@linux.intel.com>,
cheol.yong.kim@intel.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, qi-ming.wu@intel.com,
robh@kernel.org, Hauke Mehrtens <hauke@hauke-m.de>
Subject: Re: [PATCH v2 2/2] reset: Reset controller driver for Intel LGM SoC
Date: Mon, 14 Oct 2019 17:41:00 +0800 [thread overview]
Message-ID: <7db54ec8-b770-f22f-c711-52d58cae2fe3@linux.intel.com> (raw)
In-Reply-To: <1570550166.18914.12.camel@pengutronix.de>
Hi Philipp,
On 10/8/2019 11:56 PM, Philipp Zabel wrote:
> Hi Martin,
>
> On Mon, 2019-10-07 at 21:53 +0200, Martin Blumenstingl wrote:
>> Hi Philipp,
>>
>> On Thu, Oct 3, 2019 at 4:19 PM Philipp Zabel <pza@pengutronix.de> wrote:
>> [...]
>>>> because the register layout was greatly simplified for the newer SoCs
>>>> (for which there is reset-intel) compared to the older ones
>>>> (reset-lantiq).
>>>> Dilip's suggestion (in my own words) is that you take his new
>>>> reset-intel driver, then we will work on porting reset-lantiq over to
>>>> that so in the end we can drop the reset-lantiq driver.
>>> Just to be sure, you are suggesting to add support for the current
>>> lantiq,reset binding to the reset-intel driver at a later point? I
>>> see no reason not to do that, but I'm also not quite sure what the
>>> benefit will be over just keeping reset-lantiq as is?
>> according to Chuan and Dilip the current reset-lantiq implementation
>> is wrong [0].
> The only issue seems to be the .reset callback, which doesn't have any
> users anway.
The DT binding of reset-lantiq driver is also having issue. I have
explained here [1].
>
>> my understanding is that the Lantiq and Intel LGM reset controllers
>> are identical except:
>> - the Lantiq variant uses a weird register layout (reset and status
>> registers not at consecutive offsets)
>> - the bits of the reset and status registers sometimes don't match on
>> the Lantiq variant
> Thank you, so these are a good explanation for why the DT bindings
> should be different.
>
>> - the Intel variant has a dedicated registers area for the reset
>> controller registers, while the Lantiq variant mixes them with various
>> other functionality (for example: USB2 PHYs)
> I'm not quite sure I understand why the intel driver is using syscon,
> then. Either way, it shouldn't make a big difference if regmap is used
> anyway.
Yes, we decided to remove the syscon and use the regmap.[2]
>
>>>> This approach means more work for me (as I am probably the one who
>>>> then has to do the work to port reset-lantiq over to reset-intel).
>>> More work than what alternative?
>> compared to "fixing" the existing reset-lantiq driver (reset callback)
> That is still something you could do, or just drop the .reset callback
> because there are no reset consumers using it anyway.
>
> One correct thing to do would be to identify those self-clearing reset
> bits and to disallow calling assert/deassert on them.
>
>> and then (instead of adding a new driver) integrating Intel LGM
>> support into reset-lantiq
> Since at this point I'm not even sure whether merging the two at all is
> better than keeping them separate, I have no opinion on whether merging
> intel support into the lantiq driver or the other way around is
> preferable.
>
>>>> I'm happy to do that work if you think that it's worth following this
>>>> approach. So I want your opinion on this before I spend any effort on
>>>> porting reset-lantiq over to reset-intel.
>>> Reset drivers are typically so simple, I'm not quite sure whether it is
>>> worth to integrate multiple drivers if it complicates matters too much.
>>> In this case though I expect it would just be adding support for a
>>> custom .of_xlate and lantiq specific register property parsing?
>> yes, that's how I understand the Lantiq and Intel reset controllers:
>> - reset/status/assert/deassert callbacks would be shared across all variants
>> - register parsing and of_xlate are SoC specific
> Ok. If that turns out to be less rather than more boilerplate than two
> separate drivers, that should be fine.
Thanks Philipp for your time and briefly explaining your view.
Regards,
Dilip
[1]: https://www.spinics.net/lists/devicetree/msg308930.html
[2]: https://lkml.org/lkml/2019/9/2/289
> regards
> Philipp
next prev parent reply other threads:[~2019-10-14 9:41 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-23 5:28 [PATCH v2 1/2] dt-bindings: reset: Add YAML schemas for the Intel Reset controller Dilip Kota
2019-08-23 5:28 ` [PATCH v2 2/2] reset: Reset controller driver for Intel LGM SoC Dilip Kota
2019-08-23 8:43 ` Philipp Zabel
2019-08-23 9:47 ` Dilip Kota
2019-08-23 10:09 ` Philipp Zabel
2019-08-26 7:01 ` Dilip Kota
2019-08-24 21:11 ` Martin Blumenstingl
2019-08-26 4:01 ` Chuan Hua, Lei
2019-08-26 21:49 ` Martin Blumenstingl
2019-08-27 2:23 ` Chuan Hua, Lei
2019-08-27 21:15 ` Martin Blumenstingl
2019-08-28 1:53 ` Chuan Hua, Lei
2019-08-28 20:01 ` Martin Blumenstingl
2019-08-29 2:50 ` Chuan Hua, Lei
2019-08-29 21:40 ` Martin Blumenstingl
2019-08-30 3:01 ` Chuan Hua, Lei
2019-09-01 21:38 ` Martin Blumenstingl
2019-09-02 9:45 ` Chuan Hua, Lei
2019-09-02 22:04 ` Martin Blumenstingl
2019-09-05 2:38 ` Chuan Hua, Lei
2019-09-05 20:53 ` Martin Blumenstingl
2019-09-12 6:21 ` Dilip Kota
2019-09-12 6:25 ` Dilip Kota
2019-09-12 6:38 ` Dilip Kota
2019-09-19 8:05 ` Dilip Kota
2019-09-19 8:36 ` Langer, Thomas
2019-09-19 9:12 ` Dilip Kota
2019-09-19 19:51 ` Martin Blumenstingl
2019-09-20 2:47 ` Dilip Kota
[not found] ` <29965a80-642b-8f11-b3d4-25c09c3d96cc@linux.intel.com>
2019-10-03 6:50 ` Dilip Kota
2019-10-03 14:19 ` Philipp Zabel
2019-10-07 19:53 ` Martin Blumenstingl
2019-10-08 2:47 ` Dilip Kota
2019-10-08 15:56 ` Philipp Zabel
2019-10-14 9:41 ` Dilip Kota [this message]
2019-08-23 12:25 ` [PATCH v2 1/2] dt-bindings: reset: Add YAML schemas for the Intel Reset controller Rob Herring
2019-08-26 9:52 ` Dilip Kota
2019-08-26 11:23 ` Rob Herring
2019-08-27 14:04 ` Dilip Kota
2019-08-28 2:59 ` Dilip Kota
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=7db54ec8-b770-f22f-c711-52d58cae2fe3@linux.intel.com \
--to=eswara.kota@linux.intel.com \
--cc=cheol.yong.kim@intel.com \
--cc=chuanhua.lei@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=hauke@hauke-m.de \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=p.zabel@pengutronix.de \
--cc=pza@pengutronix.de \
--cc=qi-ming.wu@intel.com \
--cc=robh@kernel.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).