aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2014-08-12 08:05:19 -0400
committerNishanth Menon <nm@ti.com>2014-09-08 11:54:06 -0400
commit1e037794f7f00ff464db446ace892dae84175a6a (patch)
treed0f5d42be2b089b7f12fa388f5d336ca6272099d
parent2aba071c50591eaa7a2e33d3df296dd74232691e (diff)
ARM: OMAP3+: PRM: register interrupt information from DT
Allow the PRM interrupt information to be picked up from device tree. OMAP3 may use legacy boot and needs to be compatible with old dtbs (without interrupt populated), for these, we use the value which is pre-populated. Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index 2458be6fc67b..e0088e0508f8 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -17,6 +17,7 @@
17#include <linux/err.h> 17#include <linux/err.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/of_irq.h>
20 21
21#include "soc.h" 22#include "soc.h"
22#include "common.h" 23#include "common.h"
@@ -649,6 +650,11 @@ int __init omap3xxx_prm_init(void)
649 return prm_register(&omap3xxx_prm_ll_data); 650 return prm_register(&omap3xxx_prm_ll_data);
650} 651}
651 652
653static struct of_device_id omap3_prm_dt_match_table[] = {
654 { .compatible = "ti,omap3-prm" },
655 { }
656};
657
652static int omap3xxx_prm_late_init(void) 658static int omap3xxx_prm_late_init(void)
653{ 659{
654 int ret; 660 int ret;
@@ -656,6 +662,18 @@ static int omap3xxx_prm_late_init(void)
656 if (!(prm_features & PRM_HAS_IO_WAKEUP)) 662 if (!(prm_features & PRM_HAS_IO_WAKEUP))
657 return 0; 663 return 0;
658 664
665 if (of_have_populated_dt()) {
666 struct device_node *np;
667 int irq_num;
668
669 np = of_find_matching_node(NULL, omap3_prm_dt_match_table);
670 if (np) {
671 irq_num = of_irq_get(np, 0);
672 if (irq_num >= 0)
673 omap3_prcm_irq_setup.irq = irq_num;
674 }
675 }
676
659 omap3xxx_prm_enable_io_wakeup(); 677 omap3xxx_prm_enable_io_wakeup();
660 ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); 678 ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
661 if (!ret) 679 if (!ret)