From: Enric Balletbo i Serra <enric.balletbo@collabora.com>
To: Matthias Brugger <mbrugger@suse.com>,
Stephen Boyd <sboyd@kernel.org>,
Enric Balletbo Serra <eballetbo@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
Minghsiu Tsai <minghsiu.tsai@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
David Airlie <airlied@linux.ie>,
Michael Turquette <mturquette@baylibre.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
Richard Fontana <rfontana@redhat.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
ulrich.hecht+renesas@gmail.com,
Collabora Kernel ML <kernel@collabora.com>,
linux-clk@vger.kernel.org, Weiyi Lu <weiyi.lu@mediatek.com>,
Chen-Yu Tsai <wens@csie.org>,
Allison Randal <allison@lohutok.net>,
mtk01761 <wendell.lin@mediatek.com>,
linux-media@vger.kernel.org,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
frank-w@public-files.de, Seiya Wang <seiya.wang@mediatek.com>,
sean.wang@mediatek.com, Rob Herring <robh+dt@kernel.org>,
ARM/Mediatek SoC support <linux-mediatek@lists.infradead.org>,
Hsin-Yi Wang <hsinyi@chromium.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
fwll.ch@freedesktop.org,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Houlong Wei <"houlong.w ei"@mediatek.com>,
matthias.bgg@kernel.org
Subject: Re: [PATCH v11 3/5] soc: mediatek: Move mt8173 MMSYS to platform driver
Date: Tue, 10 Mar 2020 10:50:34 +0100 [thread overview]
Message-ID: <1c726a44-dd8a-d69e-0563-dfbbc455317e@collabora.com> (raw)
In-Reply-To: <21b43196-230c-5000-546e-b90d4b6b44a3@suse.com>
Hi all,
On 10/3/20 10:40, Matthias Brugger wrote:
>
>
> On 09/03/2020 23:50, Stephen Boyd wrote:
>> Quoting Enric Balletbo Serra (2020-03-06 14:09:50)
>>> Missatge de Stephen Boyd <sboyd@kernel.org> del dia dv., 6 de mar
>>> 2020 a les 22:37:
>>>>
>>>> Quoting Enric Balletbo i Serra (2020-03-06 08:30:16)
>>>>> On 5/3/20 22:01, Stephen Boyd wrote:
>>>>>> Quoting Enric Balletbo i Serra (2020-03-02 03:01:26)
>>>>>>> diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
>>>>>>> new file mode 100644
>>>>>>> index 000000000000..473cdf732fb5
>>>>>>> --- /dev/null
>>>>>>> +++ b/drivers/soc/mediatek/mtk-mmsys.c
>>>>>>> @@ -0,0 +1,154 @@
>>>>>>> +// SPDX-License-Identifier: GPL-2.0-only
>>>>>>> +/*
>>>>>>> + * Copyright (c) 2014 MediaTek Inc.
>>>>>>> + * Author: James Liao <jamesjj.liao@mediatek.com>
>>>>>>> + */
>>>>>>> +
>>>>>>> +#include <linux/clk-provider.h>
>>>>>>> +#include <linux/of_device.h>
>>>>>>> +#include <linux/platform_device.h>
>>>>>>> +
>>>>>>> +#include "../../clk/mediatek/clk-gate.h"
>>>>>>> +#include "../../clk/mediatek/clk-mtk.h"
>>>>>>
>>>>>> Why not use include/linux/clk/?
>>>>>>
>>>>>
>>>>> I can move these files to include, this will impact a lot more of drivers but,
>>>>> yes, I think is the right way.
>>>>>
>>>>>> But I also don't understand why the clk driver is moved outside of
>>>>>> drivers/clk/ into drivers/soc/. Commit text saying that it has shared
>>>>>> registers doesn't mean it can't still keep the clk driver part in the
>>>>>> drivers/clk/ area.
>>>>>>
>>>>>
>>>>> Actually moving this to the soc directory has been requested by CK (mediatek) as
>>>>> a change in v8. You can see the discussion in [1]
>>>>>
>>>>
>>>> I can reply there in that thread if necessary, but we shouldn't need to
>>>> force simple-mfd into DT bindings to support this. Match the compatible
>>>> string in drivers/soc/ and register devices in software for the
>>>> different pieces of this overall hardware block. If necessary, pass down
>>>> the ioremapped addresss down through device data to each logical driver
>>>> in the respective subsystem.
>>>>
>>>> So yes, it looks like an MFD, but that doesn't mean we have to change
>>>> the DT binding or put it in drivers/mfd to support that. And we don't
>>>> have to fix any problems with allowing two drivers to probe the same
>>>> compatible string.
>>>>
>>>
>>> That thread maybe has too much information and things evolved since
>>> then. Note that the final solution is not an MFD neither we change the
>>> bindings. I pointed to that thread just because CK (CK please correct
>>> me if I'm wrong) thought that the driver is not a pure clock driver
>>> and he preferred to move to drivers/soc/mediatek (in that thread, he
>>> exposes his opinion on that). Sorry to introduce more confusion.
>>>
>>> You seem to be fine with the approach (just minor changes), so it
>>> looks to me that the only problem is if this should be in drivers/clk
>>> or drivers/soc. Honestly, this is not something I can't decide and
>>> I'll let you (the soc and clk maintainers) decide. I don't really have
>>> a strong opinion here. I don't mind move again to drivers/clk if that
>>> is what we want but let's come to an agreement.
>>>
>>
>> It's already in drivers/clk, so leave the clk part there and register
>> the clk device and any other devices by matching the compatible in
>> drivers/soc. That is my preferred solution. Can that be done?
>>
>
> I think we can once again create a platform device in drivers/soc which matches
> the drivers/clk and then do the routing in drivers/soc. Enric any thoughts?
>
Yes, working already on a new version.
Thanks,
Enric
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-03-10 23:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 11:01 [PATCH v11 0/5] arm/arm64: mediatek: Fix mt8173 mmsys device probing Enric Balletbo i Serra
2020-03-02 11:01 ` [PATCH v11 1/5] drm/mediatek: Omit warning on probe defers Enric Balletbo i Serra
2020-03-02 11:01 ` [PATCH v11 2/5] dt-bindings: mediatek: Update mmsys binding to reflect it is a system controller Enric Balletbo i Serra
2020-03-02 23:40 ` Rob Herring
2020-03-05 21:03 ` Stephen Boyd
2020-03-02 11:01 ` [PATCH v11 3/5] soc: mediatek: Move mt8173 MMSYS to platform driver Enric Balletbo i Serra
2020-03-05 21:01 ` Stephen Boyd
2020-03-06 16:30 ` Enric Balletbo i Serra
2020-03-06 21:37 ` Stephen Boyd
2020-03-06 22:09 ` Enric Balletbo Serra
2020-03-09 22:50 ` Stephen Boyd
2020-03-10 9:40 ` Matthias Brugger
2020-03-10 9:50 ` Enric Balletbo i Serra [this message]
2020-03-02 11:01 ` [PATCH v11 4/5] soc / drm: mediatek: Move routing control to mmsys device Enric Balletbo i Serra
2020-03-03 2:52 ` CK Hu
2020-03-03 8:28 ` Enric Balletbo i Serra
2020-03-02 11:01 ` [PATCH v11 5/5] soc / drm: mediatek: Fix mediatek-drm device probing Enric Balletbo i Serra
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=1c726a44-dd8a-d69e-0563-dfbbc455317e@collabora.com \
--to=enric.balletbo@collabora.com \
--cc="houlong.w ei"@mediatek.com \
--cc=airlied@linux.ie \
--cc=allison@lohutok.net \
--cc=andrew-ct.chen@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eballetbo@gmail.com \
--cc=frank-w@public-files.de \
--cc=fwll.ch@freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsinyi@chromium.org \
--cc=kernel@collabora.com \
--cc=kstewart@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=matthias.bgg@kernel.org \
--cc=mbrugger@suse.com \
--cc=mchehab@kernel.org \
--cc=minghsiu.tsai@mediatek.com \
--cc=mturquette@baylibre.com \
--cc=rdunlap@infradead.org \
--cc=rfontana@redhat.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=seiya.wang@mediatek.com \
--cc=tglx@linutronix.de \
--cc=ulrich.hecht+renesas@gmail.com \
--cc=weiyi.lu@mediatek.com \
--cc=wendell.lin@mediatek.com \
--cc=wens@csie.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).