The power management code needs to have access to enable/disable the gic cpu interface and distributor based on targetted low power states. These APIs are suppose to me moved to common ARM GIC library and patch for the same was posted earlier. The GIC code refactoring is ongoing and hence for time being this is kept under OMAP code so that OMAP4 PM can continue to work. Discussion thread: http://www.mail-archive.com/linux-omap@xxxxxxxxxxxxxxx/msg42940.html Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx> Cc: Kevin Hilman <khilman@xxxxxx> Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx> --- arch/arm/mach-omap2/include/mach/omap4-common.h | 5 +++- arch/arm/mach-omap2/omap4-common.c | 24 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/include/mach/omap4-common.h b/arch/arm/mach-omap2/include/mach/omap4-common.h index a6ce905..a4b3beb 100644 --- a/arch/arm/mach-omap2/include/mach/omap4-common.h +++ b/arch/arm/mach-omap2/include/mach/omap4-common.h @@ -44,6 +44,10 @@ extern void __iomem *omap4_get_gic_dist_base(void); extern void __iomem *omap4_get_gic_cpu_base(void); extern void __iomem *omap4_get_sar_ram_base(void); extern void __init gic_init_irq(void); +extern void gic_cpu_enable(void); +extern void gic_cpu_disable(void); +extern void gic_dist_enable(void); +extern void gic_dist_disable(void); extern void omap_smc1(u32 fn, u32 arg); /* @@ -64,7 +68,6 @@ extern int omap4_mpuss_init(void); extern int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state); extern void omap4_cpu_suspend(unsigned int cpu, unsigned int save_state); extern void omap4_cpu_resume(void); - #else static inline int omap4_enter_lowpower(unsigned int cpu, diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 97d7d8a..9dd50b7 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c @@ -61,6 +61,30 @@ void __init gic_init_irq(void) gic_init(0, 29, gic_dist_base_addr, gic_cpu_base); } +/* + * FIXME: Remove this GIC APIs once common GIG library starts + * supporting it. + */ +void gic_cpu_enable(void) +{ + __raw_writel(0xf0, gic_cpu_base + GIC_CPU_PRIMASK); + __raw_writel(1, gic_cpu_base + GIC_CPU_CTRL); +} + +void gic_cpu_disable(void) +{ + __raw_writel(0, gic_cpu_base + GIC_CPU_CTRL); +} + +void gic_dist_enable(void) +{ + __raw_writel(0x1, gic_dist_base_addr + GIC_DIST_CTRL); +} +void gic_dist_disable(void) +{ + __raw_writel(0, gic_dist_base_addr + GIC_CPU_CTRL); +} + #ifdef CONFIG_CACHE_L2X0 void __iomem *omap4_get_l2cache_base(void) -- 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