[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7157b75b-0b9d-33d0-6548-ac2433ab9154@suse.com>
Date: Wed, 11 Mar 2020 14:23:02 +0100
From: Matthias Brugger <mbrugger@...e.com>
To: Enric Balletbo i Serra <enric.balletbo@...labora.com>,
robh+dt@...nel.org, mark.rutland@....com, ck.hu@...iatek.com,
p.zabel@...gutronix.de, airlied@...ux.ie, mturquette@...libre.com,
sboyd@...nel.org, ulrich.hecht+renesas@...il.com,
laurent.pinchart@...asonboard.com
Cc: Matthias Brugger <matthias.bgg@...il.com>,
linux-media@...r.kernel.org, Allison Randal <allison@...utok.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-mediatek@...ts.infradead.org,
Collabora Kernel ML <kernel@...labora.com>,
dri-devel@...ts.freedesktop.org,
Seiya Wang <seiya.wang@...iatek.com>,
linux-kernel@...r.kernel.org, wens@...e.org,
Daniel Vetter <daniel@...ll.ch>, linux-clk@...r.kernel.org,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Kate Stewart <kstewart@...uxfoundation.org>,
devicetree@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
frank-w@...lic-files.de, linux-arm-kernel@...ts.infradead.org,
hsinyi@...omium.org, Richard Fontana <rfontana@...hat.com>,
mtk01761 <wendell.lin@...iatek.com>,
Weiyi Lu <weiyi.lu@...iatek.com>, sean.wang@...iatek.com,
rdunlap@...radead.org, matthias.bgg@...nel.org,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Houlong Wei <houlong.wei@...iatek.com>,
Minghsiu Tsai <minghsiu.tsai@...iatek.com>,
Fabien Parent <fparent@...libre.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Nicolas Boichat <drinkcat@...omium.org>,
Owen Chen <owen.chen@...iatek.com>
Subject: Re: [PATCH v11 3/5] clk / soc: mediatek: Move mt8173 MMSYS to
platform driver
On 11/03/2020 12:56, Enric Balletbo i Serra wrote:
> From: Matthias Brugger <mbrugger@...e.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@...e.com>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.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
Powered by blists - more mailing lists