Thread (21 messages) 21 messages, 4 authors, 2020-07-02

RE: [PATCH V4 3/5] clk: imx: Support building i.MX common clock driver as module

From: Anson Huang <hidden>
Date: 2020-07-02 07:12:44
Also in: linux-clk, lkml

Hi, Arnd

Subject: Re: [PATCH V4 3/5] clk: imx: Support building i.MX common clock
driver as module

On Thu, Jul 2, 2020 at 8:40 AM Dong Aisheng [off-list ref] wrote:
quoted
On Thu, Jul 2, 2020 at 2:11 PM Anson Huang [off-list ref]
wrote:
quoted
quoted
quoted
Subject: Re: [PATCH V4 3/5] clk: imx: Support building i.MX common
clock
I am fine of adding the '#ifndef MODULE' to imx_clk_disable_uart()
and imx_keep_uart_clocks_param() as well in next patch series.
Others like ' imx_keep_uart_clocks ' and imx_register_uart_clocks() need to
be kept always built, since they are used by each clock driver no matter
built-in or module build.
quoted
quoted
So that means I have to add another 'ifndef MODULE' or I need to
adjust some code sequence to make those code can be built-out in
same block and just use single 'ifndef MODULE', I think adjust the code
sequence should be better, will go with this way.
quoted
What if we  condionally compile it in clk.h? Will that be easiser?
Yes, that's what I expected to see in v4 after the previous discussion. If
imx_register_uart_clocks() is an empty inline function, then the arrays passed
to it are unused and also get dropped by the compiler.

The question is whether the #ifdef check in the header to test for MODULE
(only calling it if this particular soc has a built-in clk driver, which is sufficient)
or for IS_MODULE(CONFIG_MXC_CLK) (call it if _any_ clk driver is built-in and
the function exists, which leaves extra code in the driver but is a more
conventional check).
So you prefer to add an empty inline function for imx_register_uart_clocks() with check
of MODULE build? Even with this, we still need to add MODULE build check to whole block
of this earlycon uart clock handler in imx/clk.c.

Thanks,
Anson
_______________________________________________
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