Add hwmod api's to add and delete an initiator
association with an hwmod.
Signed-off-by: Rajendra Nayak <[email protected]>
---
arch/arm/mach-omap2/omap_hwmod.c | 33 ++++++++++++++++++++++++++
arch/arm/plat-omap/include/plat/omap_hwmod.h | 2 +
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index e034294..d4826be 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2369,3 +2369,36 @@ int omap_hwmod_no_setup_reset(struct omap_hwmod *oh)
return 0;
}
+
+int omap_hwmod_add_initiator_user(struct omap_hwmod *oh, u8 init_id)
+{
+ if (oh->_state != _HWMOD_STATE_ENABLED)
+ return -EINVAL;
+
+ if (cpu_is_omap34xx()) {
+ return omap2_prm_module_enable_initiator_wakeup(
+ oh->prcm.omap2.module_offs,
+ oh->prcm.omap2.idlest_reg_id,
+ oh->prcm.omap2.idlest_idle_bit,
+ init_id);
+ }
+
+ return -EINVAL;
+}
+
+int omap_hwmod_del_initiator_user(struct omap_hwmod *oh, u8 init_id)
+{
+ if (oh->_state == _HWMOD_STATE_ENABLED)
+ return -EINVAL;
+
+ if (cpu_is_omap34xx()) {
+ return omap2_prm_module_disable_initiator_wakeup(
+ oh->prcm.omap2.module_offs,
+ oh->prcm.omap2.idlest_reg_id,
+ oh->prcm.omap2.idlest_idle_bit,
+ init_id);
+ }
+
+ return -EINVAL;
+
+}
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h
b/arch/arm/plat-omap/include/plat/omap_hwmod.h
index 4bd7354..fe47448 100644
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
@@ -590,6 +590,8 @@ int omap_hwmod_add_initiator_dep(struct omap_hwmod *oh,
struct omap_hwmod *init_oh);
int omap_hwmod_del_initiator_dep(struct omap_hwmod *oh,
struct omap_hwmod *init_oh);
+int omap_hwmod_add_initiator_user(struct omap_hwmod *oh, u8 init_id);
+int omap_hwmod_del_initiator_user(struct omap_hwmod *oh, u8 init_id);
int omap_hwmod_set_clockact_both(struct omap_hwmod *oh);
int omap_hwmod_set_clockact_main(struct omap_hwmod *oh);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html