From: Matthias Brugger <mbrugger@suse.com>
To: Enric Balletbo i Serra <enric.balletbo@collabora.com>,
robh+dt@kernel.org, mark.rutland@arm.com, ck.hu@mediatek.com,
p.zabel@pengutronix.de, airlied@linux.ie,
mturquette@baylibre.com, sboyd@kernel.org,
ulrich.hecht+renesas@gmail.com,
laurent.pinchart@ideasonboard.com
Cc: Kate Stewart <kstewart@linuxfoundation.org>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Minghsiu Tsai <minghsiu.tsai@mediatek.com>,
dri-devel@lists.freedesktop.org,
Richard Fontana <rfontana@redhat.com>,
Collabora Kernel ML <kernel@collabora.com>,
linux-clk@vger.kernel.org,
Nicolas Boichat <drinkcat@chromium.org>,
Weiyi Lu <weiyi.lu@mediatek.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
wens@csie.org, Allison Randal <allison@lohutok.net>,
mtk01761 <wendell.lin@mediatek.com>,
Owen Chen <owen.chen@mediatek.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
frank-w@public-files.de, Seiya Wang <seiya.wang@mediatek.com>,
sean.wang@mediatek.com, Houlong Wei <houlong.wei@mediatek.com>,
linux-mediatek@lists.infradead.org, hsinyi@chromium.org,
Matthias Brugger <matthias.bgg@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Fabien Parent <fparent@baylibre.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
rdunlap@infradead.org, linux-kernel@vger.kernel.org,
Daniel Vetter <daniel@ffwll.ch>,
matthias.bgg@kernel.org
Subject: Re: [PATCH v11 3/5] clk / soc: mediatek: Move mt8173 MMSYS to platform driver
Date: Wed, 11 Mar 2020 14:23:02 +0100 [thread overview]
Message-ID: <7157b75b-0b9d-33d0-6548-ac2433ab9154@suse.com> (raw)
In-Reply-To: <20200311115614.1425528-4-enric.balletbo@collabora.com>
On 11/03/2020 12:56, Enric Balletbo i Serra wrote:
> From: Matthias Brugger <mbrugger@suse.com>
>
> There is no strong reason for this to use CLK_OF_DECLARE instead of
> being a platform driver. Plus, MMSYS provides clocks but also a shared
> register space for the mediatek-drm and the mediatek-mdp
> driver. So move the MMSYS clocks to a new platform driver and also
> create a new MMSYS platform driver in drivers/soc/mediatek that
> instantiates the clock driver.
>
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
>
> Changes in v11:
> - Leave the clocks part in drivers/clk (clk-mt8173-mm)
> - Instantiate the clock driver from the mtk-mmsys driver.
> - Add default config option to not break anything.
> - Removed the Reviewed-by CK tag as changed the organization.
>
> Changes in v10:
> - Renamed to be generic mtk-mmsys
> - Add driver data support to be able to support diferent SoCs
>
> Changes in v9:
> - Move mmsys to drivers/soc/mediatek (CK)
>
> Changes in v8:
> - Be a builtin_platform_driver like other mediatek mmsys drivers.
>
> Changes in v7:
> - Free clk_data->clks as well
> - Get rid of private data structure
>
> drivers/clk/mediatek/Kconfig | 7 ++
> drivers/clk/mediatek/Makefile | 1 +
> drivers/clk/mediatek/clk-mt8173-mm.c | 146 +++++++++++++++++++++++++++
> drivers/clk/mediatek/clk-mt8173.c | 104 -------------------
I'm not sure we really need that. We can just convert the mmsys clock bits in
clk-mt8173.c to a platform driver with no need put them in a seperate file.
If you think a seperate file is worth doing, I think the approach is to put the
driver in a seperate file first and in a following patch change it to a platform
driver.
Anyway its Stephen to make the decision. If he thinks things are fine like this,
I'm happy to take the patch through my tree.
> drivers/soc/mediatek/Kconfig | 8 ++
> drivers/soc/mediatek/Makefile | 1 +
> drivers/soc/mediatek/mtk-mmsys.c | 50 +++++++++
> 7 files changed, 213 insertions(+), 104 deletions(-)
> create mode 100644 drivers/clk/mediatek/clk-mt8173-mm.c
> create mode 100644 drivers/soc/mediatek/mtk-mmsys.c
>
<snip>
> diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig
> index 2114b563478c..e84513318725 100644
> --- a/drivers/soc/mediatek/Kconfig
> +++ b/drivers/soc/mediatek/Kconfig
> @@ -44,4 +44,12 @@ config MTK_SCPSYS
> Say yes here to add support for the MediaTek SCPSYS power domain
> driver.
>
> +config MTK_MMSYS
> + bool "MediaTek MMSYS Support"
> + depends on COMMON_CLK_MT8173_MMSYS
> + default COMMON_CLK_MT8173_MMSYS
If we don't create a new file, we would need to depend on COMMON_CLK_MT8173 or
maybe not even that. I suppose the system does not get anywhere without the
clock driver.
Regards,
Matthias
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-11 13:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 11:56 [PATCH v11 0/5] arm/arm64: mediatek: Fix mt8173 mmsys device probing Enric Balletbo i Serra
2020-03-11 11:56 ` [PATCH v11 1/5] drm/mediatek: Omit warning on probe defers Enric Balletbo i Serra
2020-03-11 11:56 ` [PATCH v11 2/5] dt-bindings: mediatek: Update mmsys binding to reflect it is a system controller Enric Balletbo i Serra
2020-03-11 11:56 ` [PATCH v11 3/5] clk / soc: mediatek: Move mt8173 MMSYS to platform driver Enric Balletbo i Serra
2020-03-11 13:05 ` CK Hu
2020-03-11 13:23 ` Matthias Brugger [this message]
2020-03-11 11:56 ` [PATCH v11 4/5] soc / drm: mediatek: Move routing control to mmsys device Enric Balletbo i Serra
2020-03-11 13:07 ` CK Hu
2020-03-11 13:25 ` Matthias Brugger
2020-03-11 13:34 ` CK Hu
2020-03-11 11:56 ` [PATCH v11 5/5] soc / drm: mediatek: Fix mediatek-drm device probing Enric Balletbo i Serra
2020-03-11 13:26 ` Matthias Brugger
2020-03-11 13:35 ` CK Hu
2020-03-11 13:01 ` [PATCH v11 0/5] arm/arm64: mediatek: Fix mt8173 mmsys " CK Hu
2020-03-11 15:53 ` 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=7157b75b-0b9d-33d0-6548-ac2433ab9154@suse.com \
--to=mbrugger@suse.com \
--cc=airlied@linux.ie \
--cc=allison@lohutok.net \
--cc=andrew-ct.chen@mediatek.com \
--cc=ck.hu@mediatek.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=drinkcat@chromium.org \
--cc=enric.balletbo@collabora.com \
--cc=fparent@baylibre.com \
--cc=frank-w@public-files.de \
--cc=gregkh@linuxfoundation.org \
--cc=houlong.wei@mediatek.com \
--cc=hsinyi@chromium.org \
--cc=kernel@collabora.com \
--cc=krzk@kernel.org \
--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=mchehab@kernel.org \
--cc=minghsiu.tsai@mediatek.com \
--cc=mturquette@baylibre.com \
--cc=owen.chen@mediatek.com \
--cc=p.zabel@pengutronix.de \
--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).