linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: "linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	Aisheng Dong <aisheng.dong@nxp.com>
Cc: "linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>
Subject: RE: [PATCH V11 1/7] clk: imx: add configuration option for mmio clks
Date: Thu, 13 Dec 2018 17:32:15 -0800	[thread overview]
Message-ID: <154475113520.19322.14425233247345284599@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <AM0PR04MB4211128F59A987F3D94AAD8F80A00@AM0PR04MB4211.eurprd04.prod.outlook.com>

Quoting Aisheng Dong (2018-12-13 04:49:07)
> > -----Original Message-----
> > From: Stephen Boyd [mailto:sboyd@kernel.org]
> > Sent: Thursday, December 13, 2018 3:58 PM
> > To: linux-clk@vger.kernel.org; Aisheng Dong <aisheng.dong@nxp.com>
> > Cc: linux-arm-kernel@lists.infradead.org; mturquette@baylibre.com;
> > shawnguo@kernel.org; Fabio Estevam <fabio.estevam@nxp.com>; dl-linux-imx
> > <linux-imx@nxp.com>; kernel@pengutronix.de; Aisheng Dong
> > <aisheng.dong@nxp.com>; Arnd Bergmann <arnd@arndb.de>; Olof Johansson
> > <olof@lixom.net>
> > Subject: Re: [PATCH V11 1/7] clk: imx: add configuration option for mmio clks
> > 
> > Quoting Aisheng Dong (2018-12-12 17:07:52)
> > > The patch introduces CONFIG_MXC_CLK option for legacy MMIO clocks,
> > > this is required to compile legacy MMIO clock conditionally when
> > > adding SCU based clocks for MX8 platforms later.
> > >
> > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > Cc: Sascha Hauer <kernel@pengutronix.de>
> > > Cc: Fabio Estevam <fabio.estevam@nxp.com>
> > > Cc: Stephen Boyd <sboyd@kernel.org>
> > > Cc: Michael Turquette <mturquette@baylibre.com>
> > > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> diff --git
> > > a/drivers/clk/Makefile b/drivers/clk/Makefile index a47430b..8a9440a
> > > 100644
> > > --- a/drivers/clk/Makefile
> > > +++ b/drivers/clk/Makefile
> > > @@ -72,7 +72,7 @@ obj-$(CONFIG_ARCH_DAVINCI)            +=
> > davinci/
> > >  obj-$(CONFIG_H8300)                    += h8300/
> > >  obj-$(CONFIG_ARCH_HISI)                        += hisilicon/
> > >  obj-y                                  += imgtec/
> > > -obj-$(CONFIG_ARCH_MXC)                 += imx/
> > > +obj-y                                  += imx/
> > >  obj-y                                  += ingenic/
> > >  obj-$(CONFIG_ARCH_K3)                  += keystone/
> > >  obj-$(CONFIG_ARCH_KEYSTONE)            += keystone/
> > > diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig new
> > > file mode 100644 index 0000000..37478ba
> > > --- /dev/null
> > > +++ b/drivers/clk/imx/Kconfig
> > > @@ -0,0 +1,5 @@
> > > +# SPDX-License-Identifier: GPL-2.0
> > > +# common clock support for NXP i.MX SoC family.
> > > +config MXC_CLK
> > > +       bool
> > > +       def_bool (ARCH_MXC && !ARM64) || (ARCH_MXC && ARM64 &&
> > > +SOC_IMX8MQ)
> > 
> > Ok I looked closer, SOC_IMX8MQ is only being introduced now and has only
> > been in linux-next for a few days. Having such a config symbol is highly unusual
> > for arm64 code. Has that been accepted by arm-soc? I don't know why it
> > would be because we don't add SoC specific config options anymore. I imagine
> > it will be rejected and we'll need to have this new MXC_CLK config be enabled
> > in the defconfig instead of selected from the arch layer.
> > 
> > Given all that, is there any damage if this is just a def_bool ARCH_MXC right
> > now? If it's enabled on the platforms that don't use it because they have SCU,
> > does it actually matter? Or we just get some code bloat?
> > If it's just some extra code, then even more reason to make a user visible config
> > option that can be selected in the configurations that care to save some space.
> > 
> 
> It make sense to me. No actual damage as we support multiplatforms using both
> MXC_CLK and MXC_CLK_SCU on ARMv8. And for users who want to save one of them,
> they do can change via memuconfig later.
> I will make it a def_bool ARCH_MXC.
> Thanks for the suggestion.
> 
> BTW, as I also introduced SOC_IMX8QXP in Patch 4 and 7.
> diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile
> +obj-$(CONFIG_SOC_IMX8QXP) += clk-imx8qxp.o clk-imx8qxp-lpcg.o 
> 
> According to your former suggestion, I think we should remove it.
> So I'm going to make imx8qxp clk an user selectable configuration option which
> will select the common MXC_CLK_SCU. So a bit difference from former discussion,
> MXC_CLK_SCU will still be kept a hide option.
> 
> This way is mostly like how QCOM does and should work for IMX as well.
> 
> Then it will look like:
> config MXC_CLK_SCU
>         bool 
> 
> config CLK_IMX8QXP
>         bool "IMX8QXP SCU Clock"
>         depends on ARCH_MXC && IMX_SCU && ARM64
>         select MXC_CLK_SCU
>         help
>           Build the driver for IMX8QXP SCU based clocks.
> 
> If any issue, please let me know.

Ok, so a library pattern, where MXC_CLK_SCU is the library of code that
various SoC specific clk drivers use. Seems fine to me.


  reply	other threads:[~2018-12-14  1:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13  1:07 [PATCH V11 0/7] clk: imx: add imx8qxp clock support Aisheng Dong
2018-12-13  1:07 ` [PATCH V11 1/7] clk: imx: add configuration option for mmio clks Aisheng Dong
2018-12-13  7:57   ` Stephen Boyd
2018-12-13  8:02     ` Olof Johansson
2018-12-13  8:12       ` Shawn Guo
2018-12-13 12:04         ` Abel Vesa
2018-12-14  1:36         ` Olof Johansson
2018-12-13 12:49     ` Aisheng Dong
2018-12-14  1:32       ` Stephen Boyd [this message]
2018-12-14  1:50         ` Aisheng Dong
2018-12-13  1:07 ` [PATCH V11 2/7] clk: imx: add scu clock common part Aisheng Dong
2018-12-13  7:48   ` Stephen Boyd
2018-12-13 11:19     ` Aisheng Dong
2018-12-14  1:30       ` Stephen Boyd
2018-12-14  1:44         ` Aisheng Dong
2018-12-14  2:17           ` Stephen Boyd
2018-12-14  2:28             ` Aisheng Dong
2018-12-13  1:07 ` [PATCH V11 3/7] dt-bindings: clock: imx8qxp: add SCU clock IDs Aisheng Dong
2018-12-13  7:59   ` Stephen Boyd
2018-12-13  8:31     ` Shawn Guo
2018-12-13 11:22     ` Aisheng Dong
2018-12-13  1:08 ` [PATCH V11 4/7] clk: imx: add imx8qxp clk driver Aisheng Dong
2018-12-13  1:08 ` [PATCH V11 5/7] dt-bindings: clock: add imx8qxp lpcg clock binding Aisheng Dong
2018-12-13  7:59   ` Stephen Boyd
2018-12-13  1:08 ` [PATCH V11 6/7] clk: imx: add lpcg clock support Aisheng Dong
2018-12-13  1:08 ` [PATCH V11 7/7] clk: imx: add imx8qxp lpcg driver Aisheng Dong

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=154475113520.19322.14425233247345284599@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=aisheng.dong@nxp.com \
    --cc=arnd@arndb.de \
    --cc=fabio.estevam@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=mturquette@baylibre.com \
    --cc=olof@lixom.net \
    --cc=shawnguo@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).