Skip to content

Commit 0b3e6fc

Browse files
grygoriyStmlind
authored andcommitted
ARM: OMAP2+: am43xx: enable GENERIC_CLOCKEVENTS_BROADCAST
System will misbehave in the following case: - AM43XX only build (UP); - CONFIG_CPU_IDLE=y - ARM TWD timer enabled and selected as clockevent device. In the above case, It's expected that broadcast timer will be used as backup timer when CPUIdle will put MPU in low power states where ARM TWD will stop and lose its context. But, the CONFIG_SMP might not be selected when kernel is built for AM43XX SoC only and, as result, GENERIC_CLOCKEVENTS_BROADCAST option will not be selected also. This will break CPUIdle and System will stuck in low power states. Hence, fix it by selecting GENERIC_CLOCKEVENTS_BROADCAST option for AM43XX SoCs always and add empty tick_broadcast() function implementation - no need to send any IPI on UP. After this change timer1 will be selected as broadcast timer the same way as for SMP, and CPUIdle will work properly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent 14054fb commit 0b3e6fc

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

arch/arm/mach-omap2/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ config SOC_AM43XX
6565
select MACH_OMAP_GENERIC
6666
select MIGHT_HAVE_CACHE_L2X0
6767
select HAVE_ARM_SCU
68+
select GENERIC_CLOCKEVENTS_BROADCAST
6869

6970
config SOC_DRA7XX
7071
bool "TI DRA7XX"

arch/arm/mach-omap2/timer.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,12 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
320320
return r;
321321
}
322322

323+
#if !defined(CONFIG_SMP) && defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST)
324+
void tick_broadcast(const struct cpumask *mask)
325+
{
326+
}
327+
#endif
328+
323329
static void __init omap2_gp_clockevent_init(int gptimer_id,
324330
const char *fck_source,
325331
const char *property)

0 commit comments

Comments
 (0)