From 9d6a2b30729fd6d005322251ed12a87e190a8824 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Wed, 1 Sep 2010 13:58:37 +0800 Subject: [PATCH] =?utf8?q?dsp:=20=E6=89=93=E5=BC=80=E7=94=B5=E6=BA=90?= =?utf8?q?=E5=9F=9F=E6=97=B6=E9=81=BF=E5=85=8D=E8=AE=BF=E9=97=AEDDR?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../staging/rk2818/rk2818_dsp/rk2818_dsp.c | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rk2818/rk2818_dsp/rk2818_dsp.c b/drivers/staging/rk2818/rk2818_dsp/rk2818_dsp.c index f6170cf9f9df..0561611ad697 100755 --- a/drivers/staging/rk2818/rk2818_dsp/rk2818_dsp.c +++ b/drivers/staging/rk2818/rk2818_dsp/rk2818_dsp.c @@ -338,6 +338,20 @@ void dsp_set_clk(int clkrate) #endif } +#ifdef CONFIG_CHIP_RK2818 +#include +static void __tcmfunc dsp_subsys_power_on(void) +{ + unsigned long flags; + + local_irq_save(flags); + /* dsp subsys power on 0x21*/ + tcm_udelay(1, 600); //¿ªÖ®Ç°Ò²µÃ¼Ó,±ÜÃâ×ÜÏß»¹ÔÚ·ÃÎÊ + __raw_writel((__raw_readl(SCU_BASE_ADDR_VA+0x10) & (~0x21)) , SCU_BASE_ADDR_VA+0x10); + tcm_udelay(1, 600); //¹ØÖжÏʱ¼ä²»ÄÜÌ«³¤ (´ó¸ÅΪ1us) + local_irq_restore(flags); +} +#endif void dsp_powerctl(int ctl, int arg) { @@ -348,15 +362,9 @@ void dsp_powerctl(int ctl, int arg) { case DPC_NORMAL: { -#if 0 //def CONFIG_CHIP_RK2818 //coreµçѹ²»ÎÈʱ,dspÉϵç»áµ¼ÖÂAHBÈ¡Ö¸´íÎó,ËùÒÔdspÉϵçºóµ½Îȶ¨Æڼ䲻²Ù×÷AHB - unsigned long flags; - local_irq_save(flags); - /* dsp subsys power on 0x21*/ - ddr_pll_delay(6000); //¿ªÖ®Ç°Ò²µÃ¼Ó,±ÜÃâ×ÜÏß»¹ÔÚ·ÃÎÊ - __raw_writel((__raw_readl(SCU_BASE_ADDR_VA+0x10) & (~0x21)) , SCU_BASE_ADDR_VA+0x10); - ddr_pll_delay(6000); //¹ØÖжÏʱ¼ä²»ÄÜÌ«³¤ (6000´ó¸ÅΪ1us) - local_irq_restore(flags); - mdelay(10); +#ifdef CONFIG_CHIP_RK2818 //coreµçѹ²»ÎÈʱ,dspÉϵç»áµ¼ÖÂAHBÈ¡Ö¸´íÎó,ËùÒÔdspÉϵçºóµ½Îȶ¨Æڼ䲻²Ù×÷AHB + dsp_subsys_power_on(); + mdelay(10); #else /* dsp subsys power on 0x21*/ __raw_writel((__raw_readl(SCU_BASE_ADDR_VA+0x10) & (~0x21)) , SCU_BASE_ADDR_VA+0x10); -- 2.34.1