]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: DSPGW: set autoidle for dsp and mailbox
authorHiroshi DOYU <Hiroshi.DOYU@nokia.com>
Thu, 21 Sep 2006 14:41:39 +0000 (17:41 +0300)
committerJuha Yrjola <juha.yrjola@solidboot.com>
Thu, 21 Sep 2006 15:45:45 +0000 (18:45 +0300)
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 <Hiroshi.DOYU@nokia.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
arch/arm/plat-omap/dsp/dsp_common.c
arch/arm/plat-omap/dsp/dsp_common.h

index 2691601892a40d26ec9c0a1040ec098283744a4a..c65089d8ea57a310bb1e688e6bb4921ec065b516 100644 (file)
@@ -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)) {
index a39f2ce02d4b4bde4da236e318d9b8590788fff0..7da8c500bef98688a2892a04872a2c378b4ccd30 100644 (file)
@@ -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 */