From 303253ccfdf22687b6e42397afee5238b1476d3e Mon Sep 17 00:00:00 2001 From: Hiroshi DOYU Date: Thu, 21 Sep 2006 17:41:39 +0300 Subject: [PATCH] ARM: OMAP: DSPGW: set autoidle for dsp and mailbox Add dsp clock autoidle(DSP_FCLK, DSP_ICLK, INT_D_FCLK, INT_D_ICLK). which are controled together by auto-control mode. Signed-off-by: Hiroshi DOYU Signed-off-by: Juha Yrjola --- arch/arm/plat-omap/dsp/dsp_common.c | 2 ++ arch/arm/plat-omap/dsp/dsp_common.h | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/arch/arm/plat-omap/dsp/dsp_common.c b/arch/arm/plat-omap/dsp/dsp_common.c index 2691601892a..c65089d8ea5 100644 --- a/arch/arm/plat-omap/dsp/dsp_common.c +++ b/arch/arm/plat-omap/dsp/dsp_common.c @@ -305,6 +305,8 @@ static int __init omap_dsp_init(void) return -ENODEV; } + dsp_clk_autoidle(); + #if defined(CONFIG_ARCH_OMAP1) dsp_ck_handle = clk_get(NULL, "dsp_ck"); if (IS_ERR(dsp_ck_handle)) { diff --git a/arch/arm/plat-omap/dsp/dsp_common.h b/arch/arm/plat-omap/dsp/dsp_common.h index a39f2ce02d4..7da8c500bef 100644 --- a/arch/arm/plat-omap/dsp/dsp_common.h +++ b/arch/arm/plat-omap/dsp/dsp_common.h @@ -154,4 +154,16 @@ void dsp_register_mem_cb(int (*req_cb)(void), void (*rel_cb)(void)); void dsp_unregister_mem_cb(void); #endif +#if defined(CONFIG_ARCH_OMAP1) +static inline void dsp_clk_autoidle(void) {} +#elif defined(CONFIG_ARCH_OMAP2) +static inline void dsp_clk_autoidle(void) +{ + /*XXX should be handled in mach-omap[1,2] XXX*/ + PM_PWSTCTRL_DSP = (1 << 18) | (1 << 0); + CM_AUTOIDLE_DSP |= (1 << 1); + CM_CLKSTCTRL_DSP |= (1 << 0); +} +#endif + #endif /* DRIVER_DSP_COMMON_H */ -- 2.41.1