[PATCH 1/1] clk: imx: scu: fix MXC_CLK_SCU module build break

Aisheng Dong aisheng.dong at nxp.com
Mon Nov 30 03:48:19 EST 2020


> From: Stephen Boyd <sboyd at kernel.org>
> Sent: Saturday, November 28, 2020 4:16 AM
> Subject: Re: [PATCH 1/1] clk: imx: scu: fix MXC_CLK_SCU module build break
> 
> Quoting Dong Aisheng (2020-11-25 02:50:37)
> > This issue can be reproduced by CONFIG_IMX_MBOX=m and
> CONFIG_MXC_CLK_SCU=m.
> > It's caused by current Makefile can't support build clk-scu.o and
> 
> What is the issue? Can you include the error message?
> 

It's unable to locate the input files during linking because CONFIG_CLK_IMX8QXP 
not enabled. That's why we can't only enable MXC_CLK_SCU.

  LD [M]  drivers/clk/imx/clk-imx-scu.o
arm-poky-linux-gnueabi-ld: no input files
../scripts/Makefile.build:434: recipe for target 'drivers/clk/imx/clk-imx-scu.o' failed
make[4]: *** [drivers/clk/imx/clk-imx-scu.o] Error 1
../scripts/Makefile.build:500: recipe for target 'drivers/clk/imx' failed
make[3]: *** [drivers/clk/imx] Error 2
../scripts/Makefile.build:500: recipe for target 'drivers/clk' failed
make[2]: *** [drivers/clk] Error 2
make[2]: *** Waiting for unfinished jobs...

> > clk-imx8qxp.o separately.
> > "obj-$(CONFIG_MXC_CLK_SCU) += clk-imx-scu.o clk-imx-lpcg-scu.o
> > clk-imx-scu-$(CONFIG_CLK_IMX8QXP) += clk-scu.o clk-imx8qxp.o"
> > Only enable MXC_CLK_SCU while CLK_IMX8QXP not is meaningless and
> buggy.
> 
> Ok. So CLK_IMX8QXP selects MXC_CLK_SCU?

Yes

> 
> >
> > This patch makes MXC_CLK_SCU to be invisible to users and can only be
> > selected by CLK_IMX8QXP option to ensure they're built together.
> >
> > Fixes: e0d0d4d86c766 ("clk: imx8qxp: Support building i.MX8QXP clock
> > driver as module")
> > Reported-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> > Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
> > ---
> >  drivers/clk/imx/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index
> > 3b393cb07295..dbacdd70af2e 100644
> > --- a/drivers/clk/imx/Kconfig
> > +++ b/drivers/clk/imx/Kconfig
> > @@ -5,7 +5,7 @@ config MXC_CLK
> >         depends on ARCH_MXC || COMPILE_TEST
> >
> >  config MXC_CLK_SCU
> > -       tristate "IMX SCU clock"
> > +       tristate
> >         depends on ARCH_MXC || COMPILE_TEST
> 
> Is it a temporary workaround? Because COMPILE_TEST on an option that isn't
> selectable is meaningless.
> 

Good catch, you're right.
I will remove this COMPILE_TEST as CLK_IMX8QXP already has it and will select
MXC_CLK_SCU.
Will send v2.

Regards
Aisheng

> >         depends on IMX_SCU && HAVE_ARM_SMCCC
> >


More information about the linux-arm-kernel mailing list