diff options
author | Tero Kristo <t-kristo@ti.com> | 2014-03-31 18:15:44 +0300 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2014-05-15 22:34:58 -0600 |
commit | 2541d15f16479fd56debe1ea55dee03c3886e33c (patch) | |
tree | 0cedc2f13f21caaf047d74d95ef8b7ed2353d484 /arch/arm/mach-omap2/prm3xxx.c | |
parent | 81243651ba25c4418af26c3c6f1aeabb41f734e0 (diff) | |
download | talos-obmc-linux-2541d15f16479fd56debe1ea55dee03c3886e33c.tar.gz talos-obmc-linux-2541d15f16479fd56debe1ea55dee03c3886e33c.zip |
ARM: OMAP3/OMAP4: PRM: add prm_features flags and add IO wakeup under it
prm_features flag will contain SoC specific feature enabler flags. Initially
IO wakeup is added under this. Helps to get rid of runtime cpu_is_X checks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/prm3xxx.c')
-rw-r--r-- | arch/arm/mach-omap2/prm3xxx.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index 2631b9f2b3d8..9c95ac21c5b3 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c @@ -247,7 +247,7 @@ void omap3xxx_prm_reconfigure_io_chain(void) */ static void __init omap3xxx_prm_enable_io_wakeup(void) { - if (omap3_has_io_wakeup()) + if (prm_features & PRM_HAS_IO_WAKEUP) omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); } @@ -407,6 +407,9 @@ static struct prm_ll_data omap3xxx_prm_ll_data = { int __init omap3xxx_prm_init(void) { + if (omap3_has_io_wakeup()) + prm_features |= PRM_HAS_IO_WAKEUP; + return prm_register(&omap3xxx_prm_ll_data); } @@ -417,6 +420,9 @@ static int __init omap3xxx_prm_late_init(void) if (!cpu_is_omap34xx()) return 0; + if (!(prm_features & PRM_HAS_IO_WAKEUP)) + return 0; + omap3xxx_prm_enable_io_wakeup(); ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup); if (!ret) |