diff mbox

[v1] clk: pxa clocks build system fix

Message ID 1412199569-27958-1-git-send-email-robert.jarzmik@free.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Jarzmik Oct. 1, 2014, 9:39 p.m. UTC
Fix the building of pxa clock drivers so that the files are actually
compiled if and only if COMMON_CLK was selected by the architecture.

This prevents conflicts with mach-pxa clock legacy implementation.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 drivers/clk/Kconfig  | 5 +++++
 drivers/clk/Makefile | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Mike Turquette Oct. 5, 2014, 8:43 p.m. UTC | #1
Quoting Robert Jarzmik (2014-10-01 14:39:29)
> Fix the building of pxa clock drivers so that the files are actually
> compiled if and only if COMMON_CLK was selected by the architecture.
> 
> This prevents conflicts with mach-pxa clock legacy implementation.
> 
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>

Applied.

Thanks,
Mike

> ---
>  drivers/clk/Kconfig  | 5 +++++
>  drivers/clk/Makefile | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index cfd3af7..b110f33 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -109,6 +109,11 @@ config COMMON_CLK_PALMAS
>           This driver supports TI Palmas devices 32KHz output KG and KG_AUDIO
>           using common clock framework.
>  
> +config COMMON_CLK_PXA
> +       def_bool COMMON_CLK && ARCH_PXA
> +       ---help---
> +         Sypport for the Marvell PXA SoC.
> +
>  source "drivers/clk/qcom/Kconfig"
>  
>  endmenu
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index 7891e4e..b3a1da0 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -48,7 +48,7 @@ obj-$(CONFIG_ARCH_MMP)                        += mmp/
>  endif
>  obj-$(CONFIG_PLAT_ORION)               += mvebu/
>  obj-$(CONFIG_ARCH_MXS)                 += mxs/
> -obj-$(CONFIG_ARCH_PXA)                 += pxa/
> +obj-$(CONFIG_COMMON_CLK_PXA)           += pxa/
>  obj-$(CONFIG_COMMON_CLK_QCOM)          += qcom/
>  obj-$(CONFIG_ARCH_ROCKCHIP)            += rockchip/
>  obj-$(CONFIG_COMMON_CLK_SAMSUNG)       += samsung/
> -- 
> 2.1.0
>
Arnd Bergmann Oct. 6, 2014, 8:35 p.m. UTC | #2
On Sunday 05 October 2014 13:43:58 Mike Turquette wrote:
> Quoting Robert Jarzmik (2014-10-01 14:39:29)
> > Fix the building of pxa clock drivers so that the files are actually
> > compiled if and only if COMMON_CLK was selected by the architecture.
> > 
> > This prevents conflicts with mach-pxa clock legacy implementation.
> > 
> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> 

I seem to still hit a build error with this applied in e.g.
build/palmz72_defconfig, which enables both pxa25x and pxa27x,
so I get both the pxa250 private clock code and the pxa270
common clock code, resulting in this error message:

drivers/built-in.o:(___ksymtab_gpl+clk_enable+0x0): multiple definition of `__ksymtab_clk_enable'
arch/arm/mach-pxa/built-in.o:(___ksymtab+clk_enable+0x0): first defined here
drivers/built-in.o:(___ksymtab_gpl+clk_get_rate+0x0): multiple definition of `__ksymtab_clk_get_rate'
arch/arm/mach-pxa/built-in.o:(___ksymtab+clk_get_rate+0x0): first defined here
drivers/built-in.o:(___ksymtab_gpl+clk_round_rate+0x0): multiple definition of `__ksymtab_clk_round_rate'
arch/arm/mach-pxa/built-in.o:(___ksymtab+clk_round_rate+0x0): first defined here
drivers/built-in.o: In function `clk_set_rate':
:(.text+0x86930): multiple definition of `clk_set_rate'
arch/arm/mach-pxa/built-in.o::(.text+0x103c): first defined here
drivers/built-in.o: In function `clk_set_parent':
:(.text+0x869c4): multiple definition of `clk_set_parent'
arch/arm/mach-pxa/built-in.o::(.text+0x127c): first defined here
drivers/built-in.o: In function `clk_round_rate':
:(.text+0x85c18): multiple definition of `clk_round_rate'
arch/arm/mach-pxa/built-in.o::(.text+0x1248): first defined here
drivers/built-in.o:(___ksymtab_gpl+clk_set_parent+0x0): multiple definition of `__ksymtab_clk_set_parent'
arch/arm/mach-pxa/built-in.o:(___ksymtab+clk_set_parent+0x0): first defined here
drivers/built-in.o:(___ksymtab_gpl+clk_disable+0x0): multiple definition of `__ksymtab_clk_disable'
arch/arm/mach-pxa/built-in.o:(___ksymtab+clk_disable+0x0): first defined here
drivers/built-in.o: In function `clk_get_rate':
:(.text+0x85c64): multiple definition of `clk_get_rate'
arch/arm/mach-pxa/built-in.o::(.text+0x1014): first defined here
drivers/built-in.o:(___ksymtab_gpl+clk_set_rate+0x0): multiple definition of `__ksymtab_clk_set_rate'
arch/arm/mach-pxa/built-in.o:(___ksymtab+clk_set_rate+0x0): first defined here
drivers/built-in.o: In function `clk_get_parent':
:(.text+0x85c44): multiple definition of `clk_get_parent'
arch/arm/mach-pxa/built-in.o::(.text+0x12b0): first defined here
drivers/built-in.o: In function `clk_disable':
:(.text+0x85b08): multiple definition of `clk_disable'
arch/arm/mach-pxa/built-in.o::(.text+0x118c): first defined here
drivers/built-in.o:(___ksymtab_gpl+clk_get_parent+0x0): multiple definition of `__ksymtab_clk_get_parent'
arch/arm/mach-pxa/built-in.o:(___ksymtab+clk_get_parent+0x0): first defined here
drivers/built-in.o: In function `clk_enable':
:(.text+0x85808): multiple definition of `clk_enable'
arch/arm/mach-pxa/built-in.o::(.text+0x10d8): first defined here



	Arnd
Robert Jarzmik Oct. 6, 2014, 9:25 p.m. UTC | #3
Arnd Bergmann <arnd@arndb.de> writes:

> On Sunday 05 October 2014 13:43:58 Mike Turquette wrote:
>> Quoting Robert Jarzmik (2014-10-01 14:39:29)
>> > Fix the building of pxa clock drivers so that the files are actually
>> > compiled if and only if COMMON_CLK was selected by the architecture.
>> > 
>> > This prevents conflicts with mach-pxa clock legacy implementation.
>> > 
>> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
>> 
>
> I seem to still hit a build error with this applied in e.g.
> build/palmz72_defconfig, which enables both pxa25x and pxa27x,
> so I get both the pxa250 private clock code and the pxa270
> common clock code, resulting in this error message:
Do you have the patch "Revert "arm: pxa: Transition pxa27x to clk framework" in
your tree ?

Normally the fix was made of :
 - the fixup patch "clk: pxa clocks build system fix"
 - the revert queued by Mike "arm: pxa: Transition pxa27x to clk framework"

Cheers.

--
Robert
Arnd Bergmann Oct. 6, 2014, 9:36 p.m. UTC | #4
On Monday 06 October 2014 23:25:13 Robert Jarzmik wrote:
> Arnd Bergmann <arnd@arndb.de> writes:
> 
> > On Sunday 05 October 2014 13:43:58 Mike Turquette wrote:
> >> Quoting Robert Jarzmik (2014-10-01 14:39:29)
> >> > Fix the building of pxa clock drivers so that the files are actually
> >> > compiled if and only if COMMON_CLK was selected by the architecture.
> >> > 
> >> > This prevents conflicts with mach-pxa clock legacy implementation.
> >> > 
> >> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> >> 
> >
> > I seem to still hit a build error with this applied in e.g.
> > build/palmz72_defconfig, which enables both pxa25x and pxa27x,
> > so I get both the pxa250 private clock code and the pxa270
> > common clock code, resulting in this error message:
> Do you have the patch "Revert "arm: pxa: Transition pxa27x to clk framework" in
> your tree ?
> 
> Normally the fix was made of :
>  - the fixup patch "clk: pxa clocks build system fix"
>  - the revert queued by Mike "arm: pxa: Transition pxa27x to clk framework"

No, I was missing that one, sorry for the noise. It works now after
I've applied it. I was using the latest -next kernel as a base and assumed
that it had all the latest fixes from Mike's tree.

	Arnd
Mike Turquette Oct. 6, 2014, 10:15 p.m. UTC | #5
Quoting Arnd Bergmann (2014-10-06 14:36:43)
> On Monday 06 October 2014 23:25:13 Robert Jarzmik wrote:
> > Arnd Bergmann <arnd@arndb.de> writes:
> > 
> > > On Sunday 05 October 2014 13:43:58 Mike Turquette wrote:
> > >> Quoting Robert Jarzmik (2014-10-01 14:39:29)
> > >> > Fix the building of pxa clock drivers so that the files are actually
> > >> > compiled if and only if COMMON_CLK was selected by the architecture.
> > >> > 
> > >> > This prevents conflicts with mach-pxa clock legacy implementation.
> > >> > 
> > >> > Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> > >> 
> > >
> > > I seem to still hit a build error with this applied in e.g.
> > > build/palmz72_defconfig, which enables both pxa25x and pxa27x,
> > > so I get both the pxa250 private clock code and the pxa270
> > > common clock code, resulting in this error message:
> > Do you have the patch "Revert "arm: pxa: Transition pxa27x to clk framework" in
> > your tree ?
> > 
> > Normally the fix was made of :
> >  - the fixup patch "clk: pxa clocks build system fix"
> >  - the revert queued by Mike "arm: pxa: Transition pxa27x to clk framework"
> 
> No, I was missing that one, sorry for the noise. It works now after
> I've applied it. I was using the latest -next kernel as a base and assumed
> that it had all the latest fixes from Mike's tree.

I pushed the changes to my mirror over the weekend. I guess -next hasn't
picked it up. I'm waiting for a couple of -next cycles this week before
I push my tag to Linus.

Regards,
Mike

> 
>         Arnd
Arnd Bergmann Oct. 7, 2014, 9:12 a.m. UTC | #6
On Monday 06 October 2014 15:15:16 Mike Turquette wrote:
> 
> I pushed the changes to my mirror over the weekend. I guess -next hasn't
> picked it up. I'm waiting for a couple of -next cycles this week before
> I push my tag to Linus.

I think there was no linux-next yesterday. Today's -next just arrived
and it has the fix.

	Arnd
diff mbox

Patch

diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index cfd3af7..b110f33 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -109,6 +109,11 @@  config COMMON_CLK_PALMAS
 	  This driver supports TI Palmas devices 32KHz output KG and KG_AUDIO
 	  using common clock framework.
 
+config COMMON_CLK_PXA
+	def_bool COMMON_CLK && ARCH_PXA
+	---help---
+	  Sypport for the Marvell PXA SoC.
+
 source "drivers/clk/qcom/Kconfig"
 
 endmenu
diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
index 7891e4e..b3a1da0 100644
--- a/drivers/clk/Makefile
+++ b/drivers/clk/Makefile
@@ -48,7 +48,7 @@  obj-$(CONFIG_ARCH_MMP)			+= mmp/
 endif
 obj-$(CONFIG_PLAT_ORION)		+= mvebu/
 obj-$(CONFIG_ARCH_MXS)			+= mxs/
-obj-$(CONFIG_ARCH_PXA)			+= pxa/
+obj-$(CONFIG_COMMON_CLK_PXA)		+= pxa/
 obj-$(CONFIG_COMMON_CLK_QCOM)		+= qcom/
 obj-$(CONFIG_ARCH_ROCKCHIP)		+= rockchip/
 obj-$(CONFIG_COMMON_CLK_SAMSUNG)	+= samsung/