summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/prminst44xx.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-09-08 12:29:43 +0400
committerTero Kristo <t-kristo@ti.com>2015-03-31 21:26:44 +0300
commit48e0c1148d18de677f1b2aec179f36fb7c1e3839 (patch)
treea99f48711d42fe91fd81ef55d5ced8352c4bdc2f /arch/arm/mach-omap2/prminst44xx.c
parentab7b2ffcf576a49b51c240dcd68ca4b7cd60b84d (diff)
downloadlinux-48e0c1148d18de677f1b2aec179f36fb7c1e3839.tar.xz
ARM: OMAP4+: PRM: determine prm_device_inst based on DT compatibility
PRM device instance offset is now provided through the prm_init_data. This gets rid of some cpu_is_X / soc_is_X calls from PRM core code, preparing for PRM to be its own separate driver. Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/prminst44xx.c')
-rw-r--r--arch/arm/mach-omap2/prminst44xx.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index 8adf7b1a1dce..c4859c4d3646 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -47,22 +47,14 @@ void omap_prm_base_init(void)
s32 omap4_prmst_get_prm_dev_inst(void)
{
- if (prm_dev_inst != PRM_INSTANCE_UNKNOWN)
- return prm_dev_inst;
-
- /* This cannot be done way early at boot.. as things are not setup */
- if (cpu_is_omap44xx())
- prm_dev_inst = OMAP4430_PRM_DEVICE_INST;
- else if (soc_is_omap54xx())
- prm_dev_inst = OMAP54XX_PRM_DEVICE_INST;
- else if (soc_is_dra7xx())
- prm_dev_inst = DRA7XX_PRM_DEVICE_INST;
- else if (soc_is_am43xx())
- prm_dev_inst = AM43XX_PRM_DEVICE_INST;
-
return prm_dev_inst;
}
+void omap4_prminst_set_prm_dev_inst(s32 dev_inst)
+{
+ prm_dev_inst = dev_inst;
+}
+
/* Read a register in a PRM instance */
u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx)
{