Subject: [PATCH] ARM: OMAP2+: Fix undefined reference to set_cntfreq

From: [email-masked] (Santosh Shilimkar)
Date: Mon, 18 Nov 2013 19:04:40 -0500

On Monday 18 November 2013 06:21 PM, Tony Lindgren wrote:
> * Santosh Shilimkar <[email-masked]> [131118 15:11]:
>> On Monday 18 November 2013 04:58 PM, Tony Lindgren wrote:
>>> If CONFIG_SOC_HAS_REALTIME_COUNTER is not selected for omap5
>>> or dra7xx, we can get the following error:
>>>
>>> arch/arm/mach-omap2/built-in.o: In function `omap4_secondary_init':
>>> :(.text+0x7ab0): undefined reference to `set_cntfreq'
>>>
>>> Fix the issue by not trying to initalize the realtime counter
>>> unles CONFIG_SOC_HAS_REALTIME_COUNTER is selected.
>>>
>>> Signed-off-by: Tony Lindgren <[email-masked]>
>>>
>> How about a dummy inline function of set_cntfreq() ?
>> Having #ifdef in middle of the code looks pretty ugly.
> 
> Sure, here's an updated version.
> 
Thanks for quick spin.

> 
> 
> From: Tony Lindgren <[email-masked]>
> Date: Mon, 18 Nov 2013 13:56:48 -0800
> Subject: [PATCH] ARM: OMAP2+: Fix undefined reference to set_cntfreq
> 
> If CONFIG_SOC_HAS_REALTIME_COUNTER is not selected for omap5
> or dra7xx, we can get the following error:
> 
> arch/arm/mach-omap2/built-in.o: In function `omap4_secondary_init':
> :(.text+0x7ab0): undefined reference to `set_cntfreq'
> 
> Fix the issue by not trying to initalize the realtime counter
> unles CONFIG_SOC_HAS_REALTIME_COUNTER is selected.
> 
> Signed-off-by: Tony Lindgren <[email-masked]>
> 
Acked-by: Santosh Shilimkar <[email-masked]>