update rk2818_dsp probe
author杜坤明 <dkm@rock-chips.com>
Wed, 9 Jun 2010 01:09:33 +0000 (01:09 +0000)
committer黄涛 <huangtao@rock-chips.com>
Mon, 21 Jun 2010 05:35:25 +0000 (13:35 +0800)
drivers/staging/rk2818/rk2818_dsp/rk2818_dsp.c

index 01f9f070ac47250f6e46f917313134fcc3c326dd..134a725dd3244fe29bbab6e7164ddb28e7a47063 100644 (file)
@@ -170,7 +170,7 @@ void dsp_set_clk(int clkrate)
     if(clkrate > 24 && clkrate < 600) {
                if(inf->clk)    clk_set_rate(inf->clk, clkrate*1000000);
     } else {
-        if(inf->clk)   clk_set_rate(inf->clk, 300*1000000);
+        if(inf->clk)   clk_set_rate(inf->clk, 500*1000000);
     }
 #else
        unsigned int freqreg = 0;
@@ -854,6 +854,9 @@ static int __init dsp_drv_probe(struct platform_device *pdev)
 
        g_inf = inf;
 
+       dsp_powerctl(DPC_SLEEP, 0);
+    inf->dsp_status = DS_SLEEP;
+
     return 0;
 
 reg_fail:
@@ -913,9 +916,11 @@ static int dsp_drv_suspend(struct platform_device *pdev, pm_message_t state)
 
     if(DS_NORMAL==inf->dsp_status)  return -EPERM;
 
-    dsp_powerctl(DPC_SLEEP, 0);
-    inf->dsp_status = DS_SLEEP;
-    //printk("dsp work mode : sleep mode \n");
+       if(DS_SLEEP != inf->dsp_status ) {
+        dsp_powerctl(DPC_SLEEP, 0);
+        inf->dsp_status = DS_SLEEP;
+        //printk("dsp work mode : sleep mode \n");
+       }
     return 0;
 }