summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c94
1 files changed, 3 insertions, 91 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 31d1a21f6041..5a2a9b8e61ed 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3054,6 +3054,8 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
return 0;
}
+static int __init omap_hwmod_setup_one(const char *oh_name);
+
/**
* _ensure_mpu_hwmod_is_setup - ensure the MPU SS hwmod is init'ed and set up
* @oh: pointer to the hwmod currently being set up (usually not the MPU)
@@ -3084,7 +3086,7 @@ static void __init _ensure_mpu_hwmod_is_setup(struct omap_hwmod *oh)
* registered omap_hwmod. Also calls _setup() on each hwmod. Returns
* -EINVAL upon error or 0 upon success.
*/
-int __init omap_hwmod_setup_one(const char *oh_name)
+static int __init omap_hwmod_setup_one(const char *oh_name)
{
struct omap_hwmod *oh;
@@ -3764,55 +3766,6 @@ int omap_hwmod_shutdown(struct omap_hwmod *oh)
*/
/**
- * omap_hwmod_get_pwrdm - return pointer to this module's main powerdomain
- * @oh: struct omap_hwmod *
- *
- * Return the powerdomain pointer associated with the OMAP module
- * @oh's main clock. If @oh does not have a main clk, return the
- * powerdomain associated with the interface clock associated with the
- * module's MPU port. (XXX Perhaps this should use the SDMA port
- * instead?) Returns NULL on error, or a struct powerdomain * on
- * success.
- */
-struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
-{
- struct clk *c;
- struct omap_hwmod_ocp_if *oi;
- struct clockdomain *clkdm;
- struct clk_hw_omap *clk;
- struct clk_hw *hw;
-
- if (!oh)
- return NULL;
-
- if (oh->clkdm)
- return oh->clkdm->pwrdm.ptr;
-
- if (oh->_clk) {
- c = oh->_clk;
- } else {
- oi = _find_mpu_rt_port(oh);
- if (!oi)
- return NULL;
- c = oi->_clk;
- }
-
- hw = __clk_get_hw(c);
- if (!hw)
- return NULL;
-
- clk = to_clk_hw_omap(hw);
- if (!clk)
- return NULL;
-
- clkdm = clk->clkdm;
- if (!clkdm)
- return NULL;
-
- return clkdm->pwrdm.ptr;
-}
-
-/**
* omap_hwmod_get_mpu_rt_va - return the module's base address (for the MPU)
* @oh: struct omap_hwmod *
*
@@ -3978,32 +3931,6 @@ ohsps_unlock:
}
/**
- * omap_hwmod_get_context_loss_count - get lost context count
- * @oh: struct omap_hwmod *
- *
- * Returns the context loss count of associated @oh
- * upon success, or zero if no context loss data is available.
- *
- * On OMAP4, this queries the per-hwmod context loss register,
- * assuming one exists. If not, or on OMAP2/3, this queries the
- * enclosing powerdomain context loss count.
- */
-int omap_hwmod_get_context_loss_count(struct omap_hwmod *oh)
-{
- struct powerdomain *pwrdm;
- int ret = 0;
-
- if (soc_ops.get_context_lost)
- return soc_ops.get_context_lost(oh);
-
- pwrdm = omap_hwmod_get_pwrdm(oh);
- if (pwrdm)
- ret = pwrdm_get_context_loss_count(pwrdm);
-
- return ret;
-}
-
-/**
* omap_hwmod_init - initialize the hwmod code
*
* Sets up some function pointers needed by the hwmod code to operate on the
@@ -4054,18 +3981,3 @@ void __init omap_hwmod_init(void)
inited = true;
}
-
-/**
- * omap_hwmod_get_main_clk - get pointer to main clock name
- * @oh: struct omap_hwmod *
- *
- * Returns the main clock name assocated with @oh upon success,
- * or NULL if @oh is NULL.
- */
-const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
-{
- if (!oh)
- return NULL;
-
- return oh->main_clk;
-}