To adhere to recent early_init changes, commit '44dc0' made omap_hwmod_late_init() to core_initcall to avoid ioremap() failures. Later 'e7c7d7' removed _mpu_rt_va population omap_hwmod_late_init() So now if we move the omap_hwmod_late_init() to mdesc->timer->init(), timer1 should work with hwmod instead of any special hwmod settings. This was proposed by Paul Walmsley <paul@xxxxxxxxx> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx> Cc: Paul Walmsley <paul@xxxxxxxxx> Cc: Tony Lindgren <tony@xxxxxxxxxxx> Cc: Kevin Hilman <khilman@xxxxxx> Cc: Benoit Cousson <b-cousson@xxxxxx> --- Same patch I posted as part of the "Linux-next as of 20110222 broken on OMAP4" thread. arch/arm/mach-omap2/omap_hwmod.c | 3 +-- arch/arm/mach-omap2/timer-gp.c | 4 +++- arch/arm/plat-omap/include/plat/omap_hwmod.h | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 9e89a58..b39cb40 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -1646,7 +1646,7 @@ static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data) * to struct clk pointers for each registered omap_hwmod. Also calls * _setup() on each hwmod. Returns 0. */ -static int __init omap_hwmod_late_init(void) +int __init omap_hwmod_late_init(void) { int r; @@ -1664,7 +1664,6 @@ static int __init omap_hwmod_late_init(void) return 0; } -core_initcall(omap_hwmod_late_init); /** * omap_hwmod_enable - enable an omap_hwmod diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 7b7c268..319ca42 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -37,8 +37,9 @@ #include <linux/clockchips.h> #include <asm/mach/time.h> -#include <plat/dmtimer.h> #include <asm/localtimer.h> +#include <plat/dmtimer.h> +#include <plat/omap_hwmod.h> #include "timer-gp.h" @@ -231,6 +232,7 @@ static void __init omap2_gp_clocksource_init(void) static void __init omap2_gp_timer_init(void) { + omap_hwmod_late_init(); #ifdef CONFIG_LOCAL_TIMERS if (cpu_is_omap44xx()) { twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256); diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index fedd829..e2bdbb3 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -536,6 +536,7 @@ struct omap_hwmod { }; int omap_hwmod_init(struct omap_hwmod **ohs); +int omap_hwmod_late_init(void); struct omap_hwmod *omap_hwmod_lookup(const char *name); int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), void *data); -- 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html