[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB3PR0402MB391638434ED48B67EEAF8C02F56D0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
Date: Thu, 2 Jul 2020 07:12:36 +0000
From: Anson Huang <anson.huang@....com>
To: Arnd Bergmann <arnd@...db.de>, Dong Aisheng <dongas86@...il.com>
CC: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Sascha Hauer <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Peng Fan <peng.fan@....com>, Abel Vesa <abel.vesa@....com>,
Aisheng Dong <aisheng.dong@....com>,
Andy Duan <fugang.duan@....com>,
Daniel Baluta <daniel.baluta@....com>,
YueHaibing <yuehaibing@...wei.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-clk <linux-clk@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V4 3/5] clk: imx: Support building i.MX common clock
driver as module
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 <dongas86@...il.com> wrote:
> > On Thu, Jul 2, 2020 at 2:11 PM Anson Huang <anson.huang@....com>
> wrote:
> > > > 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.
> > >
> > > 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.
> >
> > 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
Powered by blists - more mailing lists