[PATCH 08/19] DSPBRIDGE: remove clk_get_use_cnt

Omar Ramirez Luna
2010-04-08T22:59:32Z

Instead of querying the use count, balanced number of
enable/disable should be enforced across the system.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
---
arch/arm/plat-omap/include/dspbridge/clk.h | 13 -------------
drivers/dsp/bridge/services/clk.c | 23 -----------------------
2 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/arch/arm/plat-omap/include/dspbridge/clk.h b/arch/arm/plat-omap/include/dspbridge/clk.h
index 73d97c7..0c16709 100644
--- a/arch/arm/plat-omap/include/dspbridge/clk.h
+++ b/arch/arm/plat-omap/include/dspbridge/clk.h
@@ -102,19 +102,6 @@ extern dsp_status dsp_clk_disable(IN enum dsp_clk_id clk_id);

extern void ssi_clk_prepare(bool FLAG);

-/*
- * ======== CLK_Get_RefCnt ========
- * Purpose:
- * get the reference count for the clock.
- * Parameters:
- * Returns:
- * s32: Reference Count for the clock.
- * DSP_EFAIL: Error occured while getting the reference count of a clock.
- * Requires:
- * Ensures:
- */
-extern s32 clk_get_use_cnt(IN enum dsp_clk_id clk_id);
-
u32 omap_bridge_get_iva2_rate(void);

#endif /* _SYNC_H */
diff --git a/drivers/dsp/bridge/services/clk.c b/drivers/dsp/bridge/services/clk.c
index d675aba..094fe68 100644
--- a/drivers/dsp/bridge/services/clk.c
+++ b/drivers/dsp/bridge/services/clk.c
@@ -181,20 +181,11 @@ dsp_status dsp_clk_disable(IN enum dsp_clk_id clk_id)
{
dsp_status status = DSP_SOK;
struct clk *clk_handle;
- s32 clk_use_cnt;

DBC_REQUIRE(clk_id < DSP_CLK_NOT_DEFINED);

clk_handle = dsp_clks[clk_id].clk_handle;

- clk_use_cnt = clk_get_use_cnt(clk_id);
- if (clk_use_cnt == -1) {
- pr_err("%s: failed to get CLK Use count for CLK %s, CLK dev id"
- " = %d\n", __func__, dsp_clks[clk_id].clk_name,
- dsp_clks[clk_id].id);
- } else if (clk_use_cnt == 0) {
- return status;
- }
if (clk_id == DSP_CLK_SSI_ICK)
ssi_clk_prepare(false);

@@ -203,20 +194,6 @@ dsp_status dsp_clk_disable(IN enum dsp_clk_id clk_id)
return status;
}

-s32 clk_get_use_cnt(IN enum dsp_clk_id clk_id)
-{
- struct clk *clk_handle;
- s32 use_count = -1;
- DBC_REQUIRE(clk_id < DSP_CLK_NOT_DEFINED);
-
- clk_handle = dsp_clks[clk_id].clk_handle;
-
- /* FIXME: usecount shouldn't be used */
- use_count = clk_handle->usecount;
-
- return use_count;
-}
-
void ssi_clk_prepare(bool FLAG)
{
void __iomem *ssi_base;
--
1.6.2.4