aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-11-21 07:45:29 -0500
committerTero Kristo <t-kristo@ti.com>2015-03-31 14:26:52 -0400
commit8b5b9a22b57c75905b368194b6fd4c472d5dc630 (patch)
tree0e01c9521bd70e7d9cf4a48223132233bab80478 /arch/arm/mach-omap2
parent425dc8b2dff222ffd88f31f589dc647409cae0ce (diff)
ARM: OMAP4+: PRM: setup prm_features from the PRM init time flags
Currently some cpu_is_X checks are used to setup prm_features, however the same can be accomplished by just passing these flags from the PRM init data. This is done in preparation to make PRM a separate driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/prm44xx.c4
-rw-r--r--arch/arm/mach-omap2/prm_common.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index a980d245a0bb..243133c4bf0d 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -707,10 +707,10 @@ int __init omap44xx_prm_init(const struct omap_prcm_init_data *data)
707{ 707{
708 omap_prm_base_init(); 708 omap_prm_base_init();
709 709
710 if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) 710 if (data->flags & PRM_HAS_IO_WAKEUP)
711 prm_features |= PRM_HAS_IO_WAKEUP; 711 prm_features |= PRM_HAS_IO_WAKEUP;
712 712
713 if (!soc_is_dra7xx()) 713 if (data->flags & PRM_HAS_VOLTAGE)
714 prm_features |= PRM_HAS_VOLTAGE; 714 prm_features |= PRM_HAS_VOLTAGE;
715 715
716 omap4_prminst_set_prm_dev_inst(data->device_inst_offset); 716 omap4_prminst_set_prm_dev_inst(data->device_inst_offset);
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 3e932b8b8ce9..04dfe8f844c9 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -669,6 +669,7 @@ static struct omap_prcm_init_data omap4_prm_data __initdata = {
669 .index = TI_CLKM_PRM, 669 .index = TI_CLKM_PRM,
670 .init = omap44xx_prm_init, 670 .init = omap44xx_prm_init,
671 .device_inst_offset = OMAP4430_PRM_DEVICE_INST, 671 .device_inst_offset = OMAP4430_PRM_DEVICE_INST,
672 .flags = PRM_HAS_IO_WAKEUP | PRM_HAS_VOLTAGE,
672}; 673};
673#endif 674#endif
674 675
@@ -677,6 +678,7 @@ static struct omap_prcm_init_data omap5_prm_data __initdata = {
677 .index = TI_CLKM_PRM, 678 .index = TI_CLKM_PRM,
678 .init = omap44xx_prm_init, 679 .init = omap44xx_prm_init,
679 .device_inst_offset = OMAP54XX_PRM_DEVICE_INST, 680 .device_inst_offset = OMAP54XX_PRM_DEVICE_INST,
681 .flags = PRM_HAS_IO_WAKEUP | PRM_HAS_VOLTAGE,
680}; 682};
681#endif 683#endif
682 684
@@ -685,6 +687,7 @@ static struct omap_prcm_init_data dra7_prm_data __initdata = {
685 .index = TI_CLKM_PRM, 687 .index = TI_CLKM_PRM,
686 .init = omap44xx_prm_init, 688 .init = omap44xx_prm_init,
687 .device_inst_offset = DRA7XX_PRM_DEVICE_INST, 689 .device_inst_offset = DRA7XX_PRM_DEVICE_INST,
690 .flags = PRM_HAS_IO_WAKEUP,
688}; 691};
689#endif 692#endif
690 693