Thread (22 messages) 22 messages, 3 authors, 2018-12-17

RE: [PATCH V9 1/7] clk: imx: add configuration option for mmio clks

From: Aisheng Dong <aisheng.dong@nxp.com>
Date: 2018-12-13 00:33:22
Also in: linux-clk

-----Original Message-----
From: Stephen Boyd [mailto:sboyd@kernel.org]
Sent: Thursday, December 13, 2018 6:24 AM
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 [off-list ref]; dl-linux-imx
[off-list ref]; kernel@pengutronix.de
Subject: RE: [PATCH V9 1/7] clk: imx: add configuration option for mmio clks

Quoting Aisheng Dong (2018-12-12 02:27:24)
quoted
Hi Stephen,
quoted
quoted
quoted
quoted
quoted
diff --git a/drivers/clk/imx/Makefile
b/drivers/clk/imx/Makefile index
5c0b11e..f850424 100644
--- a/drivers/clk/imx/Makefile
+++ b/drivers/clk/imx/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0

-obj-y += \
+obj-$(CONFIG_MXC_CLK) += \
Because this changes to obj-$(CONFIG) we should change the
drivers/clk/Makefile to have obj-y for this Makefile instead
of depending on ARCH_MXC.
We also use ARCH_MXC for ARMv8 SoC clocks.
Yes, and? I'm suggesting drivers/clk/Makefile have an obj-y +=
drivers/clk/imx/ and then decide to compile or not compile the
MXC_CLK "core" bits based on CONFIG_MXC_CLK config option.
Sorry for the missunderstanding before.
I guess you point is have an ojb-y += drivrs/clk/imx/ Then in
drivers/clk/imx/Kconfig config MXC_CLK
              def_bool ARCH_MXC && !ARM64
              select MXC_clk bits
config MXC_CLK_SCU
              def_bool ARCH_MXC && ARM64
              select SCU clock bits

If wrong please let me know.

Will update the patch series and re-send.
Thanks for the suggestion.
Yes that looks like what I'm asking for.
quoted
quoted
I tried and met another problem that MX8MQ (ARM64) is also using
legacy MXC_CLK. (And 3 more MX8M series based chips.)

That means I have to write something like:
config MXC_CLK
        bool
        def_bool (ARCH_MXC && !ARM64) || (ARCH_MXC && ARM64 &&
SOC_IMX8MQ)

config MXC_CLK_SCU
        bool
        def_bool (ARCH_MXC && ARM64 && !SOC_IMX8MQ)

But it can't work as ARM64 supports multiplatforms.
e.g. we have also SOC_IMX8QXP, SOC_IMX8QM, SOC_IMX8DM ...

Do you have a suggestion about this?
Can you put the enabling of MXC_CLK_SCU in the defconfig and exposed it as a
user selectable option? And keep hiding the MXC_CLK option behind the
def_bool? I hope that MXC_CLK could be user selectable eventually, but the
def_bool is there to make it easier to bridge the transition and update
everyone's defconfigs while it is moved into the defconfig.
Sounds like a good suggestion.
I will do it now.

In order to avoid breaking MX8MQ, I will keep MXC_CLK as
config MXC_CLK
         bool
         def_bool (ARCH_MXC && !ARM64) || (ARCH_MXC && ARM64 && SOC_IMX8MQ)

and make MXC_CLK_SCU a user selectable option.

And finally we will make MXC_CLK selectable as well after the transition.

If any issue please let me know.

Regards
Dong Aisheng
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help