Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1506093 > unrolled thread

[PATCH] clk: fix link error for rcar-gen2

Started byArnd Bergmann <arnd@arndb.de>
First post2016-10-21 17:50 +0200
Last post2016-10-25 10:40 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] clk: fix link error for rcar-gen2 Arnd Bergmann <arnd@arndb.de> - 2016-10-21 17:50 +0200
    Re: [PATCH] clk: fix link error for rcar-gen2 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-10-21 18:50 +0200
    Re: [PATCH] clk: fix link error for rcar-gen2 Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-21 20:10 +0200
      Re: [PATCH] clk: fix link error for rcar-gen2 Arnd Bergmann <arnd@arndb.de> - 2016-10-21 23:10 +0200
        Re: [PATCH] clk: fix link error for rcar-gen2 Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-25 10:40 +0200

#1506093 — [PATCH] clk: fix link error for rcar-gen2

FromArnd Bergmann <arnd@arndb.de>
Date2016-10-21 17:50 +0200
Subject[PATCH] clk: fix link error for rcar-gen2
Message-ID<suKf0-7AT-23@gated-at.bofh.it>
The addition of one more rcar-gen2 based SoC caused a build error (again)
in my randconfig builds:

arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init':
setup-rcar-gen2.c:(.init.text+0x200): undefined reference to `rcar_gen2_clocks_init'

I think this has happened twice in the past. Instead of adding each SoC
one at a time, this changes the existing list to always build the
rcar-gen2 related clk files whenever the generic symbol is selected.

Fixes: 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/clk/renesas/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile
index 90dd0db7d9c6..762d122eddec 100644
--- a/drivers/clk/renesas/Makefile
+++ b/drivers/clk/renesas/Makefile
@@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)		+= clk-r8a73a4.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7740)		+= clk-r8a7740.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7778)		+= clk-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)		+= clk-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)		+= clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7791)		+= clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7792)		+= clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7793)		+= clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7794)		+= clk-rcar-gen2.o clk-div6.o
+obj-$(CONFIG_ARCH_RCAR_GEN2)		+= clk-rcar-gen2.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7795)		+= r8a7795-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_R8A7796)		+= r8a7796-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_SH73A0)		+= clk-sh73a0.o clk-div6.o
-- 
2.9.0

[toc] | [next] | [standalone]


#1506146

FromSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date2016-10-21 18:50 +0200
Message-ID<suLb4-8f6-35@gated-at.bofh.it>
In reply to#1506093
Hello.

On 10/21/2016 06:47 PM, Arnd Bergmann wrote:

> The addition of one more rcar-gen2 based SoC caused a build error (again)
> in my randconfig builds:
>
> arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init':
> setup-rcar-gen2.c:(.init.text+0x200): undefined reference to `rcar_gen2_clocks_init'

    OK, seeing how you got this -- I should have tested the kernel build with 
only R8A7743 enabled... sorry about that. :-<
    I probably shouldn't have used rcar_gen2_timer_init() in the 1st place...

> I think this has happened twice in the past. Instead of adding each SoC
> one at a time, this changes the existing list to always build the
> rcar-gen2 related clk files whenever the generic symbol is selected.

    The problem is we're not going to use this driver on RZ/G SoCs... The 
newer rcar2-cpg-mssr.c will be used instead -- I submitted the patches for 
that before ELC-E...

> Fixes: 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[...]

MBR, Sergei

[toc] | [prev] | [next] | [standalone]


#1506201

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-10-21 20:10 +0200
Message-ID<suMqt-ND-9@gated-at.bofh.it>
In reply to#1506093
Hi Arnd,

On Fri, Oct 21, 2016 at 5:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The addition of one more rcar-gen2 based SoC caused a build error (again)
> in my randconfig builds:
>
> arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init':
> setup-rcar-gen2.c:(.init.text+0x200): undefined reference to `rcar_gen2_clocks_init'
>
> I think this has happened twice in the past. Instead of adding each SoC
> one at a time, this changes the existing list to always build the
> rcar-gen2 related clk files whenever the generic symbol is selected.

The problem is that the R-Car Gen2 platform code calls into the R-Car Gen2
clock driver[*]. RZ/G1M (r8a7743) uses the R-Car Gen2 core, but not the
R-Car Gen2 clock driver.
Instead it will use the modern CPG/MSSR driver, like R-Car Gen3 does.

[*] That will be fixed by "[PATCH v4 00/23] soc: renesas: Add R-Car RST
    driver for obtaining mode pin state".

> Fixes: 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/clk/renesas/Makefile | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile
> index 90dd0db7d9c6..762d122eddec 100644
> --- a/drivers/clk/renesas/Makefile
> +++ b/drivers/clk/renesas/Makefile
> @@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)             += clk-r8a73a4.o clk-div6.o
>  obj-$(CONFIG_ARCH_R8A7740)             += clk-r8a7740.o clk-div6.o
>  obj-$(CONFIG_ARCH_R8A7778)             += clk-r8a7778.o
>  obj-$(CONFIG_ARCH_R8A7779)             += clk-r8a7779.o
> -obj-$(CONFIG_ARCH_R8A7790)             += clk-rcar-gen2.o clk-div6.o
> -obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o clk-div6.o
> -obj-$(CONFIG_ARCH_R8A7792)             += clk-rcar-gen2.o clk-div6.o
> -obj-$(CONFIG_ARCH_R8A7793)             += clk-rcar-gen2.o clk-div6.o
> -obj-$(CONFIG_ARCH_R8A7794)             += clk-rcar-gen2.o clk-div6.o
> +obj-$(CONFIG_ARCH_RCAR_GEN2)           += clk-rcar-gen2.o clk-div6.o
>  obj-$(CONFIG_ARCH_R8A7795)             += r8a7795-cpg-mssr.o rcar-gen3-cpg.o
>  obj-$(CONFIG_ARCH_R8A7796)             += r8a7796-cpg-mssr.o rcar-gen3-cpg.o
>  obj-$(CONFIG_ARCH_SH73A0)              += clk-sh73a0.o clk-div6.o

Please don't fix it this way, as it will make it _harder_ to convert the R-Car
Gen2 SoCs to the modern CPG/MSSR driver later.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [prev] | [next] | [standalone]


#1506289

FromArnd Bergmann <arnd@arndb.de>
Date2016-10-21 23:10 +0200
Message-ID<suPeG-2CB-9@gated-at.bofh.it>
In reply to#1506201
On Friday, October 21, 2016 8:01:49 PM CEST Geert Uytterhoeven wrote:
> > diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile
> > index 90dd0db7d9c6..762d122eddec 100644
> > --- a/drivers/clk/renesas/Makefile
> > +++ b/drivers/clk/renesas/Makefile
> > @@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)             += clk-r8a73a4.o clk-div6.o
> >  obj-$(CONFIG_ARCH_R8A7740)             += clk-r8a7740.o clk-div6.o
> >  obj-$(CONFIG_ARCH_R8A7778)             += clk-r8a7778.o
> >  obj-$(CONFIG_ARCH_R8A7779)             += clk-r8a7779.o
> > -obj-$(CONFIG_ARCH_R8A7790)             += clk-rcar-gen2.o clk-div6.o
> > -obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o clk-div6.o
> > -obj-$(CONFIG_ARCH_R8A7792)             += clk-rcar-gen2.o clk-div6.o
> > -obj-$(CONFIG_ARCH_R8A7793)             += clk-rcar-gen2.o clk-div6.o
> > -obj-$(CONFIG_ARCH_R8A7794)             += clk-rcar-gen2.o clk-div6.o
> > +obj-$(CONFIG_ARCH_RCAR_GEN2)           += clk-rcar-gen2.o clk-div6.o
> >  obj-$(CONFIG_ARCH_R8A7795)             += r8a7795-cpg-mssr.o rcar-gen3-cpg.o
> >  obj-$(CONFIG_ARCH_R8A7796)             += r8a7796-cpg-mssr.o rcar-gen3-cpg.o
> >  obj-$(CONFIG_ARCH_SH73A0)              += clk-sh73a0.o clk-div6.o
> 
> Please don't fix it this way, as it will make it _harder_ to convert the R-Car
> Gen2 SoCs to the modern CPG/MSSR driver later.
> 

Ok, I see. How about just adding another line for r8a7743 and
dropping that again after the timer_init has been converted?

	Arnd

[toc] | [prev] | [next] | [standalone]


#1508073

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2016-10-25 10:40 +0200
Message-ID<sw5r4-39J-19@gated-at.bofh.it>
In reply to#1506289
Hi Arnd,

On Fri, Oct 21, 2016 at 11:07 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday, October 21, 2016 8:01:49 PM CEST Geert Uytterhoeven wrote:
>> > diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile
>> > index 90dd0db7d9c6..762d122eddec 100644
>> > --- a/drivers/clk/renesas/Makefile
>> > +++ b/drivers/clk/renesas/Makefile
>> > @@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)             += clk-r8a73a4.o clk-div6.o
>> >  obj-$(CONFIG_ARCH_R8A7740)             += clk-r8a7740.o clk-div6.o
>> >  obj-$(CONFIG_ARCH_R8A7778)             += clk-r8a7778.o
>> >  obj-$(CONFIG_ARCH_R8A7779)             += clk-r8a7779.o
>> > -obj-$(CONFIG_ARCH_R8A7790)             += clk-rcar-gen2.o clk-div6.o
>> > -obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o clk-div6.o
>> > -obj-$(CONFIG_ARCH_R8A7792)             += clk-rcar-gen2.o clk-div6.o
>> > -obj-$(CONFIG_ARCH_R8A7793)             += clk-rcar-gen2.o clk-div6.o
>> > -obj-$(CONFIG_ARCH_R8A7794)             += clk-rcar-gen2.o clk-div6.o
>> > +obj-$(CONFIG_ARCH_RCAR_GEN2)           += clk-rcar-gen2.o clk-div6.o
>> >  obj-$(CONFIG_ARCH_R8A7795)             += r8a7795-cpg-mssr.o rcar-gen3-cpg.o
>> >  obj-$(CONFIG_ARCH_R8A7796)             += r8a7796-cpg-mssr.o rcar-gen3-cpg.o
>> >  obj-$(CONFIG_ARCH_SH73A0)              += clk-sh73a0.o clk-div6.o
>>
>> Please don't fix it this way, as it will make it _harder_ to convert the R-Car
>> Gen2 SoCs to the modern CPG/MSSR driver later.
>
> Ok, I see. How about just adding another line for r8a7743 and
> dropping that again after the timer_init has been converted?

That's an option, but it touches a different subsystem ;-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web