This is required by OMAP3 as it needs to dynamically unmask events during idle cycle. Signed-off-by: Tero Kristo <t-kristo@xxxxxx> --- arch/arm/mach-omap2/prcm.c | 17 ++++++++++++++--- arch/arm/plat-omap/include/plat/prcm.h | 1 + 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index cc92064..f6cde6f 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c @@ -174,12 +174,23 @@ static void prcm_irq_handler(unsigned int irq, struct irq_desc *desc) */ int omap_prcm_event_to_irq(const char *name) { - int i; + int id; + + id = omap_prcm_event_to_id(name); + if (id < 0) + return id; + return OMAP_PRCM_IRQ_BASE + id; +} +/* + * Given a PRCM event name, returns the corresponding event id. + */ +int omap_prcm_event_to_id(const char *name) +{ + int i; for (i = 0; i < omap_prcm_irqs_nr; i++) if (!strcmp(omap_prcm_irqs[i].name, name)) - return OMAP_PRCM_IRQ_BASE + omap_prcm_irqs[i].offset; - + return omap_prcm_irqs[i].offset; return -ENOENT; } diff --git a/arch/arm/plat-omap/include/plat/prcm.h b/arch/arm/plat-omap/include/plat/prcm.h index 789eb17..b5413ea 100644 --- a/arch/arm/plat-omap/include/plat/prcm.h +++ b/arch/arm/plat-omap/include/plat/prcm.h @@ -70,6 +70,7 @@ void omap4_prcm_ack_event(unsigned event); void omap4_prcm_pending_events(unsigned long *pending); int omap_prcm_event_to_irq(const char *name); +int omap_prcm_event_to_id(const char *name); int omap_prcm_irq_init(void); void omap_prcm_irq_cleanup(void); int omap_prcm_register_pad_irq(u32 pad, unsigned int irq); -- 1.7.4.1 Texas Instruments Oy, Tekniikantie 12, 02150 Espoo. Y-tunnus: 0115040-6. Kotipaikka: Helsinki -- 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