All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
       [not found] <DB3PR0402MB3916DD6BD7E8608E4BEA2E25F56D0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
@ 2020-07-02  7:41 ` Arnd Bergmann
  2020-07-02  7:52   ` Anson Huang
  0 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2020-07-02  7:41 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1601 bytes --]

On Thu, Jul 2, 2020 at 9:01 AM Anson Huang <anson.huang@nxp.com> wrote:
> > Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
> > On Thu, Jul 2, 2020 at 8:27 AM Anson Huang <anson.huang@nxp.com> wrote:
> > > Do you think it is acceptable if we just drop the COMPILE_TEST support?
> >
> > The entire point of COMPILE_TEST is to find bugs in rarely used code.
> > As you say, these drivers are rarely used, and compile-testing them found a
> > (harmless) bug, so I think that should be addressed and COMPILE_TEST left
> > around.
>
> I understand the COMPILE_TEST is useful/important, and I think this support should be
> done for all i.MX clock drivers, so do you think if we can use another patch series to support
> it for all i.MX clock drivers? I will do that of cause.

Right, there needs to be a limit to how much you can be assumed to fix
at once ;-)

This is how I'd draw the lines:

- on i.MX21/27/31/35, which are still called from board files and cannot be
  loadable modules until the pre-DT support is gone, leave them as
  "def_bool SOC_MXyx", without COMPILE_TEST
- on i.MX5/6/7/8, make the options tristate and add ||COMPILE_TEST
  to the dependency
- leave all at "default y" to have them enabled whenever COMPILE_TEST
  is not set but the respective platform is
- hide all  i.MX5/6/7/8 clk options so they cannot be made =m without
  compile testing as long as there are still drivers that depend on them
  being built-in such as the PCI host on i.MX8, and document which
  drivers are known to depend on them.

     Arnd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  7:41 ` [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms Arnd Bergmann
@ 2020-07-02  7:52   ` Anson Huang
  0 siblings, 0 replies; 14+ messages in thread
From: Anson Huang @ 2020-07-02  7:52 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2011 bytes --]

Hi, Arnd


> Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7
> platforms
> 
> On Thu, Jul 2, 2020 at 9:01 AM Anson Huang <anson.huang@nxp.com> wrote:
> > > Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for
> > > ARMv7 platforms On Thu, Jul 2, 2020 at 8:27 AM Anson Huang
> <anson.huang@nxp.com> wrote:
> > > > Do you think it is acceptable if we just drop the COMPILE_TEST support?
> > >
> > > The entire point of COMPILE_TEST is to find bugs in rarely used code.
> > > As you say, these drivers are rarely used, and compile-testing them
> > > found a
> > > (harmless) bug, so I think that should be addressed and COMPILE_TEST
> > > left around.
> >
> > I understand the COMPILE_TEST is useful/important, and I think this
> > support should be done for all i.MX clock drivers, so do you think if
> > we can use another patch series to support it for all i.MX clock drivers? I will
> do that of cause.
> 
> Right, there needs to be a limit to how much you can be assumed to fix at
> once ;-)
> 
> This is how I'd draw the lines:
> 
> - on i.MX21/27/31/35, which are still called from board files and cannot be
>   loadable modules until the pre-DT support is gone, leave them as
>   "def_bool SOC_MXyx", without COMPILE_TEST
> - on i.MX5/6/7/8, make the options tristate and add ||COMPILE_TEST
>   to the dependency
> - leave all at "default y" to have them enabled whenever COMPILE_TEST
>   is not set but the respective platform is
> - hide all  i.MX5/6/7/8 clk options so they cannot be made =m without
>   compile testing as long as there are still drivers that depend on them
>   being built-in such as the PCI host on i.MX8, and document which
>   drivers are known to depend on them.

Thank you very much for the detail suggestion, this still looks like a new feature/change
which is NOT that closed to this patch series, so I will add another patch or series very soon
to implement this feature/change.

Thanks,
Anson

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
       [not found] <DB3PR0402MB3916FF11D39F358FCC302484F56D0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
@ 2020-07-02  8:03 ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-07-02  8:03 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2342 bytes --]

On Thu, Jul 2, 2020 at 9:52 AM Anson Huang <anson.huang@nxp.com> wrote:
> > Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7
> > platforms
> >
> > On Thu, Jul 2, 2020 at 9:01 AM Anson Huang <anson.huang@nxp.com> wrote:
> > > > Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for
> > > > ARMv7 platforms On Thu, Jul 2, 2020 at 8:27 AM Anson Huang
> > <anson.huang@nxp.com> wrote:
> > > > > Do you think it is acceptable if we just drop the COMPILE_TEST support?
> > > >
> > > > The entire point of COMPILE_TEST is to find bugs in rarely used code.
> > > > As you say, these drivers are rarely used, and compile-testing them
> > > > found a
> > > > (harmless) bug, so I think that should be addressed and COMPILE_TEST
> > > > left around.
> > >
> > > I understand the COMPILE_TEST is useful/important, and I think this
> > > support should be done for all i.MX clock drivers, so do you think if
> > > we can use another patch series to support it for all i.MX clock drivers? I will
> > do that of cause.
> >
> > Right, there needs to be a limit to how much you can be assumed to fix at
> > once ;-)
> >
> > This is how I'd draw the lines:
> >
> > - on i.MX21/27/31/35, which are still called from board files and cannot be
> >   loadable modules until the pre-DT support is gone, leave them as
> >   "def_bool SOC_MXyx", without COMPILE_TEST
> > - on i.MX5/6/7/8, make the options tristate and add ||COMPILE_TEST
> >   to the dependency
> > - leave all at "default y" to have them enabled whenever COMPILE_TEST
> >   is not set but the respective platform is
> > - hide all  i.MX5/6/7/8 clk options so they cannot be made =m without
> >   compile testing as long as there are still drivers that depend on them
> >   being built-in such as the PCI host on i.MX8, and document which
> >   drivers are known to depend on them.
>
> Thank you very much for the detail suggestion, this still looks like a new feature/change
> which is NOT that closed to this patch series, so I will add another patch or series very soon
> to implement this feature/change.

What I meant to say is that you can limit the number of necessary bugfixes
and changes in the way I suggested to keep the current series shorter by not
also addressing the things you got reports for.

    Arnd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  6:56 ` Arnd Bergmann
@ 2020-07-02  7:01   ` Anson Huang
  0 siblings, 0 replies; 14+ messages in thread
From: Anson Huang @ 2020-07-02  7:01 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]

Hi, Arnd

> Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7
> platforms
> 
> On Thu, Jul 2, 2020 at 8:27 AM Anson Huang <anson.huang@nxp.com> wrote:
> > > Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for
> > > ARMv7 platforms
> > >
> > > On Thu, Jul 2, 2020 at 7:15 AM kernel test robot <lkp@intel.com> wrote:
> > > >
> > > > All errors (new ones prefixed by >>):
> > > >
> > > >    drivers/clk/imx/clk-imx21.c:122:12: warning: no previous
> > > > prototype for
> > > 'mx21_clocks_init' [-Wmissing-prototypes]
> > > >      122 | int __init mx21_clocks_init(unsigned long lref,
> > > > unsigned long href)
> > >
> > > I'd suggest you add the prototypes in drivers/clk/imx/clk.h, even
> > > though the caller doesn't see it there.
> > >
> > > >          |            ^~~~~~~~~~~~~~~~
> > > >    drivers/clk/imx/clk-imx21.c: In function 'mx21_clocks_init':
> > > > >> drivers/clk/imx/clk-imx21.c:124:36: error: 'SZ_2K' undeclared
> > > > >> (first use in this function)
> > > >      124 |  ccm = ioremap(MX21_CCM_BASE_ADDR, SZ_2K);
> > >
> > > This needs an "#include <linux/sizes.h>
> > >
> >
> > But I wonder do we really need to add COMPILE_TEST for these clk drivers?
> > it seems like all i.MX clock drivers do NOT have this build coverage support
> so far.
> > The other concern is I am NOT sure if there is other build error will
> > occur, since I can NOT cover all arch's build.
> >
> > Do you think it is acceptable if we just drop the COMPILE_TEST support?
> 
> The entire point of COMPILE_TEST is to find bugs in rarely used code.
> As you say, these drivers are rarely used, and compile-testing them found a
> (harmless) bug, so I think that should be addressed and COMPILE_TEST left
> around.

I understand the COMPILE_TEST is useful/important, and I think this support should be
done for all i.MX clock drivers, so do you think if we can use another patch series to support
it for all i.MX clock drivers? I will do that of cause.

Thanks,
Anson

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
       [not found] <DB3PR0402MB39160138993884DA7BFA1F4BF56D0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
@ 2020-07-02  6:56 ` Arnd Bergmann
  2020-07-02  7:01   ` Anson Huang
  0 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2020-07-02  6:56 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]

On Thu, Jul 2, 2020 at 8:27 AM Anson Huang <anson.huang@nxp.com> wrote:
> > Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7
> > platforms
> >
> > On Thu, Jul 2, 2020 at 7:15 AM kernel test robot <lkp@intel.com> wrote:
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > >    drivers/clk/imx/clk-imx21.c:122:12: warning: no previous prototype for
> > 'mx21_clocks_init' [-Wmissing-prototypes]
> > >      122 | int __init mx21_clocks_init(unsigned long lref, unsigned
> > > long href)
> >
> > I'd suggest you add the prototypes in drivers/clk/imx/clk.h, even though the
> > caller doesn't see it there.
> >
> > >          |            ^~~~~~~~~~~~~~~~
> > >    drivers/clk/imx/clk-imx21.c: In function 'mx21_clocks_init':
> > > >> drivers/clk/imx/clk-imx21.c:124:36: error: 'SZ_2K' undeclared
> > > >> (first use in this function)
> > >      124 |  ccm = ioremap(MX21_CCM_BASE_ADDR, SZ_2K);
> >
> > This needs an "#include <linux/sizes.h>
> >
>
> But I wonder do we really need to add COMPILE_TEST for these clk drivers?
> it seems like all i.MX clock drivers do NOT have this build coverage support so far.
> The other concern is I am NOT sure if there is other build error will occur, since
> I can NOT cover all arch's build.
>
> Do you think it is acceptable if we just drop the COMPILE_TEST support?

The entire point of COMPILE_TEST is to find bugs in rarely used code.
As you say, these drivers are rarely used, and compile-testing them found
a (harmless) bug, so I think that should be addressed and COMPILE_TEST
left around.

     Arnd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  5:52   ` kernel test robot
@ 2020-07-02  6:55     ` Arnd Bergmann
  0 siblings, 0 replies; 14+ messages in thread
From: Arnd Bergmann @ 2020-07-02  6:55 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4943 bytes --]

On Thu, Jul 2, 2020 at 7:53 AM kernel test robot <lkp@intel.com> wrote:
>
>    drivers/clk/imx/clk-imx35.c:251:12: warning: no previous prototype for 'mx35_clocks_init' [-Wmissing-prototypes]
>      251 | int __init mx35_clocks_init(void)
>          |            ^~~~~~~~~~~~~~~~
>    drivers/clk/imx/clk-imx35.c: In function 'mx35_clocks_init':
> >> drivers/clk/imx/clk-imx35.c:20:24: error: 'NR_IRQS_LEGACY' undeclared (first use in this function)
>       20 | #define MX35_INT_GPT  (NR_IRQS_LEGACY + 29)
>          |                        ^~~~~~~~~~~~~~
> >> drivers/clk/imx/clk-imx35.c:314:38: note: in expansion of macro 'MX35_INT_GPT'
>      314 |  mxc_timer_init(MX35_GPT1_BASE_ADDR, MX35_INT_GPT, GPT_TYPE_IMX31);
>          |                                      ^~~~~~~~~~~~
>    drivers/clk/imx/clk-imx35.c:20:24: note: each undeclared identifier is reported only once for each function it appears in
>       20 | #define MX35_INT_GPT  (NR_IRQS_LEGACY + 29)
>          |                        ^~~~~~~~~~~~~~
> >> drivers/clk/imx/clk-imx35.c:314:38: note: in expansion of macro 'MX35_INT_GPT'
>      314 |  mxc_timer_init(MX35_GPT1_BASE_ADDR, MX35_INT_GPT, GPT_TYPE_IMX31);
>          |                                      ^~~~~~~~~~~~
>

This is the initialization for non-DT board files calling
mx35_clocks_init(). I think this
can also be fixed trivially by moving those lines back into callers,
in particular since
the clk driver really should not hardcode IRQ numbers for the timer device!
See below for the imx35 patch I have in mind. The same would need to be done for
mx21/27/31 of course, but all these changes are trivial.

Alternatively, we could consider just dropping the remaining i.mx3 board files
that have not been converted to DT yet. There was some effort to clean them
up years ago, but that eventually stalled and I would guess that nobody who
has this hardware would ever upgrade kernels any more (as opposed to
i.mx5 and i.mx21/27, which were more popular to start with).

       Arnd

diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index 7e2e31302f17..0f908785c3e8 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -39,6 +39,7 @@ int mx21_clocks_init(unsigned long lref, unsigned long fref);
 int mx27_clocks_init(unsigned long fref);
 int mx31_clocks_init(unsigned long fref);
 int mx35_clocks_init(void);
+void mx35_timer_init(void);
 struct platform_device *mxc_register_gpio(char *name, int id,
        resource_size_t iobase, resource_size_t iosize, int irq, int irq_high);
 void mxc_set_cpu_type(unsigned int type);
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c
b/arch/arm/mach-imx/mach-mx35_3ds.c
index 967249d8dc67..691457fede99 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -505,6 +505,7 @@ static void __init mx35_3ds_late_init(void)
 static void __init mx35pdk_timer_init(void)
 {
        mx35_clocks_init();
+       mx35_timer_init();
 }

 MACHINE_START(MX35_3DS, "Freescale MX35PDK")
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index e1d149501253..0055e943c15d 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -400,6 +400,7 @@ static void __init pcm043_late_init(void)
 static void __init pcm043_timer_init(void)
 {
        mx35_clocks_init();
+       mx35_timer_init();
 }

 MACHINE_START(PCM043, "Phytec Phycore pcm043")
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index 0b6d854accd2..d49806c4221e 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -294,6 +294,7 @@ static void __init vpr200_late_init(void)
 static void __init vpr200_timer_init(void)
 {
        mx35_clocks_init();
+       mx35_timer_init();
 }

 MACHINE_START(VPR200, "VPR200")
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 5a3b68a62f44..c30faccab917 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -73,6 +73,11 @@ static void __iomem
*imx3_ioremap_caller(phys_addr_t phys_addr, size_t size,
        return __arm_ioremap_caller(phys_addr, size, mtype, caller);
 }

+void __init imx35_timer_init(void)
+{
+       mxc_timer_init(MX35_GPT1_BASE_ADDR, MX35_INT_GPT, GPT_TYPE_IMX31);
+}
+
 static void __init imx3_init_l2x0(void)
 {
 #ifdef CONFIG_CACHE_L2X0
diff --git a/drivers/clk/imx/clk-imx35.c b/drivers/clk/imx/clk-imx35.c
index bf5534cdccb5..60db8cd67043 100644
--- a/drivers/clk/imx/clk-imx35.c
+++ b/drivers/clk/imx/clk-imx35.c
@@ -312,8 +312,6 @@ int __init mx35_clocks_init(void)
        clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
        clk_register_clkdev(clk[admux_gate], "audmux", NULL);

-       mxc_timer_init(MX35_GPT1_BASE_ADDR, MX35_INT_GPT, GPT_TYPE_IMX31);
-
        return 0;
 }

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  6:22     ` Arnd Bergmann
@ 2020-07-02  6:27       ` Anson Huang
  0 siblings, 0 replies; 14+ messages in thread
From: Anson Huang @ 2020-07-02  6:27 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

Hi, Arnd

> Subject: Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7
> platforms
> 
> On Thu, Jul 2, 2020 at 7:15 AM kernel test robot <lkp@intel.com> wrote:
> >
> > All errors (new ones prefixed by >>):
> >
> >    drivers/clk/imx/clk-imx21.c:122:12: warning: no previous prototype for
> 'mx21_clocks_init' [-Wmissing-prototypes]
> >      122 | int __init mx21_clocks_init(unsigned long lref, unsigned
> > long href)
> 
> I'd suggest you add the prototypes in drivers/clk/imx/clk.h, even though the
> caller doesn't see it there.
> 
> >          |            ^~~~~~~~~~~~~~~~
> >    drivers/clk/imx/clk-imx21.c: In function 'mx21_clocks_init':
> > >> drivers/clk/imx/clk-imx21.c:124:36: error: 'SZ_2K' undeclared
> > >> (first use in this function)
> >      124 |  ccm = ioremap(MX21_CCM_BASE_ADDR, SZ_2K);
> 
> This needs an "#include <linux/sizes.h>
> 

But I wonder do we really need to add COMPILE_TEST for these clk drivers?
it seems like all i.MX clock drivers do NOT have this build coverage support so far.
The other concern is I am NOT sure if there is other build error will occur, since
I can NOT cover all arch's build.

Do you think it is acceptable if we just drop the COMPILE_TEST support?

Thanks,
Anson

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  5:14   ` kernel test robot
@ 2020-07-02  6:22     ` Arnd Bergmann
  2020-07-02  6:27       ` Anson Huang
  0 siblings, 1 reply; 14+ messages in thread
From: Arnd Bergmann @ 2020-07-02  6:22 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

On Thu, Jul 2, 2020 at 7:15 AM kernel test robot <lkp@intel.com> wrote:
>
> All errors (new ones prefixed by >>):
>
>    drivers/clk/imx/clk-imx21.c:122:12: warning: no previous prototype for 'mx21_clocks_init' [-Wmissing-prototypes]
>      122 | int __init mx21_clocks_init(unsigned long lref, unsigned long href)

I'd suggest you add the prototypes in drivers/clk/imx/clk.h, even
though the caller doesn't
see it there.

>          |            ^~~~~~~~~~~~~~~~
>    drivers/clk/imx/clk-imx21.c: In function 'mx21_clocks_init':
> >> drivers/clk/imx/clk-imx21.c:124:36: error: 'SZ_2K' undeclared (first use in this function)
>      124 |  ccm = ioremap(MX21_CCM_BASE_ADDR, SZ_2K);

This needs an "#include <linux/sizes.h>

        Arnd

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  2:14   ` Anson Huang
                     ` (2 preceding siblings ...)
  (?)
@ 2020-07-02  5:52   ` kernel test robot
  2020-07-02  6:55     ` Arnd Bergmann
  -1 siblings, 1 reply; 14+ messages in thread
From: kernel test robot @ 2020-07-02  5:52 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2971 bytes --]

Hi Anson,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on shawnguo/for-next]
[also build test ERROR on clk/clk-next v5.8-rc3 next-20200701]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Anson-Huang/Support-building-i-MX8-SoCs-clock-driver-as-module/20200702-102015
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
config: nds32-allmodconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/clk/imx/clk-imx35.c:251:12: warning: no previous prototype for 'mx35_clocks_init' [-Wmissing-prototypes]
     251 | int __init mx35_clocks_init(void)
         |            ^~~~~~~~~~~~~~~~
   drivers/clk/imx/clk-imx35.c: In function 'mx35_clocks_init':
>> drivers/clk/imx/clk-imx35.c:20:24: error: 'NR_IRQS_LEGACY' undeclared (first use in this function)
      20 | #define MX35_INT_GPT  (NR_IRQS_LEGACY + 29)
         |                        ^~~~~~~~~~~~~~
>> drivers/clk/imx/clk-imx35.c:314:38: note: in expansion of macro 'MX35_INT_GPT'
     314 |  mxc_timer_init(MX35_GPT1_BASE_ADDR, MX35_INT_GPT, GPT_TYPE_IMX31);
         |                                      ^~~~~~~~~~~~
   drivers/clk/imx/clk-imx35.c:20:24: note: each undeclared identifier is reported only once for each function it appears in
      20 | #define MX35_INT_GPT  (NR_IRQS_LEGACY + 29)
         |                        ^~~~~~~~~~~~~~
>> drivers/clk/imx/clk-imx35.c:314:38: note: in expansion of macro 'MX35_INT_GPT'
     314 |  mxc_timer_init(MX35_GPT1_BASE_ADDR, MX35_INT_GPT, GPT_TYPE_IMX31);
         |                                      ^~~~~~~~~~~~

vim +/NR_IRQS_LEGACY +20 drivers/clk/imx/clk-imx35.c

0c831317e77b556 arch/arm/mach-imx/clk-imx35.c Shawn Guo 2015-04-25  17  
0c831317e77b556 arch/arm/mach-imx/clk-imx35.c Shawn Guo 2015-04-25  18  #define MX35_CCM_BASE_ADDR	0x53f80000
0c831317e77b556 arch/arm/mach-imx/clk-imx35.c Shawn Guo 2015-04-25  19  #define MX35_GPT1_BASE_ADDR	0x53f90000
0c831317e77b556 arch/arm/mach-imx/clk-imx35.c Shawn Guo 2015-04-25 @20  #define MX35_INT_GPT		(NR_IRQS_LEGACY + 29)
0c831317e77b556 arch/arm/mach-imx/clk-imx35.c Shawn Guo 2015-04-25  21  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 57145 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  2:14   ` Anson Huang
  (?)
  (?)
@ 2020-07-02  5:14   ` kernel test robot
  2020-07-02  6:22     ` Arnd Bergmann
  -1 siblings, 1 reply; 14+ messages in thread
From: kernel test robot @ 2020-07-02  5:14 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 7878 bytes --]

Hi Anson,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on shawnguo/for-next]
[also build test ERROR on clk/clk-next v5.8-rc3 next-20200701]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Anson-Huang/Support-building-i-MX8-SoCs-clock-driver-as-module/20200702-102015
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
config: s390-allyesconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/clk/imx/clk-imx21.c:122:12: warning: no previous prototype for 'mx21_clocks_init' [-Wmissing-prototypes]
     122 | int __init mx21_clocks_init(unsigned long lref, unsigned long href)
         |            ^~~~~~~~~~~~~~~~
   drivers/clk/imx/clk-imx21.c: In function 'mx21_clocks_init':
>> drivers/clk/imx/clk-imx21.c:124:36: error: 'SZ_2K' undeclared (first use in this function)
     124 |  ccm = ioremap(MX21_CCM_BASE_ADDR, SZ_2K);
         |                                    ^~~~~
   drivers/clk/imx/clk-imx21.c:124:36: note: each undeclared identifier is reported only once for each function it appears in
--
   drivers/clk/imx/clk-imx27.c:184:12: warning: no previous prototype for 'mx27_clocks_init' [-Wmissing-prototypes]
     184 | int __init mx27_clocks_init(unsigned long fref)
         |            ^~~~~~~~~~~~~~~~
   drivers/clk/imx/clk-imx27.c: In function 'mx27_clocks_init':
>> drivers/clk/imx/clk-imx27.c:186:36: error: 'SZ_4K' undeclared (first use in this function)
     186 |  ccm = ioremap(MX27_CCM_BASE_ADDR, SZ_4K);
         |                                    ^~~~~
   drivers/clk/imx/clk-imx27.c:186:36: note: each undeclared identifier is reported only once for each function it appears in

vim +/SZ_2K +124 drivers/clk/imx/clk-imx21.c

93421e42277009 arch/arm/mach-imx/clk-imx21.c Sascha Hauer     2012-03-09  121  
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22 @122  int __init mx21_clocks_init(unsigned long lref, unsigned long href)
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  123  {
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22 @124  	ccm = ioremap(MX21_CCM_BASE_ADDR, SZ_2K);
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  125  
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  126  	_mx21_clocks_init(lref, href);
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  127  
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  128  	clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  129  	clk_register_clkdev(clk[IMX21_CLK_UART1_IPG_GATE], "ipg", "imx21-uart.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  130  	clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.1");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  131  	clk_register_clkdev(clk[IMX21_CLK_UART2_IPG_GATE], "ipg", "imx21-uart.1");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  132  	clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.2");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  133  	clk_register_clkdev(clk[IMX21_CLK_UART3_IPG_GATE], "ipg", "imx21-uart.2");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  134  	clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx21-uart.3");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  135  	clk_register_clkdev(clk[IMX21_CLK_UART4_IPG_GATE], "ipg", "imx21-uart.3");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  136  	clk_register_clkdev(clk[IMX21_CLK_GPT1_IPG_GATE], "ipg", "imx-gpt.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  137  	clk_register_clkdev(clk[IMX21_CLK_PER1], "per", "imx-gpt.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  138  	clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  139  	clk_register_clkdev(clk[IMX21_CLK_CSPI1_IPG_GATE], "ipg", "imx21-cspi.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  140  	clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.1");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  141  	clk_register_clkdev(clk[IMX21_CLK_CSPI2_IPG_GATE], "ipg", "imx21-cspi.1");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  142  	clk_register_clkdev(clk[IMX21_CLK_PER2], "per", "imx21-cspi.2");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  143  	clk_register_clkdev(clk[IMX21_CLK_CSPI3_IPG_GATE], "ipg", "imx21-cspi.2");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  144  	clk_register_clkdev(clk[IMX21_CLK_PER3], "per", "imx21-fb.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  145  	clk_register_clkdev(clk[IMX21_CLK_LCDC_IPG_GATE], "ipg", "imx21-fb.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  146  	clk_register_clkdev(clk[IMX21_CLK_LCDC_HCLK_GATE], "ahb", "imx21-fb.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  147  	clk_register_clkdev(clk[IMX21_CLK_USB_GATE], "per", "imx21-hcd.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  148  	clk_register_clkdev(clk[IMX21_CLK_USB_HCLK_GATE], "ahb", "imx21-hcd.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  149  	clk_register_clkdev(clk[IMX21_CLK_NFC_GATE], NULL, "imx21-nand.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  150  	clk_register_clkdev(clk[IMX21_CLK_DMA_HCLK_GATE], "ahb", "imx21-dma");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  151  	clk_register_clkdev(clk[IMX21_CLK_DMA_GATE], "ipg", "imx21-dma");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  152  	clk_register_clkdev(clk[IMX21_CLK_WDOG_GATE], NULL, "imx2-wdt.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  153  	clk_register_clkdev(clk[IMX21_CLK_I2C_GATE], NULL, "imx21-i2c.0");
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  154  	clk_register_clkdev(clk[IMX21_CLK_OWIRE_GATE], NULL, "mxc_w1.0");
93421e42277009 arch/arm/mach-imx/clk-imx21.c Sascha Hauer     2012-03-09  155  
0931aff7226abb drivers/clk/imx/clk-imx21.c   Shawn Guo        2015-05-15  156  	mxc_timer_init(MX21_GPT1_BASE_ADDR, MX21_INT_GPT1, GPT_TYPE_IMX21);
2cfb45188a997b arch/arm/mach-imx/clk-imx21.c Sascha Hauer     2012-05-16  157  
93421e42277009 arch/arm/mach-imx/clk-imx21.c Sascha Hauer     2012-03-09  158  	return 0;
93421e42277009 arch/arm/mach-imx/clk-imx21.c Sascha Hauer     2012-03-09  159  }
35bcaf00de2091 arch/arm/mach-imx/clk-imx21.c Alexander Shiyan 2014-06-22  160  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 62692 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  2:14   ` Anson Huang
@ 2020-07-02  2:38     ` Aisheng Dong
  -1 siblings, 0 replies; 14+ messages in thread
From: Aisheng Dong @ 2020-07-02  2:38 UTC (permalink / raw)
  To: Anson Huang, mturquette, sboyd, shawnguo, s.hauer, kernel,
	festevam, Peng Fan, arnd, Abel Vesa, Andy Duan, Daniel Baluta,
	yuehaibing, sfr, linux-clk, linux-kernel, linux-arm-kernel
  Cc: dl-linux-imx

> From: Anson Huang <Anson.Huang@nxp.com>
> Sent: Thursday, July 2, 2020 10:15 AM
> 
> Add CONFIG_CLK_xxx for i.MX ARMv7 platforms, and use it as build option
> instead of CONFIG_SOC_xxx, the CONFIG_CLK_xxx will be selected by default
> according to CONFIG_SOC_xxx.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Aisheng

> ---
> Changes since V3:
> 	- Add clock configuration for each ARMv7.
> ---
>  drivers/clk/imx/Kconfig  | 90
> ++++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/clk/imx/Makefile | 30 ++++++++--------
>  2 files changed, 105 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index
> db0253f..09fc8ad 100644
> --- a/drivers/clk/imx/Kconfig
> +++ b/drivers/clk/imx/Kconfig
> @@ -8,6 +8,96 @@ config MXC_CLK_SCU
>  	bool
>  	depends on IMX_SCU
> 
> +config CLK_IMX1
> +         bool "IMX1 CCM Clock Driver"
> +         depends on SOC_IMX1 || COMPILE_TEST
> +         default SOC_IMX1
> +         select MXC_CLK
> +
> +config CLK_IMX21
> +         bool "IMX21 CCM Clock Driver"
> +         depends on SOC_IMX21 || COMPILE_TEST
> +         default SOC_IMX21
> +         select MXC_CLK
> +
> +config CLK_IMX25
> +         bool "IMX25 CCM Clock Driver"
> +         depends on SOC_IMX25 || COMPILE_TEST
> +         default SOC_IMX25
> +         select MXC_CLK
> +
> +config CLK_IMX27
> +         bool "IMX27 CCM Clock Driver"
> +         depends on SOC_IMX27 || COMPILE_TEST
> +         default SOC_IMX27
> +         select MXC_CLK
> +
> +config CLK_IMX31
> +         bool "IMX31 CCM Clock Driver"
> +         depends on SOC_IMX31 || COMPILE_TEST
> +         default SOC_IMX31
> +         select MXC_CLK
> +
> +config CLK_IMX35
> +         bool "IMX35 CCM Clock Driver"
> +         depends on SOC_IMX35 || COMPILE_TEST
> +         default SOC_IMX35
> +         select MXC_CLK
> +
> +config CLK_IMX5
> +         bool "IMX5 CCM Clock Driver"
> +         depends on SOC_IMX5 || COMPILE_TEST
> +         default SOC_IMX5
> +         select MXC_CLK
> +
> +config CLK_IMX6Q
> +         bool "IMX6Q CCM Clock Driver"
> +         depends on SOC_IMX6Q || COMPILE_TEST
> +         default SOC_IMX6Q
> +         select MXC_CLK
> +
> +config CLK_IMX6SL
> +         bool "IMX6SL CCM Clock Driver"
> +         depends on SOC_IMX6SL || COMPILE_TEST
> +         default SOC_IMX6SL
> +         select MXC_CLK
> +
> +config CLK_IMX6SLL
> +         bool "IMX6SLL CCM Clock Driver"
> +         depends on SOC_IMX6SLL || COMPILE_TEST
> +         default SOC_IMX6SLL
> +         select MXC_CLK
> +
> +config CLK_IMX6SX
> +         bool "IMX6SX CCM Clock Driver"
> +         depends on SOC_IMX6SX || COMPILE_TEST
> +         default SOC_IMX6SX
> +         select MXC_CLK
> +
> +config CLK_IMX6UL
> +         bool "IMX6UL CCM Clock Driver"
> +         depends on SOC_IMX6UL || COMPILE_TEST
> +         default SOC_IMX6UL
> +         select MXC_CLK
> +
> +config CLK_IMX7D
> +         bool "IMX7D CCM Clock Driver"
> +         depends on SOC_IMX7D || COMPILE_TEST
> +         default SOC_IMX7D
> +         select MXC_CLK
> +
> +config CLK_IMX7ULP
> +         bool "IMX7ULP Clock Driver"
> +         depends on SOC_IMX7ULP || COMPILE_TEST
> +         default SOC_IMX7ULP
> +         select MXC_CLK
> +
> +config CLK_VF610
> +         bool "VF610 Clock Driver"
> +         depends on SOC_VF610 || COMPILE_TEST
> +         default SOC_VF610
> +         select MXC_CLK
> +
>  config CLK_IMX8MM
>  	bool "IMX8MM CCM Clock Driver"
>  	depends on ARCH_MXC
> diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index
> 928f874..394ade7 100644
> --- a/drivers/clk/imx/Makefile
> +++ b/drivers/clk/imx/Makefile
> @@ -31,18 +31,18 @@ obj-$(CONFIG_CLK_IMX8MP) += clk-imx8mp.o
>  obj-$(CONFIG_CLK_IMX8MQ) += clk-imx8mq.o
>  obj-$(CONFIG_CLK_IMX8QXP) += clk-imx8qxp.o clk-imx8qxp-lpcg.o
> 
> -obj-$(CONFIG_SOC_IMX1)   += clk-imx1.o
> -obj-$(CONFIG_SOC_IMX21)  += clk-imx21.o
> -obj-$(CONFIG_SOC_IMX25)  += clk-imx25.o
> -obj-$(CONFIG_SOC_IMX27)  += clk-imx27.o
> -obj-$(CONFIG_SOC_IMX31)  += clk-imx31.o
> -obj-$(CONFIG_SOC_IMX35)  += clk-imx35.o
> -obj-$(CONFIG_SOC_IMX5)   += clk-imx5.o
> -obj-$(CONFIG_SOC_IMX6Q)  += clk-imx6q.o
> -obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o
> -obj-$(CONFIG_SOC_IMX6SLL) += clk-imx6sll.o
> -obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o
> -obj-$(CONFIG_SOC_IMX6UL) += clk-imx6ul.o
> -obj-$(CONFIG_SOC_IMX7D)  += clk-imx7d.o
> -obj-$(CONFIG_SOC_IMX7ULP) += clk-imx7ulp.o
> -obj-$(CONFIG_SOC_VF610)  += clk-vf610.o
> +obj-$(CONFIG_CLK_IMX1)   += clk-imx1.o
> +obj-$(CONFIG_CLK_IMX21)  += clk-imx21.o
> +obj-$(CONFIG_CLK_IMX25)  += clk-imx25.o
> +obj-$(CONFIG_CLK_IMX27)  += clk-imx27.o
> +obj-$(CONFIG_CLK_IMX31)  += clk-imx31.o
> +obj-$(CONFIG_CLK_IMX35)  += clk-imx35.o
> +obj-$(CONFIG_CLK_IMX5)   += clk-imx5.o
> +obj-$(CONFIG_CLK_IMX6Q)  += clk-imx6q.o
> +obj-$(CONFIG_CLK_IMX6SL) += clk-imx6sl.o
> +obj-$(CONFIG_CLK_IMX6SLL) += clk-imx6sll.o
> +obj-$(CONFIG_CLK_IMX6SX) += clk-imx6sx.o
> +obj-$(CONFIG_CLK_IMX6UL) += clk-imx6ul.o
> +obj-$(CONFIG_CLK_IMX7D)  += clk-imx7d.o
> +obj-$(CONFIG_CLK_IMX7ULP) += clk-imx7ulp.o
> +obj-$(CONFIG_CLK_VF610)  += clk-vf610.o
> --
> 2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
@ 2020-07-02  2:38     ` Aisheng Dong
  0 siblings, 0 replies; 14+ messages in thread
From: Aisheng Dong @ 2020-07-02  2:38 UTC (permalink / raw)
  To: Anson Huang, mturquette, sboyd, shawnguo, s.hauer, kernel,
	festevam, Peng Fan, arnd, Abel Vesa, Andy Duan, Daniel Baluta,
	yuehaibing, sfr, linux-clk, linux-kernel, linux-arm-kernel
  Cc: dl-linux-imx

> From: Anson Huang <Anson.Huang@nxp.com>
> Sent: Thursday, July 2, 2020 10:15 AM
> 
> Add CONFIG_CLK_xxx for i.MX ARMv7 platforms, and use it as build option
> instead of CONFIG_SOC_xxx, the CONFIG_CLK_xxx will be selected by default
> according to CONFIG_SOC_xxx.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Aisheng

> ---
> Changes since V3:
> 	- Add clock configuration for each ARMv7.
> ---
>  drivers/clk/imx/Kconfig  | 90
> ++++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/clk/imx/Makefile | 30 ++++++++--------
>  2 files changed, 105 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig index
> db0253f..09fc8ad 100644
> --- a/drivers/clk/imx/Kconfig
> +++ b/drivers/clk/imx/Kconfig
> @@ -8,6 +8,96 @@ config MXC_CLK_SCU
>  	bool
>  	depends on IMX_SCU
> 
> +config CLK_IMX1
> +         bool "IMX1 CCM Clock Driver"
> +         depends on SOC_IMX1 || COMPILE_TEST
> +         default SOC_IMX1
> +         select MXC_CLK
> +
> +config CLK_IMX21
> +         bool "IMX21 CCM Clock Driver"
> +         depends on SOC_IMX21 || COMPILE_TEST
> +         default SOC_IMX21
> +         select MXC_CLK
> +
> +config CLK_IMX25
> +         bool "IMX25 CCM Clock Driver"
> +         depends on SOC_IMX25 || COMPILE_TEST
> +         default SOC_IMX25
> +         select MXC_CLK
> +
> +config CLK_IMX27
> +         bool "IMX27 CCM Clock Driver"
> +         depends on SOC_IMX27 || COMPILE_TEST
> +         default SOC_IMX27
> +         select MXC_CLK
> +
> +config CLK_IMX31
> +         bool "IMX31 CCM Clock Driver"
> +         depends on SOC_IMX31 || COMPILE_TEST
> +         default SOC_IMX31
> +         select MXC_CLK
> +
> +config CLK_IMX35
> +         bool "IMX35 CCM Clock Driver"
> +         depends on SOC_IMX35 || COMPILE_TEST
> +         default SOC_IMX35
> +         select MXC_CLK
> +
> +config CLK_IMX5
> +         bool "IMX5 CCM Clock Driver"
> +         depends on SOC_IMX5 || COMPILE_TEST
> +         default SOC_IMX5
> +         select MXC_CLK
> +
> +config CLK_IMX6Q
> +         bool "IMX6Q CCM Clock Driver"
> +         depends on SOC_IMX6Q || COMPILE_TEST
> +         default SOC_IMX6Q
> +         select MXC_CLK
> +
> +config CLK_IMX6SL
> +         bool "IMX6SL CCM Clock Driver"
> +         depends on SOC_IMX6SL || COMPILE_TEST
> +         default SOC_IMX6SL
> +         select MXC_CLK
> +
> +config CLK_IMX6SLL
> +         bool "IMX6SLL CCM Clock Driver"
> +         depends on SOC_IMX6SLL || COMPILE_TEST
> +         default SOC_IMX6SLL
> +         select MXC_CLK
> +
> +config CLK_IMX6SX
> +         bool "IMX6SX CCM Clock Driver"
> +         depends on SOC_IMX6SX || COMPILE_TEST
> +         default SOC_IMX6SX
> +         select MXC_CLK
> +
> +config CLK_IMX6UL
> +         bool "IMX6UL CCM Clock Driver"
> +         depends on SOC_IMX6UL || COMPILE_TEST
> +         default SOC_IMX6UL
> +         select MXC_CLK
> +
> +config CLK_IMX7D
> +         bool "IMX7D CCM Clock Driver"
> +         depends on SOC_IMX7D || COMPILE_TEST
> +         default SOC_IMX7D
> +         select MXC_CLK
> +
> +config CLK_IMX7ULP
> +         bool "IMX7ULP Clock Driver"
> +         depends on SOC_IMX7ULP || COMPILE_TEST
> +         default SOC_IMX7ULP
> +         select MXC_CLK
> +
> +config CLK_VF610
> +         bool "VF610 Clock Driver"
> +         depends on SOC_VF610 || COMPILE_TEST
> +         default SOC_VF610
> +         select MXC_CLK
> +
>  config CLK_IMX8MM
>  	bool "IMX8MM CCM Clock Driver"
>  	depends on ARCH_MXC
> diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index
> 928f874..394ade7 100644
> --- a/drivers/clk/imx/Makefile
> +++ b/drivers/clk/imx/Makefile
> @@ -31,18 +31,18 @@ obj-$(CONFIG_CLK_IMX8MP) += clk-imx8mp.o
>  obj-$(CONFIG_CLK_IMX8MQ) += clk-imx8mq.o
>  obj-$(CONFIG_CLK_IMX8QXP) += clk-imx8qxp.o clk-imx8qxp-lpcg.o
> 
> -obj-$(CONFIG_SOC_IMX1)   += clk-imx1.o
> -obj-$(CONFIG_SOC_IMX21)  += clk-imx21.o
> -obj-$(CONFIG_SOC_IMX25)  += clk-imx25.o
> -obj-$(CONFIG_SOC_IMX27)  += clk-imx27.o
> -obj-$(CONFIG_SOC_IMX31)  += clk-imx31.o
> -obj-$(CONFIG_SOC_IMX35)  += clk-imx35.o
> -obj-$(CONFIG_SOC_IMX5)   += clk-imx5.o
> -obj-$(CONFIG_SOC_IMX6Q)  += clk-imx6q.o
> -obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o
> -obj-$(CONFIG_SOC_IMX6SLL) += clk-imx6sll.o
> -obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o
> -obj-$(CONFIG_SOC_IMX6UL) += clk-imx6ul.o
> -obj-$(CONFIG_SOC_IMX7D)  += clk-imx7d.o
> -obj-$(CONFIG_SOC_IMX7ULP) += clk-imx7ulp.o
> -obj-$(CONFIG_SOC_VF610)  += clk-vf610.o
> +obj-$(CONFIG_CLK_IMX1)   += clk-imx1.o
> +obj-$(CONFIG_CLK_IMX21)  += clk-imx21.o
> +obj-$(CONFIG_CLK_IMX25)  += clk-imx25.o
> +obj-$(CONFIG_CLK_IMX27)  += clk-imx27.o
> +obj-$(CONFIG_CLK_IMX31)  += clk-imx31.o
> +obj-$(CONFIG_CLK_IMX35)  += clk-imx35.o
> +obj-$(CONFIG_CLK_IMX5)   += clk-imx5.o
> +obj-$(CONFIG_CLK_IMX6Q)  += clk-imx6q.o
> +obj-$(CONFIG_CLK_IMX6SL) += clk-imx6sl.o
> +obj-$(CONFIG_CLK_IMX6SLL) += clk-imx6sll.o
> +obj-$(CONFIG_CLK_IMX6SX) += clk-imx6sx.o
> +obj-$(CONFIG_CLK_IMX6UL) += clk-imx6ul.o
> +obj-$(CONFIG_CLK_IMX7D)  += clk-imx7d.o
> +obj-$(CONFIG_CLK_IMX7ULP) += clk-imx7ulp.o
> +obj-$(CONFIG_CLK_VF610)  += clk-vf610.o
> --
> 2.7.4

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
  2020-07-02  2:14 [PATCH V4 0/5] Support building i.MX8 SoCs clock driver as module Anson Huang
@ 2020-07-02  2:14   ` Anson Huang
  0 siblings, 0 replies; 14+ messages in thread
From: Anson Huang @ 2020-07-02  2:14 UTC (permalink / raw)
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam, peng.fan,
	arnd, abel.vesa, aisheng.dong, fugang.duan, daniel.baluta,
	yuehaibing, sfr, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Linux-imx

Add CONFIG_CLK_xxx for i.MX ARMv7 platforms, and use it as build option
instead of CONFIG_SOC_xxx, the CONFIG_CLK_xxx will be selected by default
according to CONFIG_SOC_xxx.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
Changes since V3:
	- Add clock configuration for each ARMv7.
---
 drivers/clk/imx/Kconfig  | 90 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/imx/Makefile | 30 ++++++++--------
 2 files changed, 105 insertions(+), 15 deletions(-)

diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig
index db0253f..09fc8ad 100644
--- a/drivers/clk/imx/Kconfig
+++ b/drivers/clk/imx/Kconfig
@@ -8,6 +8,96 @@ config MXC_CLK_SCU
 	bool
 	depends on IMX_SCU
 
+config CLK_IMX1
+         bool "IMX1 CCM Clock Driver"
+         depends on SOC_IMX1 || COMPILE_TEST
+         default SOC_IMX1
+         select MXC_CLK
+
+config CLK_IMX21
+         bool "IMX21 CCM Clock Driver"
+         depends on SOC_IMX21 || COMPILE_TEST
+         default SOC_IMX21
+         select MXC_CLK
+
+config CLK_IMX25
+         bool "IMX25 CCM Clock Driver"
+         depends on SOC_IMX25 || COMPILE_TEST
+         default SOC_IMX25
+         select MXC_CLK
+
+config CLK_IMX27
+         bool "IMX27 CCM Clock Driver"
+         depends on SOC_IMX27 || COMPILE_TEST
+         default SOC_IMX27
+         select MXC_CLK
+
+config CLK_IMX31
+         bool "IMX31 CCM Clock Driver"
+         depends on SOC_IMX31 || COMPILE_TEST
+         default SOC_IMX31
+         select MXC_CLK
+
+config CLK_IMX35
+         bool "IMX35 CCM Clock Driver"
+         depends on SOC_IMX35 || COMPILE_TEST
+         default SOC_IMX35
+         select MXC_CLK
+
+config CLK_IMX5
+         bool "IMX5 CCM Clock Driver"
+         depends on SOC_IMX5 || COMPILE_TEST
+         default SOC_IMX5
+         select MXC_CLK
+
+config CLK_IMX6Q
+         bool "IMX6Q CCM Clock Driver"
+         depends on SOC_IMX6Q || COMPILE_TEST
+         default SOC_IMX6Q
+         select MXC_CLK
+
+config CLK_IMX6SL
+         bool "IMX6SL CCM Clock Driver"
+         depends on SOC_IMX6SL || COMPILE_TEST
+         default SOC_IMX6SL
+         select MXC_CLK
+
+config CLK_IMX6SLL
+         bool "IMX6SLL CCM Clock Driver"
+         depends on SOC_IMX6SLL || COMPILE_TEST
+         default SOC_IMX6SLL
+         select MXC_CLK
+
+config CLK_IMX6SX
+         bool "IMX6SX CCM Clock Driver"
+         depends on SOC_IMX6SX || COMPILE_TEST
+         default SOC_IMX6SX
+         select MXC_CLK
+
+config CLK_IMX6UL
+         bool "IMX6UL CCM Clock Driver"
+         depends on SOC_IMX6UL || COMPILE_TEST
+         default SOC_IMX6UL
+         select MXC_CLK
+
+config CLK_IMX7D
+         bool "IMX7D CCM Clock Driver"
+         depends on SOC_IMX7D || COMPILE_TEST
+         default SOC_IMX7D
+         select MXC_CLK
+
+config CLK_IMX7ULP
+         bool "IMX7ULP Clock Driver"
+         depends on SOC_IMX7ULP || COMPILE_TEST
+         default SOC_IMX7ULP
+         select MXC_CLK
+
+config CLK_VF610
+         bool "VF610 Clock Driver"
+         depends on SOC_VF610 || COMPILE_TEST
+         default SOC_VF610
+         select MXC_CLK
+
 config CLK_IMX8MM
 	bool "IMX8MM CCM Clock Driver"
 	depends on ARCH_MXC
diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile
index 928f874..394ade7 100644
--- a/drivers/clk/imx/Makefile
+++ b/drivers/clk/imx/Makefile
@@ -31,18 +31,18 @@ obj-$(CONFIG_CLK_IMX8MP) += clk-imx8mp.o
 obj-$(CONFIG_CLK_IMX8MQ) += clk-imx8mq.o
 obj-$(CONFIG_CLK_IMX8QXP) += clk-imx8qxp.o clk-imx8qxp-lpcg.o
 
-obj-$(CONFIG_SOC_IMX1)   += clk-imx1.o
-obj-$(CONFIG_SOC_IMX21)  += clk-imx21.o
-obj-$(CONFIG_SOC_IMX25)  += clk-imx25.o
-obj-$(CONFIG_SOC_IMX27)  += clk-imx27.o
-obj-$(CONFIG_SOC_IMX31)  += clk-imx31.o
-obj-$(CONFIG_SOC_IMX35)  += clk-imx35.o
-obj-$(CONFIG_SOC_IMX5)   += clk-imx5.o
-obj-$(CONFIG_SOC_IMX6Q)  += clk-imx6q.o
-obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o
-obj-$(CONFIG_SOC_IMX6SLL) += clk-imx6sll.o
-obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o
-obj-$(CONFIG_SOC_IMX6UL) += clk-imx6ul.o
-obj-$(CONFIG_SOC_IMX7D)  += clk-imx7d.o
-obj-$(CONFIG_SOC_IMX7ULP) += clk-imx7ulp.o
-obj-$(CONFIG_SOC_VF610)  += clk-vf610.o
+obj-$(CONFIG_CLK_IMX1)   += clk-imx1.o
+obj-$(CONFIG_CLK_IMX21)  += clk-imx21.o
+obj-$(CONFIG_CLK_IMX25)  += clk-imx25.o
+obj-$(CONFIG_CLK_IMX27)  += clk-imx27.o
+obj-$(CONFIG_CLK_IMX31)  += clk-imx31.o
+obj-$(CONFIG_CLK_IMX35)  += clk-imx35.o
+obj-$(CONFIG_CLK_IMX5)   += clk-imx5.o
+obj-$(CONFIG_CLK_IMX6Q)  += clk-imx6q.o
+obj-$(CONFIG_CLK_IMX6SL) += clk-imx6sl.o
+obj-$(CONFIG_CLK_IMX6SLL) += clk-imx6sll.o
+obj-$(CONFIG_CLK_IMX6SX) += clk-imx6sx.o
+obj-$(CONFIG_CLK_IMX6UL) += clk-imx6ul.o
+obj-$(CONFIG_CLK_IMX7D)  += clk-imx7d.o
+obj-$(CONFIG_CLK_IMX7ULP) += clk-imx7ulp.o
+obj-$(CONFIG_CLK_VF610)  += clk-vf610.o
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms
@ 2020-07-02  2:14   ` Anson Huang
  0 siblings, 0 replies; 14+ messages in thread
From: Anson Huang @ 2020-07-02  2:14 UTC (permalink / raw)
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam, peng.fan,
	arnd, abel.vesa, aisheng.dong, fugang.duan, daniel.baluta,
	yuehaibing, sfr, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Linux-imx

Add CONFIG_CLK_xxx for i.MX ARMv7 platforms, and use it as build option
instead of CONFIG_SOC_xxx, the CONFIG_CLK_xxx will be selected by default
according to CONFIG_SOC_xxx.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
Changes since V3:
	- Add clock configuration for each ARMv7.
---
 drivers/clk/imx/Kconfig  | 90 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/imx/Makefile | 30 ++++++++--------
 2 files changed, 105 insertions(+), 15 deletions(-)

diff --git a/drivers/clk/imx/Kconfig b/drivers/clk/imx/Kconfig
index db0253f..09fc8ad 100644
--- a/drivers/clk/imx/Kconfig
+++ b/drivers/clk/imx/Kconfig
@@ -8,6 +8,96 @@ config MXC_CLK_SCU
 	bool
 	depends on IMX_SCU
 
+config CLK_IMX1
+         bool "IMX1 CCM Clock Driver"
+         depends on SOC_IMX1 || COMPILE_TEST
+         default SOC_IMX1
+         select MXC_CLK
+
+config CLK_IMX21
+         bool "IMX21 CCM Clock Driver"
+         depends on SOC_IMX21 || COMPILE_TEST
+         default SOC_IMX21
+         select MXC_CLK
+
+config CLK_IMX25
+         bool "IMX25 CCM Clock Driver"
+         depends on SOC_IMX25 || COMPILE_TEST
+         default SOC_IMX25
+         select MXC_CLK
+
+config CLK_IMX27
+         bool "IMX27 CCM Clock Driver"
+         depends on SOC_IMX27 || COMPILE_TEST
+         default SOC_IMX27
+         select MXC_CLK
+
+config CLK_IMX31
+         bool "IMX31 CCM Clock Driver"
+         depends on SOC_IMX31 || COMPILE_TEST
+         default SOC_IMX31
+         select MXC_CLK
+
+config CLK_IMX35
+         bool "IMX35 CCM Clock Driver"
+         depends on SOC_IMX35 || COMPILE_TEST
+         default SOC_IMX35
+         select MXC_CLK
+
+config CLK_IMX5
+         bool "IMX5 CCM Clock Driver"
+         depends on SOC_IMX5 || COMPILE_TEST
+         default SOC_IMX5
+         select MXC_CLK
+
+config CLK_IMX6Q
+         bool "IMX6Q CCM Clock Driver"
+         depends on SOC_IMX6Q || COMPILE_TEST
+         default SOC_IMX6Q
+         select MXC_CLK
+
+config CLK_IMX6SL
+         bool "IMX6SL CCM Clock Driver"
+         depends on SOC_IMX6SL || COMPILE_TEST
+         default SOC_IMX6SL
+         select MXC_CLK
+
+config CLK_IMX6SLL
+         bool "IMX6SLL CCM Clock Driver"
+         depends on SOC_IMX6SLL || COMPILE_TEST
+         default SOC_IMX6SLL
+         select MXC_CLK
+
+config CLK_IMX6SX
+         bool "IMX6SX CCM Clock Driver"
+         depends on SOC_IMX6SX || COMPILE_TEST
+         default SOC_IMX6SX
+         select MXC_CLK
+
+config CLK_IMX6UL
+         bool "IMX6UL CCM Clock Driver"
+         depends on SOC_IMX6UL || COMPILE_TEST
+         default SOC_IMX6UL
+         select MXC_CLK
+
+config CLK_IMX7D
+         bool "IMX7D CCM Clock Driver"
+         depends on SOC_IMX7D || COMPILE_TEST
+         default SOC_IMX7D
+         select MXC_CLK
+
+config CLK_IMX7ULP
+         bool "IMX7ULP Clock Driver"
+         depends on SOC_IMX7ULP || COMPILE_TEST
+         default SOC_IMX7ULP
+         select MXC_CLK
+
+config CLK_VF610
+         bool "VF610 Clock Driver"
+         depends on SOC_VF610 || COMPILE_TEST
+         default SOC_VF610
+         select MXC_CLK
+
 config CLK_IMX8MM
 	bool "IMX8MM CCM Clock Driver"
 	depends on ARCH_MXC
diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile
index 928f874..394ade7 100644
--- a/drivers/clk/imx/Makefile
+++ b/drivers/clk/imx/Makefile
@@ -31,18 +31,18 @@ obj-$(CONFIG_CLK_IMX8MP) += clk-imx8mp.o
 obj-$(CONFIG_CLK_IMX8MQ) += clk-imx8mq.o
 obj-$(CONFIG_CLK_IMX8QXP) += clk-imx8qxp.o clk-imx8qxp-lpcg.o
 
-obj-$(CONFIG_SOC_IMX1)   += clk-imx1.o
-obj-$(CONFIG_SOC_IMX21)  += clk-imx21.o
-obj-$(CONFIG_SOC_IMX25)  += clk-imx25.o
-obj-$(CONFIG_SOC_IMX27)  += clk-imx27.o
-obj-$(CONFIG_SOC_IMX31)  += clk-imx31.o
-obj-$(CONFIG_SOC_IMX35)  += clk-imx35.o
-obj-$(CONFIG_SOC_IMX5)   += clk-imx5.o
-obj-$(CONFIG_SOC_IMX6Q)  += clk-imx6q.o
-obj-$(CONFIG_SOC_IMX6SL) += clk-imx6sl.o
-obj-$(CONFIG_SOC_IMX6SLL) += clk-imx6sll.o
-obj-$(CONFIG_SOC_IMX6SX) += clk-imx6sx.o
-obj-$(CONFIG_SOC_IMX6UL) += clk-imx6ul.o
-obj-$(CONFIG_SOC_IMX7D)  += clk-imx7d.o
-obj-$(CONFIG_SOC_IMX7ULP) += clk-imx7ulp.o
-obj-$(CONFIG_SOC_VF610)  += clk-vf610.o
+obj-$(CONFIG_CLK_IMX1)   += clk-imx1.o
+obj-$(CONFIG_CLK_IMX21)  += clk-imx21.o
+obj-$(CONFIG_CLK_IMX25)  += clk-imx25.o
+obj-$(CONFIG_CLK_IMX27)  += clk-imx27.o
+obj-$(CONFIG_CLK_IMX31)  += clk-imx31.o
+obj-$(CONFIG_CLK_IMX35)  += clk-imx35.o
+obj-$(CONFIG_CLK_IMX5)   += clk-imx5.o
+obj-$(CONFIG_CLK_IMX6Q)  += clk-imx6q.o
+obj-$(CONFIG_CLK_IMX6SL) += clk-imx6sl.o
+obj-$(CONFIG_CLK_IMX6SLL) += clk-imx6sll.o
+obj-$(CONFIG_CLK_IMX6SX) += clk-imx6sx.o
+obj-$(CONFIG_CLK_IMX6UL) += clk-imx6ul.o
+obj-$(CONFIG_CLK_IMX7D)  += clk-imx7d.o
+obj-$(CONFIG_CLK_IMX7ULP) += clk-imx7ulp.o
+obj-$(CONFIG_CLK_VF610)  += clk-vf610.o
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-07-02  8:03 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <DB3PR0402MB3916DD6BD7E8608E4BEA2E25F56D0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
2020-07-02  7:41 ` [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms Arnd Bergmann
2020-07-02  7:52   ` Anson Huang
     [not found] <DB3PR0402MB3916FF11D39F358FCC302484F56D0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
2020-07-02  8:03 ` Arnd Bergmann
     [not found] <DB3PR0402MB39160138993884DA7BFA1F4BF56D0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
2020-07-02  6:56 ` Arnd Bergmann
2020-07-02  7:01   ` Anson Huang
2020-07-02  2:14 [PATCH V4 0/5] Support building i.MX8 SoCs clock driver as module Anson Huang
2020-07-02  2:14 ` [PATCH V4 2/5] clk: imx: Add clock configuration for ARMv7 platforms Anson Huang
2020-07-02  2:14   ` Anson Huang
2020-07-02  2:38   ` Aisheng Dong
2020-07-02  2:38     ` Aisheng Dong
2020-07-02  5:14   ` kernel test robot
2020-07-02  6:22     ` Arnd Bergmann
2020-07-02  6:27       ` Anson Huang
2020-07-02  5:52   ` kernel test robot
2020-07-02  6:55     ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.