Here's a further patch to centralize the pm code.
#define EN_DSPCK 13 /* ARM_CKCTL */
#define EN_APICK 6 /* ARM_IDLECT2 */
+#define DSP_EN 1 /* ARM_RSTCT1 */
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);
/* 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
*/
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;
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);
#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);