Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-07 Thread Masahiro Yamada
2017-06-07 17:17 GMT+09:00 Maxime Ripard :
> On Wed, Jun 07, 2017 at 09:36:34AM +0200, Arnd Bergmann wrote:
>> On Wed, Jun 7, 2017 at 7:45 AM, Chen-Yu Tsai  wrote:
>> > at the bottom (with a comment) would be cleaner, and
>> > we wouldn't need to modify all the existing lines.
>> > AFAIK about Makefiles, that should work?
>>
>> Ah, yes. That's much better.
>>
>>   Arnd
>
> I just applied the original patch, with that addition, and a comment
> as suggested by Stephen.
>


Hmm, I think Kbuild expects lib.a only for the final link
(at least in official level)
Is it a problem to compile common files all the time?

# Common objects
obj-y += ccu_common.o
obj-y += ccu_reset.o


We may end up with some unused functions in vmlinux,
but it will not be a big impact on the image size in this case.

CONFIG_LD_DEAD_CODE_DATA_ELIMINATION may
take care of unused symbols.  I have not tested this CONFIG, though.



-- 
Best Regards
Masahiro Yamada


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-07 Thread Masahiro Yamada
2017-06-07 17:17 GMT+09:00 Maxime Ripard :
> On Wed, Jun 07, 2017 at 09:36:34AM +0200, Arnd Bergmann wrote:
>> On Wed, Jun 7, 2017 at 7:45 AM, Chen-Yu Tsai  wrote:
>> > at the bottom (with a comment) would be cleaner, and
>> > we wouldn't need to modify all the existing lines.
>> > AFAIK about Makefiles, that should work?
>>
>> Ah, yes. That's much better.
>>
>>   Arnd
>
> I just applied the original patch, with that addition, and a comment
> as suggested by Stephen.
>


Hmm, I think Kbuild expects lib.a only for the final link
(at least in official level)
Is it a problem to compile common files all the time?

# Common objects
obj-y += ccu_common.o
obj-y += ccu_reset.o


We may end up with some unused functions in vmlinux,
but it will not be a big impact on the image size in this case.

CONFIG_LD_DEAD_CODE_DATA_ELIMINATION may
take care of unused symbols.  I have not tested this CONFIG, though.



-- 
Best Regards
Masahiro Yamada


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-07 Thread Maxime Ripard
On Wed, Jun 07, 2017 at 09:36:34AM +0200, Arnd Bergmann wrote:
> On Wed, Jun 7, 2017 at 7:45 AM, Chen-Yu Tsai  wrote:
> > at the bottom (with a comment) would be cleaner, and
> > we wouldn't need to modify all the existing lines.
> > AFAIK about Makefiles, that should work?
> 
> Ah, yes. That's much better.
> 
>   Arnd

I just applied the original patch, with that addition, and a comment
as suggested by Stephen.

thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


signature.asc
Description: PGP signature


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-07 Thread Maxime Ripard
On Wed, Jun 07, 2017 at 09:36:34AM +0200, Arnd Bergmann wrote:
> On Wed, Jun 7, 2017 at 7:45 AM, Chen-Yu Tsai  wrote:
> > at the bottom (with a comment) would be cleaner, and
> > we wouldn't need to modify all the existing lines.
> > AFAIK about Makefiles, that should work?
> 
> Ah, yes. That's much better.
> 
>   Arnd

I just applied the original patch, with that addition, and a comment
as suggested by Stephen.

thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


signature.asc
Description: PGP signature


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-07 Thread Arnd Bergmann
On Wed, Jun 7, 2017 at 7:45 AM, Chen-Yu Tsai  wrote:
> at the bottom (with a comment) would be cleaner, and
> we wouldn't need to modify all the existing lines.
> AFAIK about Makefiles, that should work?

Ah, yes. That's much better.

  Arnd


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-07 Thread Arnd Bergmann
On Wed, Jun 7, 2017 at 7:45 AM, Chen-Yu Tsai  wrote:
> at the bottom (with a comment) would be cleaner, and
> we wouldn't need to modify all the existing lines.
> AFAIK about Makefiles, that should work?

Ah, yes. That's much better.

  Arnd


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-06 Thread Chen-Yu Tsai
On Tue, Jun 6, 2017 at 6:04 PM, Arnd Bergmann  wrote:
> On Mon, Jun 5, 2017 at 4:45 PM, Maxime Ripard
>  wrote:
>> Hi,
>>
>> On Sat, Jun 03, 2017 at 12:22:32PM +0800, kbuild test robot wrote:
>>> Hi Stephen,
>>>
>>> [auto build test ERROR on sunxi/sunxi/for-next]
>>> [also build test ERROR on next-20170602]
>>> [cannot apply to clk/clk-next v4.12-rc3]
>>> [if your patch is applied to the wrong git tree, please drop us a note to 
>>> help improve the system]
>>>
>>>sunxi_sid.c:(.data+0x1da8c): undefined reference to `ccu_gate_ops'
>>>sunxi_sid.c:(.data+0x1dac8): undefined reference to `ccu_gate_ops'
>>>sunxi_sid.c:(.data+0x1db20): undefined reference to `ccu_mux_ops'
>>>sunxi_sid.c:(.data+0x1db74): undefined reference to `ccu_mux_ops'
>>>sunxi_sid.c:(.data+0x1dbec): undefined reference to `ccu_mp_ops'
>>>sunxi_sid.c:(.data+0x1dc64): undefined reference to `ccu_mp_ops'
>>
>> It seems like even though the lib.a file is compiled properly, it is
>> never linked in. It looks like we would be supposed to add
>> drivers/clk/sunxi-ng/ to libs-y, but that doesn't seem to work for
>> Makefiles in drivers/*
>
> Ah, too bad. I see that only one directory under drivers/ uses something
> with lib.a, in drivers/firmware/efi/libstub/Makefile, but that seems to
> rely on being special-cased as well.
>
> However, this patch seems to fix it:
>
> diff --git a/drivers/clk/sunxi-ng/Makefile b/drivers/clk/sunxi-ng/Makefile
> index cbc8cb4f70e3..321d3da7cc6a 100644
> --- a/drivers/clk/sunxi-ng/Makefile
> +++ b/drivers/clk/sunxi-ng/Makefile
> @@ -18,16 +18,16 @@ lib-$(CONFIG_SUNXI_CCU) += ccu_nm.o
>  lib-$(CONFIG_SUNXI_CCU) += ccu_mp.o
>
>  # SoC support
> -obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
> -obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
> -obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
> -obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
> -obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
> -obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
> -obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
> -obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
> -obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o
> -obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
> +obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o lib.a
> +obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o lib.a
> +obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o lib.a
> +obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o lib.a
> +obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o lib.a
> +obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o lib.a
> +obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o lib.a
> +obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o lib.a
> +obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o lib.a
> +obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o lib.a
>
> It's not documented behavior, but I think it's still good enough,
> and improves the current version, unless there is another bug
> after we add this to your patch.

I think having just

obj-$(CONFIG_SUNXI_CCU) += lib.a

at the bottom (with a comment) would be cleaner, and
we wouldn't need to modify all the existing lines.
AFAIK about Makefiles, that should work?

ChenYu

>
> Arnd


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-06 Thread Chen-Yu Tsai
On Tue, Jun 6, 2017 at 6:04 PM, Arnd Bergmann  wrote:
> On Mon, Jun 5, 2017 at 4:45 PM, Maxime Ripard
>  wrote:
>> Hi,
>>
>> On Sat, Jun 03, 2017 at 12:22:32PM +0800, kbuild test robot wrote:
>>> Hi Stephen,
>>>
>>> [auto build test ERROR on sunxi/sunxi/for-next]
>>> [also build test ERROR on next-20170602]
>>> [cannot apply to clk/clk-next v4.12-rc3]
>>> [if your patch is applied to the wrong git tree, please drop us a note to 
>>> help improve the system]
>>>
>>>sunxi_sid.c:(.data+0x1da8c): undefined reference to `ccu_gate_ops'
>>>sunxi_sid.c:(.data+0x1dac8): undefined reference to `ccu_gate_ops'
>>>sunxi_sid.c:(.data+0x1db20): undefined reference to `ccu_mux_ops'
>>>sunxi_sid.c:(.data+0x1db74): undefined reference to `ccu_mux_ops'
>>>sunxi_sid.c:(.data+0x1dbec): undefined reference to `ccu_mp_ops'
>>>sunxi_sid.c:(.data+0x1dc64): undefined reference to `ccu_mp_ops'
>>
>> It seems like even though the lib.a file is compiled properly, it is
>> never linked in. It looks like we would be supposed to add
>> drivers/clk/sunxi-ng/ to libs-y, but that doesn't seem to work for
>> Makefiles in drivers/*
>
> Ah, too bad. I see that only one directory under drivers/ uses something
> with lib.a, in drivers/firmware/efi/libstub/Makefile, but that seems to
> rely on being special-cased as well.
>
> However, this patch seems to fix it:
>
> diff --git a/drivers/clk/sunxi-ng/Makefile b/drivers/clk/sunxi-ng/Makefile
> index cbc8cb4f70e3..321d3da7cc6a 100644
> --- a/drivers/clk/sunxi-ng/Makefile
> +++ b/drivers/clk/sunxi-ng/Makefile
> @@ -18,16 +18,16 @@ lib-$(CONFIG_SUNXI_CCU) += ccu_nm.o
>  lib-$(CONFIG_SUNXI_CCU) += ccu_mp.o
>
>  # SoC support
> -obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
> -obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
> -obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
> -obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
> -obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
> -obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
> -obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
> -obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
> -obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o
> -obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
> +obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o lib.a
> +obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o lib.a
> +obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o lib.a
> +obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o lib.a
> +obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o lib.a
> +obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o lib.a
> +obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o lib.a
> +obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o lib.a
> +obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o lib.a
> +obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o lib.a
>
> It's not documented behavior, but I think it's still good enough,
> and improves the current version, unless there is another bug
> after we add this to your patch.

I think having just

obj-$(CONFIG_SUNXI_CCU) += lib.a

at the bottom (with a comment) would be cleaner, and
we wouldn't need to modify all the existing lines.
AFAIK about Makefiles, that should work?

ChenYu

>
> Arnd


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-06 Thread Stephen Boyd
On 06/06, Arnd Bergmann wrote:
> On Mon, Jun 5, 2017 at 4:45 PM, Maxime Ripard
>  wrote:
> > Hi,
> >
> > On Sat, Jun 03, 2017 at 12:22:32PM +0800, kbuild test robot wrote:
> >> Hi Stephen,
> >>
> >> [auto build test ERROR on sunxi/sunxi/for-next]
> >> [also build test ERROR on next-20170602]
> >> [cannot apply to clk/clk-next v4.12-rc3]
> >> [if your patch is applied to the wrong git tree, please drop us a note to 
> >> help improve the system]
> >>
> >>sunxi_sid.c:(.data+0x1da8c): undefined reference to `ccu_gate_ops'
> >>sunxi_sid.c:(.data+0x1dac8): undefined reference to `ccu_gate_ops'
> >>sunxi_sid.c:(.data+0x1db20): undefined reference to `ccu_mux_ops'
> >>sunxi_sid.c:(.data+0x1db74): undefined reference to `ccu_mux_ops'
> >>sunxi_sid.c:(.data+0x1dbec): undefined reference to `ccu_mp_ops'
> >>sunxi_sid.c:(.data+0x1dc64): undefined reference to `ccu_mp_ops'
> >
> > It seems like even though the lib.a file is compiled properly, it is
> > never linked in. It looks like we would be supposed to add
> > drivers/clk/sunxi-ng/ to libs-y, but that doesn't seem to work for
> > Makefiles in drivers/*
> 
> Ah, too bad. I see that only one directory under drivers/ uses something
> with lib.a, in drivers/firmware/efi/libstub/Makefile, but that seems to
> rely on being special-cased as well.
> 
> However, this patch seems to fix it:
> 
> diff --git a/drivers/clk/sunxi-ng/Makefile b/drivers/clk/sunxi-ng/Makefile
> index cbc8cb4f70e3..321d3da7cc6a 100644
> --- a/drivers/clk/sunxi-ng/Makefile
> +++ b/drivers/clk/sunxi-ng/Makefile
> @@ -18,16 +18,16 @@ lib-$(CONFIG_SUNXI_CCU) += ccu_nm.o
>  lib-$(CONFIG_SUNXI_CCU) += ccu_mp.o
> 
>  # SoC support
> -obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
> -obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
> -obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
> -obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
> -obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
> -obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
> -obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
> -obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
> -obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o
> -obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
> +obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o lib.a
> +obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o lib.a
> +obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o lib.a
> +obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o lib.a
> +obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o lib.a
> +obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o lib.a
> +obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o lib.a
> +obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o lib.a
> +obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o lib.a
> +obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o lib.a
> 
> It's not documented behavior, but I think it's still good enough,
> and improves the current version, unless there is another bug
> after we add this to your patch.

We should add a comment above this so we know what the lib.a is
all about. As you say, it's not documented.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-06 Thread Stephen Boyd
On 06/06, Arnd Bergmann wrote:
> On Mon, Jun 5, 2017 at 4:45 PM, Maxime Ripard
>  wrote:
> > Hi,
> >
> > On Sat, Jun 03, 2017 at 12:22:32PM +0800, kbuild test robot wrote:
> >> Hi Stephen,
> >>
> >> [auto build test ERROR on sunxi/sunxi/for-next]
> >> [also build test ERROR on next-20170602]
> >> [cannot apply to clk/clk-next v4.12-rc3]
> >> [if your patch is applied to the wrong git tree, please drop us a note to 
> >> help improve the system]
> >>
> >>sunxi_sid.c:(.data+0x1da8c): undefined reference to `ccu_gate_ops'
> >>sunxi_sid.c:(.data+0x1dac8): undefined reference to `ccu_gate_ops'
> >>sunxi_sid.c:(.data+0x1db20): undefined reference to `ccu_mux_ops'
> >>sunxi_sid.c:(.data+0x1db74): undefined reference to `ccu_mux_ops'
> >>sunxi_sid.c:(.data+0x1dbec): undefined reference to `ccu_mp_ops'
> >>sunxi_sid.c:(.data+0x1dc64): undefined reference to `ccu_mp_ops'
> >
> > It seems like even though the lib.a file is compiled properly, it is
> > never linked in. It looks like we would be supposed to add
> > drivers/clk/sunxi-ng/ to libs-y, but that doesn't seem to work for
> > Makefiles in drivers/*
> 
> Ah, too bad. I see that only one directory under drivers/ uses something
> with lib.a, in drivers/firmware/efi/libstub/Makefile, but that seems to
> rely on being special-cased as well.
> 
> However, this patch seems to fix it:
> 
> diff --git a/drivers/clk/sunxi-ng/Makefile b/drivers/clk/sunxi-ng/Makefile
> index cbc8cb4f70e3..321d3da7cc6a 100644
> --- a/drivers/clk/sunxi-ng/Makefile
> +++ b/drivers/clk/sunxi-ng/Makefile
> @@ -18,16 +18,16 @@ lib-$(CONFIG_SUNXI_CCU) += ccu_nm.o
>  lib-$(CONFIG_SUNXI_CCU) += ccu_mp.o
> 
>  # SoC support
> -obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
> -obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
> -obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
> -obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
> -obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
> -obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
> -obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
> -obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
> -obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o
> -obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
> -obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
> +obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o lib.a
> +obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o lib.a
> +obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o lib.a
> +obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o lib.a
> +obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o lib.a
> +obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o lib.a
> +obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o lib.a
> +obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o lib.a
> +obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o lib.a
> +obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o lib.a
> +obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o lib.a
> 
> It's not documented behavior, but I think it's still good enough,
> and improves the current version, unless there is another bug
> after we add this to your patch.

We should add a comment above this so we know what the lib.a is
all about. As you say, it's not documented.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-06 Thread Arnd Bergmann
On Mon, Jun 5, 2017 at 4:45 PM, Maxime Ripard
 wrote:
> Hi,
>
> On Sat, Jun 03, 2017 at 12:22:32PM +0800, kbuild test robot wrote:
>> Hi Stephen,
>>
>> [auto build test ERROR on sunxi/sunxi/for-next]
>> [also build test ERROR on next-20170602]
>> [cannot apply to clk/clk-next v4.12-rc3]
>> [if your patch is applied to the wrong git tree, please drop us a note to 
>> help improve the system]
>>
>>sunxi_sid.c:(.data+0x1da8c): undefined reference to `ccu_gate_ops'
>>sunxi_sid.c:(.data+0x1dac8): undefined reference to `ccu_gate_ops'
>>sunxi_sid.c:(.data+0x1db20): undefined reference to `ccu_mux_ops'
>>sunxi_sid.c:(.data+0x1db74): undefined reference to `ccu_mux_ops'
>>sunxi_sid.c:(.data+0x1dbec): undefined reference to `ccu_mp_ops'
>>sunxi_sid.c:(.data+0x1dc64): undefined reference to `ccu_mp_ops'
>
> It seems like even though the lib.a file is compiled properly, it is
> never linked in. It looks like we would be supposed to add
> drivers/clk/sunxi-ng/ to libs-y, but that doesn't seem to work for
> Makefiles in drivers/*

Ah, too bad. I see that only one directory under drivers/ uses something
with lib.a, in drivers/firmware/efi/libstub/Makefile, but that seems to
rely on being special-cased as well.

However, this patch seems to fix it:

diff --git a/drivers/clk/sunxi-ng/Makefile b/drivers/clk/sunxi-ng/Makefile
index cbc8cb4f70e3..321d3da7cc6a 100644
--- a/drivers/clk/sunxi-ng/Makefile
+++ b/drivers/clk/sunxi-ng/Makefile
@@ -18,16 +18,16 @@ lib-$(CONFIG_SUNXI_CCU) += ccu_nm.o
 lib-$(CONFIG_SUNXI_CCU) += ccu_mp.o

 # SoC support
-obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
-obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
-obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
-obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
-obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
-obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
-obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
-obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
-obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o
-obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o
-obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
-obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
-obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
+obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o lib.a
+obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o lib.a
+obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o lib.a
+obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o lib.a
+obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o lib.a
+obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o lib.a
+obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o lib.a
+obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o lib.a
+obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o lib.a
+obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o lib.a
+obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o lib.a
+obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o lib.a
+obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o lib.a

It's not documented behavior, but I think it's still good enough,
and improves the current version, unless there is another bug
after we add this to your patch.

Arnd


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-06 Thread Arnd Bergmann
On Mon, Jun 5, 2017 at 4:45 PM, Maxime Ripard
 wrote:
> Hi,
>
> On Sat, Jun 03, 2017 at 12:22:32PM +0800, kbuild test robot wrote:
>> Hi Stephen,
>>
>> [auto build test ERROR on sunxi/sunxi/for-next]
>> [also build test ERROR on next-20170602]
>> [cannot apply to clk/clk-next v4.12-rc3]
>> [if your patch is applied to the wrong git tree, please drop us a note to 
>> help improve the system]
>>
>>sunxi_sid.c:(.data+0x1da8c): undefined reference to `ccu_gate_ops'
>>sunxi_sid.c:(.data+0x1dac8): undefined reference to `ccu_gate_ops'
>>sunxi_sid.c:(.data+0x1db20): undefined reference to `ccu_mux_ops'
>>sunxi_sid.c:(.data+0x1db74): undefined reference to `ccu_mux_ops'
>>sunxi_sid.c:(.data+0x1dbec): undefined reference to `ccu_mp_ops'
>>sunxi_sid.c:(.data+0x1dc64): undefined reference to `ccu_mp_ops'
>
> It seems like even though the lib.a file is compiled properly, it is
> never linked in. It looks like we would be supposed to add
> drivers/clk/sunxi-ng/ to libs-y, but that doesn't seem to work for
> Makefiles in drivers/*

Ah, too bad. I see that only one directory under drivers/ uses something
with lib.a, in drivers/firmware/efi/libstub/Makefile, but that seems to
rely on being special-cased as well.

However, this patch seems to fix it:

diff --git a/drivers/clk/sunxi-ng/Makefile b/drivers/clk/sunxi-ng/Makefile
index cbc8cb4f70e3..321d3da7cc6a 100644
--- a/drivers/clk/sunxi-ng/Makefile
+++ b/drivers/clk/sunxi-ng/Makefile
@@ -18,16 +18,16 @@ lib-$(CONFIG_SUNXI_CCU) += ccu_nm.o
 lib-$(CONFIG_SUNXI_CCU) += ccu_mp.o

 # SoC support
-obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
-obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
-obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
-obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
-obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
-obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
-obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
-obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
-obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o
-obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o
-obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
-obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
-obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
+obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o lib.a
+obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o lib.a
+obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o lib.a
+obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o lib.a
+obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o lib.a
+obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o lib.a
+obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o lib.a
+obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o lib.a
+obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o lib.a
+obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o lib.a
+obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o lib.a
+obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o lib.a
+obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o lib.a

It's not documented behavior, but I think it's still good enough,
and improves the current version, unless there is another bug
after we add this to your patch.

Arnd


Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-05 Thread Maxime Ripard
Hi,

On Sat, Jun 03, 2017 at 12:22:32PM +0800, kbuild test robot wrote:
> Hi Stephen,
> 
> [auto build test ERROR on sunxi/sunxi/for-next]
> [also build test ERROR on next-20170602]
> [cannot apply to clk/clk-next v4.12-rc3]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/Stephen-Boyd/clk-sunxi-ng-Move-all-clock-types-to-a-library/20170603-090538
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git 
> sunxi/for-next
> config: arm-sunxi_defconfig (attached as .config)
> compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget 
> https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
> ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=arm 
> 
> All errors (new ones prefixed by >>):
> 
>drivers/built-in.o: In function `sun8i_a83t_ccu_probe':
> >> sunxi_sid.c:(.text+0x2dc74): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun9i_a80_ccu_probe':
>sunxi_sid.c:(.text+0x2dd14): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun9i_a80_de_clk_probe':
>sunxi_sid.c:(.text+0x2de20): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun9i_a80_usb_clk_probe':
>sunxi_sid.c:(.text+0x2df34): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun5i_ccu_init':
> >> sunxi_sid.c:(.init.text+0x3f9c): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o:sunxi_sid.c:(.init.text+0x4070): more undefined 
> references to `sunxi_ccu_probe' follow
>drivers/built-in.o: In function `sun6i_a31_ccu_setup':
> >> sunxi_sid.c:(.init.text+0x4084): undefined reference to 
> >> `ccu_mux_notifier_register'
>drivers/built-in.o: In function `sun8i_a23_ccu_setup':
>sunxi_sid.c:(.init.text+0x411c): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun8i_a33_ccu_setup':
>sunxi_sid.c:(.init.text+0x41b8): undefined reference to `sunxi_ccu_probe'
> >> sunxi_sid.c:(.init.text+0x41c0): undefined reference to 
> >> `ccu_pll_notifier_register'
>sunxi_sid.c:(.init.text+0x41d0): undefined reference to 
> `ccu_mux_notifier_register'
>drivers/built-in.o: In function `sunxi_h3_h5_ccu_init':
>sunxi_sid.c:(.init.text+0x425c): undefined reference to `sunxi_ccu_probe'
>sunxi_sid.c:(.init.text+0x4270): undefined reference to 
> `ccu_mux_notifier_register'
>drivers/built-in.o: In function `sun8i_v3s_ccu_setup':
>sunxi_sid.c:(.init.text+0x4308): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sunxi_r_ccu_init':
>sunxi_sid.c:(.init.text+0x4368): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `.LANCHOR0':
> >> sunxi_sid.c:(.data+0x157c4): undefined reference to `ccu_gate_ops'
> >> sunxi_sid.c:(.data+0x15840): undefined reference to `ccu_mp_ops'
> >> sunxi_sid.c:(.data+0x158a4): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15908): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15940): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x1597c): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x159b8): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15a20): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15a84): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15aec): undefined reference to `ccu_div_ops'
> >> sunxi_sid.c:(.data+0x15b40): undefined reference to `ccu_mux_ops'
>sunxi_sid.c:(.data+0x15ba4): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15c08): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15c40): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15c7c): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15cb8): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15cf4): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15d30): undefined reference to `ccu_gate_ops'
>drivers/built-in.o:sunxi_sid.c:(.data+0x15d6c): more undefined references 
> to `ccu_gate_ops' follow
>drivers/built-in.o: In function `.LANCHOR0':
>sunxi_sid.c:(.data+0x15e4c): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15e84): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15ec0): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15efc): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15f78): undefined reference to `ccu_mp_ops'
>sunxi_sid.c:(.data+0x15fcc): undefined reference to `ccu_mux_ops'
>sunxi_sid.c:(.data+0x16020): undefined reference to `ccu_mux_ops'
>sunxi_sid.c:(.data+0x16098): undefined reference to `ccu_mp_ops'
>sunxi_sid.c:(.data+0x16110): undefined 

Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-05 Thread Maxime Ripard
Hi,

On Sat, Jun 03, 2017 at 12:22:32PM +0800, kbuild test robot wrote:
> Hi Stephen,
> 
> [auto build test ERROR on sunxi/sunxi/for-next]
> [also build test ERROR on next-20170602]
> [cannot apply to clk/clk-next v4.12-rc3]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/Stephen-Boyd/clk-sunxi-ng-Move-all-clock-types-to-a-library/20170603-090538
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git 
> sunxi/for-next
> config: arm-sunxi_defconfig (attached as .config)
> compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
> reproduce:
> wget 
> https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
> ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=arm 
> 
> All errors (new ones prefixed by >>):
> 
>drivers/built-in.o: In function `sun8i_a83t_ccu_probe':
> >> sunxi_sid.c:(.text+0x2dc74): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun9i_a80_ccu_probe':
>sunxi_sid.c:(.text+0x2dd14): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun9i_a80_de_clk_probe':
>sunxi_sid.c:(.text+0x2de20): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun9i_a80_usb_clk_probe':
>sunxi_sid.c:(.text+0x2df34): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun5i_ccu_init':
> >> sunxi_sid.c:(.init.text+0x3f9c): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o:sunxi_sid.c:(.init.text+0x4070): more undefined 
> references to `sunxi_ccu_probe' follow
>drivers/built-in.o: In function `sun6i_a31_ccu_setup':
> >> sunxi_sid.c:(.init.text+0x4084): undefined reference to 
> >> `ccu_mux_notifier_register'
>drivers/built-in.o: In function `sun8i_a23_ccu_setup':
>sunxi_sid.c:(.init.text+0x411c): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sun8i_a33_ccu_setup':
>sunxi_sid.c:(.init.text+0x41b8): undefined reference to `sunxi_ccu_probe'
> >> sunxi_sid.c:(.init.text+0x41c0): undefined reference to 
> >> `ccu_pll_notifier_register'
>sunxi_sid.c:(.init.text+0x41d0): undefined reference to 
> `ccu_mux_notifier_register'
>drivers/built-in.o: In function `sunxi_h3_h5_ccu_init':
>sunxi_sid.c:(.init.text+0x425c): undefined reference to `sunxi_ccu_probe'
>sunxi_sid.c:(.init.text+0x4270): undefined reference to 
> `ccu_mux_notifier_register'
>drivers/built-in.o: In function `sun8i_v3s_ccu_setup':
>sunxi_sid.c:(.init.text+0x4308): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `sunxi_r_ccu_init':
>sunxi_sid.c:(.init.text+0x4368): undefined reference to `sunxi_ccu_probe'
>drivers/built-in.o: In function `.LANCHOR0':
> >> sunxi_sid.c:(.data+0x157c4): undefined reference to `ccu_gate_ops'
> >> sunxi_sid.c:(.data+0x15840): undefined reference to `ccu_mp_ops'
> >> sunxi_sid.c:(.data+0x158a4): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15908): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15940): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x1597c): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x159b8): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15a20): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15a84): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15aec): undefined reference to `ccu_div_ops'
> >> sunxi_sid.c:(.data+0x15b40): undefined reference to `ccu_mux_ops'
>sunxi_sid.c:(.data+0x15ba4): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15c08): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15c40): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15c7c): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15cb8): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15cf4): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15d30): undefined reference to `ccu_gate_ops'
>drivers/built-in.o:sunxi_sid.c:(.data+0x15d6c): more undefined references 
> to `ccu_gate_ops' follow
>drivers/built-in.o: In function `.LANCHOR0':
>sunxi_sid.c:(.data+0x15e4c): undefined reference to `ccu_div_ops'
>sunxi_sid.c:(.data+0x15e84): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15ec0): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15efc): undefined reference to `ccu_gate_ops'
>sunxi_sid.c:(.data+0x15f78): undefined reference to `ccu_mp_ops'
>sunxi_sid.c:(.data+0x15fcc): undefined reference to `ccu_mux_ops'
>sunxi_sid.c:(.data+0x16020): undefined reference to `ccu_mux_ops'
>sunxi_sid.c:(.data+0x16098): undefined reference to `ccu_mp_ops'
>sunxi_sid.c:(.data+0x16110): undefined 

Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-02 Thread kbuild test robot
Hi Stephen,

[auto build test ERROR on sunxi/sunxi/for-next]
[also build test ERROR on next-20170602]
[cannot apply to clk/clk-next v4.12-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Stephen-Boyd/clk-sunxi-ng-Move-all-clock-types-to-a-library/20170603-090538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git 
sunxi/for-next
config: arm-sunxi_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   drivers/built-in.o: In function `sun8i_a83t_ccu_probe':
>> sunxi_sid.c:(.text+0x2dc74): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun9i_a80_ccu_probe':
   sunxi_sid.c:(.text+0x2dd14): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun9i_a80_de_clk_probe':
   sunxi_sid.c:(.text+0x2de20): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun9i_a80_usb_clk_probe':
   sunxi_sid.c:(.text+0x2df34): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun5i_ccu_init':
>> sunxi_sid.c:(.init.text+0x3f9c): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o:sunxi_sid.c:(.init.text+0x4070): more undefined 
references to `sunxi_ccu_probe' follow
   drivers/built-in.o: In function `sun6i_a31_ccu_setup':
>> sunxi_sid.c:(.init.text+0x4084): undefined reference to 
>> `ccu_mux_notifier_register'
   drivers/built-in.o: In function `sun8i_a23_ccu_setup':
   sunxi_sid.c:(.init.text+0x411c): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun8i_a33_ccu_setup':
   sunxi_sid.c:(.init.text+0x41b8): undefined reference to `sunxi_ccu_probe'
>> sunxi_sid.c:(.init.text+0x41c0): undefined reference to 
>> `ccu_pll_notifier_register'
   sunxi_sid.c:(.init.text+0x41d0): undefined reference to 
`ccu_mux_notifier_register'
   drivers/built-in.o: In function `sunxi_h3_h5_ccu_init':
   sunxi_sid.c:(.init.text+0x425c): undefined reference to `sunxi_ccu_probe'
   sunxi_sid.c:(.init.text+0x4270): undefined reference to 
`ccu_mux_notifier_register'
   drivers/built-in.o: In function `sun8i_v3s_ccu_setup':
   sunxi_sid.c:(.init.text+0x4308): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sunxi_r_ccu_init':
   sunxi_sid.c:(.init.text+0x4368): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `.LANCHOR0':
>> sunxi_sid.c:(.data+0x157c4): undefined reference to `ccu_gate_ops'
>> sunxi_sid.c:(.data+0x15840): undefined reference to `ccu_mp_ops'
>> sunxi_sid.c:(.data+0x158a4): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15908): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15940): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x1597c): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x159b8): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15a20): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15a84): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15aec): undefined reference to `ccu_div_ops'
>> sunxi_sid.c:(.data+0x15b40): undefined reference to `ccu_mux_ops'
   sunxi_sid.c:(.data+0x15ba4): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15c08): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15c40): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15c7c): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15cb8): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15cf4): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15d30): undefined reference to `ccu_gate_ops'
   drivers/built-in.o:sunxi_sid.c:(.data+0x15d6c): more undefined references to 
`ccu_gate_ops' follow
   drivers/built-in.o: In function `.LANCHOR0':
   sunxi_sid.c:(.data+0x15e4c): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15e84): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15ec0): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15efc): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15f78): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x15fcc): undefined reference to `ccu_mux_ops'
   sunxi_sid.c:(.data+0x16020): undefined reference to `ccu_mux_ops'
   sunxi_sid.c:(.data+0x16098): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x16110): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x16188): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x16200): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x16278): undefined reference to `ccu_mp_ops'
   

Re: [PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-02 Thread kbuild test robot
Hi Stephen,

[auto build test ERROR on sunxi/sunxi/for-next]
[also build test ERROR on next-20170602]
[cannot apply to clk/clk-next v4.12-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Stephen-Boyd/clk-sunxi-ng-Move-all-clock-types-to-a-library/20170603-090538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git 
sunxi/for-next
config: arm-sunxi_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget 
https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   drivers/built-in.o: In function `sun8i_a83t_ccu_probe':
>> sunxi_sid.c:(.text+0x2dc74): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun9i_a80_ccu_probe':
   sunxi_sid.c:(.text+0x2dd14): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun9i_a80_de_clk_probe':
   sunxi_sid.c:(.text+0x2de20): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun9i_a80_usb_clk_probe':
   sunxi_sid.c:(.text+0x2df34): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun5i_ccu_init':
>> sunxi_sid.c:(.init.text+0x3f9c): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o:sunxi_sid.c:(.init.text+0x4070): more undefined 
references to `sunxi_ccu_probe' follow
   drivers/built-in.o: In function `sun6i_a31_ccu_setup':
>> sunxi_sid.c:(.init.text+0x4084): undefined reference to 
>> `ccu_mux_notifier_register'
   drivers/built-in.o: In function `sun8i_a23_ccu_setup':
   sunxi_sid.c:(.init.text+0x411c): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sun8i_a33_ccu_setup':
   sunxi_sid.c:(.init.text+0x41b8): undefined reference to `sunxi_ccu_probe'
>> sunxi_sid.c:(.init.text+0x41c0): undefined reference to 
>> `ccu_pll_notifier_register'
   sunxi_sid.c:(.init.text+0x41d0): undefined reference to 
`ccu_mux_notifier_register'
   drivers/built-in.o: In function `sunxi_h3_h5_ccu_init':
   sunxi_sid.c:(.init.text+0x425c): undefined reference to `sunxi_ccu_probe'
   sunxi_sid.c:(.init.text+0x4270): undefined reference to 
`ccu_mux_notifier_register'
   drivers/built-in.o: In function `sun8i_v3s_ccu_setup':
   sunxi_sid.c:(.init.text+0x4308): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `sunxi_r_ccu_init':
   sunxi_sid.c:(.init.text+0x4368): undefined reference to `sunxi_ccu_probe'
   drivers/built-in.o: In function `.LANCHOR0':
>> sunxi_sid.c:(.data+0x157c4): undefined reference to `ccu_gate_ops'
>> sunxi_sid.c:(.data+0x15840): undefined reference to `ccu_mp_ops'
>> sunxi_sid.c:(.data+0x158a4): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15908): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15940): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x1597c): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x159b8): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15a20): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15a84): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15aec): undefined reference to `ccu_div_ops'
>> sunxi_sid.c:(.data+0x15b40): undefined reference to `ccu_mux_ops'
   sunxi_sid.c:(.data+0x15ba4): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15c08): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15c40): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15c7c): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15cb8): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15cf4): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15d30): undefined reference to `ccu_gate_ops'
   drivers/built-in.o:sunxi_sid.c:(.data+0x15d6c): more undefined references to 
`ccu_gate_ops' follow
   drivers/built-in.o: In function `.LANCHOR0':
   sunxi_sid.c:(.data+0x15e4c): undefined reference to `ccu_div_ops'
   sunxi_sid.c:(.data+0x15e84): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15ec0): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15efc): undefined reference to `ccu_gate_ops'
   sunxi_sid.c:(.data+0x15f78): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x15fcc): undefined reference to `ccu_mux_ops'
   sunxi_sid.c:(.data+0x16020): undefined reference to `ccu_mux_ops'
   sunxi_sid.c:(.data+0x16098): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x16110): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x16188): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x16200): undefined reference to `ccu_mp_ops'
   sunxi_sid.c:(.data+0x16278): undefined reference to `ccu_mp_ops'
   

[PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-02 Thread Stephen Boyd
We've run into kconfig missing dependency errors in the sunxi-ng
code a couple times now. Each time the fix is to find the missing
select statement and add it to the Kconfig entry for a particular
SoC driver. Given that all this code is builtin (non-modular) we
don't need to do this complicated dependency tracking in Kconfig.
Instead we can move all the "library"ish code to be compiled as
lib-y instead of obj-y, let the linker throw away unused code in
the resulting vmlinux, and drop all the Kconfig stuff we use to
track clock types.

Suggested-by: Arnd Bergmann 
Signed-off-by: Stephen Boyd 
---

Based on linux-next-20170602.

 drivers/clk/sunxi-ng/Kconfig  | 117 --
 drivers/clk/sunxi-ng/Makefile |  26 +-
 2 files changed, 13 insertions(+), 130 deletions(-)

diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig
index 67acef3d2494..dd15f9f9e1ef 100644
--- a/drivers/clk/sunxi-ng/Kconfig
+++ b/drivers/clk/sunxi-ng/Kconfig
@@ -6,149 +6,42 @@ config SUNXI_CCU
 
 if SUNXI_CCU
 
-# Base clock types
-
-config SUNXI_CCU_DIV
-   bool
-   select SUNXI_CCU_MUX
-
-config SUNXI_CCU_FRAC
-   bool
-
-config SUNXI_CCU_GATE
-   def_bool y
-
-config SUNXI_CCU_MUX
-   bool
-
-config SUNXI_CCU_MULT
-   bool
-   select SUNXI_CCU_MUX
-
-config SUNXI_CCU_PHASE
-   bool
-
-# Multi-factor clocks
-
-config SUNXI_CCU_NK
-   bool
-   select SUNXI_CCU_GATE
-
-config SUNXI_CCU_NKM
-   bool
-   select SUNXI_CCU_GATE
-
-config SUNXI_CCU_NKMP
-   bool
-   select SUNXI_CCU_GATE
-
-config SUNXI_CCU_NM
-   bool
-   select SUNXI_CCU_FRAC
-   select SUNXI_CCU_GATE
-
-config SUNXI_CCU_MP
-   bool
-   select SUNXI_CCU_GATE
-   select SUNXI_CCU_MUX
-
-# SoC Drivers
-
 config SUN50I_A64_CCU
bool "Support for the Allwinner A64 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default ARM64 && ARCH_SUNXI
depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST
 
 config SUN5I_CCU
bool "Support for the Allwinner sun5i family CCM"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN5I
depends on MACH_SUN5I || COMPILE_TEST
 
 config SUN6I_A31_CCU
bool "Support for the Allwinner A31/A31s CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN6I
depends on MACH_SUN6I || COMPILE_TEST
 
 config SUN8I_A23_CCU
bool "Support for the Allwinner A23 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN8I
depends on MACH_SUN8I || COMPILE_TEST
 
 config SUN8I_A33_CCU
bool "Support for the Allwinner A33 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN8I
depends on MACH_SUN8I || COMPILE_TEST
 
 config SUN8I_A83T_CCU
bool "Support for the Allwinner A83T CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_GATE
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_MUX
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_PHASE
default MACH_SUN8I
 
 config SUN8I_H3_CCU
bool "Support for the Allwinner H3 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
depends on MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST
 
 config SUN8I_V3S_CCU
bool "Support for the Allwinner V3s CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN8I
depends on MACH_SUN8I || COMPILE_TEST
 
@@ -159,21 +52,11 @@ config SUN8I_DE2_CCU
 
 config SUN9I_A80_CCU
bool "Support for the Allwinner A80 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_GATE
-   select SUNXI_CCU_NKMP
-   

[PATCH] clk: sunxi-ng: Move all clock types to a library

2017-06-02 Thread Stephen Boyd
We've run into kconfig missing dependency errors in the sunxi-ng
code a couple times now. Each time the fix is to find the missing
select statement and add it to the Kconfig entry for a particular
SoC driver. Given that all this code is builtin (non-modular) we
don't need to do this complicated dependency tracking in Kconfig.
Instead we can move all the "library"ish code to be compiled as
lib-y instead of obj-y, let the linker throw away unused code in
the resulting vmlinux, and drop all the Kconfig stuff we use to
track clock types.

Suggested-by: Arnd Bergmann 
Signed-off-by: Stephen Boyd 
---

Based on linux-next-20170602.

 drivers/clk/sunxi-ng/Kconfig  | 117 --
 drivers/clk/sunxi-ng/Makefile |  26 +-
 2 files changed, 13 insertions(+), 130 deletions(-)

diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig
index 67acef3d2494..dd15f9f9e1ef 100644
--- a/drivers/clk/sunxi-ng/Kconfig
+++ b/drivers/clk/sunxi-ng/Kconfig
@@ -6,149 +6,42 @@ config SUNXI_CCU
 
 if SUNXI_CCU
 
-# Base clock types
-
-config SUNXI_CCU_DIV
-   bool
-   select SUNXI_CCU_MUX
-
-config SUNXI_CCU_FRAC
-   bool
-
-config SUNXI_CCU_GATE
-   def_bool y
-
-config SUNXI_CCU_MUX
-   bool
-
-config SUNXI_CCU_MULT
-   bool
-   select SUNXI_CCU_MUX
-
-config SUNXI_CCU_PHASE
-   bool
-
-# Multi-factor clocks
-
-config SUNXI_CCU_NK
-   bool
-   select SUNXI_CCU_GATE
-
-config SUNXI_CCU_NKM
-   bool
-   select SUNXI_CCU_GATE
-
-config SUNXI_CCU_NKMP
-   bool
-   select SUNXI_CCU_GATE
-
-config SUNXI_CCU_NM
-   bool
-   select SUNXI_CCU_FRAC
-   select SUNXI_CCU_GATE
-
-config SUNXI_CCU_MP
-   bool
-   select SUNXI_CCU_GATE
-   select SUNXI_CCU_MUX
-
-# SoC Drivers
-
 config SUN50I_A64_CCU
bool "Support for the Allwinner A64 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default ARM64 && ARCH_SUNXI
depends on (ARM64 && ARCH_SUNXI) || COMPILE_TEST
 
 config SUN5I_CCU
bool "Support for the Allwinner sun5i family CCM"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN5I
depends on MACH_SUN5I || COMPILE_TEST
 
 config SUN6I_A31_CCU
bool "Support for the Allwinner A31/A31s CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN6I
depends on MACH_SUN6I || COMPILE_TEST
 
 config SUN8I_A23_CCU
bool "Support for the Allwinner A23 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN8I
depends on MACH_SUN8I || COMPILE_TEST
 
 config SUN8I_A33_CCU
bool "Support for the Allwinner A33 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN8I
depends on MACH_SUN8I || COMPILE_TEST
 
 config SUN8I_A83T_CCU
bool "Support for the Allwinner A83T CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_GATE
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_MUX
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_PHASE
default MACH_SUN8I
 
 config SUN8I_H3_CCU
bool "Support for the Allwinner H3 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
depends on MACH_SUN8I || (ARM64 && ARCH_SUNXI) || COMPILE_TEST
 
 config SUN8I_V3S_CCU
bool "Support for the Allwinner V3s CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_NK
-   select SUNXI_CCU_NKM
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select SUNXI_CCU_MP
-   select SUNXI_CCU_PHASE
default MACH_SUN8I
depends on MACH_SUN8I || COMPILE_TEST
 
@@ -159,21 +52,11 @@ config SUN8I_DE2_CCU
 
 config SUN9I_A80_CCU
bool "Support for the Allwinner A80 CCU"
-   select SUNXI_CCU_DIV
-   select SUNXI_CCU_MULT
-   select SUNXI_CCU_GATE
-   select SUNXI_CCU_NKMP
-   select SUNXI_CCU_NM
-   select