* [PATCH] ARM: OMAP2: use correct timer function for AM43XX and TI81XX
@ 2015-11-16 21:10 Arnd Bergmann
2015-11-16 21:13 ` Felipe Balbi
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-11-16 21:10 UTC (permalink / raw)
To: linux-arm-kernel
AM43XX and TI81XX use omap3_gptimer_timer_init(), but that is only
built into the kernel for OMAP3 and AM33XX, otherwise we get:
arch/arm/mach-omap2/built-in.o:(.arch.info.init+0x124): undefined reference to `omap3_gptimer_timer_init'
This changes the Kconfig logic for building the function to
match the callers. Consequently, we no longer need to build
the omap3_secure_sync32k_timer_init and omap4_local_timer_init
for the platforms that have been moved over to other functions.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
The code has changed a couple of times, but this version no longer
produces build errors for me.
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b18ebbefae09..b07dd70b2de1 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -494,7 +494,7 @@ void __init omap_init_time(void)
clocksource_probe();
}
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX)
+#if defined(CONFIG_ARCH_OMAP3)
void __init omap3_secure_sync32k_timer_init(void)
{
__omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure",
@@ -502,7 +502,7 @@ void __init omap3_secure_sync32k_timer_init(void)
}
#endif /* CONFIG_ARCH_OMAP3 */
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
+#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_TI81XX)
void __init omap3_gptimer_timer_init(void)
{
__omap_sync32k_timer_init(2, "timer_sys_ck", NULL,
@@ -510,8 +510,7 @@ void __init omap3_gptimer_timer_init(void)
}
#endif
-#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \
- defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX)
+#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX)
static void __init omap4_sync32k_timer_init(void)
{
__omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon",
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ARM: OMAP2: use correct timer function for AM43XX and TI81XX
2015-11-16 21:10 [PATCH] ARM: OMAP2: use correct timer function for AM43XX and TI81XX Arnd Bergmann
@ 2015-11-16 21:13 ` Felipe Balbi
2015-11-19 15:57 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2015-11-16 21:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Arnd Bergmann <arnd@arndb.de> writes:
> AM43XX and TI81XX use omap3_gptimer_timer_init(), but that is only
> built into the kernel for OMAP3 and AM33XX, otherwise we get:
>
> arch/arm/mach-omap2/built-in.o:(.arch.info.init+0x124): undefined reference to `omap3_gptimer_timer_init'
>
> This changes the Kconfig logic for building the function to
> match the callers. Consequently, we no longer need to build
> the omap3_secure_sync32k_timer_init and omap4_local_timer_init
> for the platforms that have been moved over to other functions.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
no, AM43xx uses omap4_local_timer_init(), there's already a fix in
Tony's tree IIRC.
> +#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX) || defined(CONFIG_SOC_TI81XX)
[...]
> +#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX) || defined(CONFIG_SOC_AM43XX)
someone doesn't like to run checkpatch.pl
care to provide a defconfig which would cause a build error ?
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151116/c77afd4f/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: OMAP2: use correct timer function for AM43XX and TI81XX
2015-11-16 21:13 ` Felipe Balbi
@ 2015-11-19 15:57 ` Arnd Bergmann
2015-11-19 16:15 ` Felipe Balbi
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2015-11-19 15:57 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 16 November 2015 15:13:55 Felipe Balbi wrote:
> Arnd Bergmann <arnd@arndb.de> writes:
> > AM43XX and TI81XX use omap3_gptimer_timer_init(), but that is only
> > built into the kernel for OMAP3 and AM33XX, otherwise we get:
> >
> > arch/arm/mach-omap2/built-in.o:(.arch.info.init+0x124): undefined reference to `omap3_gptimer_timer_init'
> >
> > This changes the Kconfig logic for building the function to
> > match the callers. Consequently, we no longer need to build
> > the omap3_secure_sync32k_timer_init and omap4_local_timer_init
> > for the platforms that have been moved over to other functions.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> no, AM43xx uses omap4_local_timer_init(), there's already a fix in
> Tony's tree IIRC.
...
> care to provide a defconfig which would cause a build error ?
My mistake, the code has changed several times and I adapted it to
the latest version each time, but the version I sent out is indeed
useless.
The only hunk that still makes sense is
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index b18ebbefae09..b7ab09cc5ca2 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -494,7 +494,7 @@ void __init omap_init_time(void)
clocksource_probe();
}
-#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX)
+#if defined(CONFIG_ARCH_OMAP3)
void __init omap3_secure_sync32k_timer_init(void)
{
__omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure",
but that is harmless as it does not cause a build error, just a few extra
bytes for an unused function in a AM43XX-only configuration.
Arnd
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ARM: OMAP2: use correct timer function for AM43XX and TI81XX
2015-11-19 15:57 ` Arnd Bergmann
@ 2015-11-19 16:15 ` Felipe Balbi
2015-11-19 18:33 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2015-11-19 16:15 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Arnd Bergmann <arnd@arndb.de> writes:
> On Monday 16 November 2015 15:13:55 Felipe Balbi wrote:
>> Arnd Bergmann <arnd@arndb.de> writes:
>> > AM43XX and TI81XX use omap3_gptimer_timer_init(), but that is only
>> > built into the kernel for OMAP3 and AM33XX, otherwise we get:
>> >
>> > arch/arm/mach-omap2/built-in.o:(.arch.info.init+0x124): undefined reference to `omap3_gptimer_timer_init'
>> >
>> > This changes the Kconfig logic for building the function to
>> > match the callers. Consequently, we no longer need to build
>> > the omap3_secure_sync32k_timer_init and omap4_local_timer_init
>> > for the platforms that have been moved over to other functions.
>> >
>> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>
>> no, AM43xx uses omap4_local_timer_init(), there's already a fix in
>> Tony's tree IIRC.
> ...
>
>> care to provide a defconfig which would cause a build error ?
>
> My mistake, the code has changed several times and I adapted it to
> the latest version each time, but the version I sent out is indeed
> useless.
>
> The only hunk that still makes sense is
>
> diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> index b18ebbefae09..b7ab09cc5ca2 100644
> --- a/arch/arm/mach-omap2/timer.c
> +++ b/arch/arm/mach-omap2/timer.c
> @@ -494,7 +494,7 @@ void __init omap_init_time(void)
> clocksource_probe();
> }
>
> -#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX)
> +#if defined(CONFIG_ARCH_OMAP3)
> void __init omap3_secure_sync32k_timer_init(void)
> {
> __omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure",
>
>
> but that is harmless as it does not cause a build error, just a few extra
> bytes for an unused function in a AM43XX-only configuration.
I think that's still useful. Tony ?
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151119/2623755a/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ARM: OMAP2: use correct timer function for AM43XX and TI81XX
2015-11-19 16:15 ` Felipe Balbi
@ 2015-11-19 18:33 ` Tony Lindgren
0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2015-11-19 18:33 UTC (permalink / raw)
To: linux-arm-kernel
* Felipe Balbi <balbi@ti.com> [151119 08:16]:
>
> Hi,
>
> Arnd Bergmann <arnd@arndb.de> writes:
> > On Monday 16 November 2015 15:13:55 Felipe Balbi wrote:
> >> Arnd Bergmann <arnd@arndb.de> writes:
> >> > AM43XX and TI81XX use omap3_gptimer_timer_init(), but that is only
> >> > built into the kernel for OMAP3 and AM33XX, otherwise we get:
> >> >
> >> > arch/arm/mach-omap2/built-in.o:(.arch.info.init+0x124): undefined reference to `omap3_gptimer_timer_init'
> >> >
> >> > This changes the Kconfig logic for building the function to
> >> > match the callers. Consequently, we no longer need to build
> >> > the omap3_secure_sync32k_timer_init and omap4_local_timer_init
> >> > for the platforms that have been moved over to other functions.
> >> >
> >> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> >>
> >> no, AM43xx uses omap4_local_timer_init(), there's already a fix in
> >> Tony's tree IIRC.
> > ...
> >
> >> care to provide a defconfig which would cause a build error ?
> >
> > My mistake, the code has changed several times and I adapted it to
> > the latest version each time, but the version I sent out is indeed
> > useless.
> >
> > The only hunk that still makes sense is
> >
> > diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
> > index b18ebbefae09..b7ab09cc5ca2 100644
> > --- a/arch/arm/mach-omap2/timer.c
> > +++ b/arch/arm/mach-omap2/timer.c
> > @@ -494,7 +494,7 @@ void __init omap_init_time(void)
> > clocksource_probe();
> > }
> >
> > -#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX)
> > +#if defined(CONFIG_ARCH_OMAP3)
> > void __init omap3_secure_sync32k_timer_init(void)
> > {
> > __omap_sync32k_timer_init(12, "secure_32k_fck", "ti,timer-secure",
> >
> >
> > but that is harmless as it does not cause a build error, just a few extra
> > bytes for an unused function in a AM43XX-only configuration.
>
> I think that's still useful. Tony ?
Yeah makes sense to me. We already have omap4_sync32k_timer_init() when
am437x PM gets enabled.
Regards,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-11-19 18:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 21:10 [PATCH] ARM: OMAP2: use correct timer function for AM43XX and TI81XX Arnd Bergmann
2015-11-16 21:13 ` Felipe Balbi
2015-11-19 15:57 ` Arnd Bergmann
2015-11-19 16:15 ` Felipe Balbi
2015-11-19 18:33 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).