From 993a01a79001b6c6cef1adef4584acda252a84ac Mon Sep 17 00:00:00 2001 From: Toshihiro Kobayashi Date: Mon, 16 Jan 2006 10:49:16 -0800 Subject: [PATCH] [PATCH] ARM: OMAP: patch-dsp_ckfix3 Here's a further patch to centralize the pm code. --- arch/arm/mach-omap1/pm.c | 6 ++---- arch/arm/plat-omap/dsp/dsp_common.c | 18 ------------------ include/asm-arm/arch-omap/dsp_common.h | 2 -- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index bbc3452fb7b..e4d9bed8ed5 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -239,6 +239,7 @@ static void omap_pm_wakeup_setup(void) #define EN_DSPCK 13 /* ARM_CKCTL */ #define EN_APICK 6 /* ARM_IDLECT2 */ +#define DSP_EN 1 /* ARM_RSTCT1 */ void omap_pm_suspend(void) { @@ -323,7 +324,7 @@ void omap_pm_suspend(void) */ /* stop DSP */ - omap_dsp_pm_suspend(); + omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1); /* shut down dsp_ck */ omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL); @@ -388,9 +389,6 @@ void omap_pm_suspend(void) /* Restore DSP domain clocks */ DSP_RESTORE(DSP_IDLECT2); - /* resume DSP */ - omap_dsp_pm_resume(); - /* * Restore ARM state, except ARM_IDLECT1/2 which omap_cpu_suspend did */ diff --git a/arch/arm/plat-omap/dsp/dsp_common.c b/arch/arm/plat-omap/dsp/dsp_common.c index 48d8af8c9e2..0c22a6b237d 100644 --- a/arch/arm/plat-omap/dsp/dsp_common.c +++ b/arch/arm/plat-omap/dsp/dsp_common.c @@ -240,22 +240,6 @@ void dsp_set_idle_boot_base(unsigned long adr, size_t size) static int init_done; -/* - * note: if we are in pm_suspend / pm_resume function, - */ -void omap_dsp_pm_suspend(void) -{ - /* Reset DSP */ - __dsp_reset(); -} - -void omap_dsp_pm_resume(void) -{ - /* Run DSP, if it was running */ - if (cpustat.stat != CPUSTAT_RESET) - __dsp_run(); -} - static int __init omap_dsp_init(void) { dspmem_size = 0; @@ -503,8 +487,6 @@ void dsp_unregister_mem_cb(void) arch_initcall(omap_dsp_init); -EXPORT_SYMBOL(omap_dsp_pm_suspend); -EXPORT_SYMBOL(omap_dsp_pm_resume); EXPORT_SYMBOL(omap_dsp_request_mpui); EXPORT_SYMBOL(omap_dsp_release_mpui); EXPORT_SYMBOL(omap_dsp_request_mem); diff --git a/include/asm-arm/arch-omap/dsp_common.h b/include/asm-arm/arch-omap/dsp_common.h index 4fcce694405..ca237438080 100644 --- a/include/asm-arm/arch-omap/dsp_common.h +++ b/include/asm-arm/arch-omap/dsp_common.h @@ -27,8 +27,6 @@ #ifndef ASM_ARCH_DSP_COMMON_H #define ASM_ARCH_DSP_COMMON_H -void omap_dsp_pm_suspend(void); -void omap_dsp_pm_resume(void); void omap_dsp_request_mpui(void); void omap_dsp_release_mpui(void); int omap_dsp_request_mem(void); -- 2.41.1