DSP suspend/resume callbacks don't ref uninitialized clock handles on
unsupported boards or after other errors. Avoid lockup at system suspend.
Signed-off-by: Todd Poynor <tpoynor@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
}
static unsigned short save_dsp_idlect2;
+static int init_done;
/*
* note: if we are in pm_suspend / pm_resume function,
/* Reset DSP */
__dsp_reset();
+ if (! init_done)
+ return;
+
clk_disable(dsp_ck_handle);
/* Stop any DSP domain clocks */
{
unsigned short save_arm_idlect2;
+ if (! init_done)
+ return;
+
/* Restore DSP domain clocks */
save_arm_idlect2 = omap_readw(ARM_IDLECT2); // api_ck is in ARM_IDLECT2
clk_enable(api_ck_handle);
__dsp_run();
}
-static int init_done;
-
static int __init omap_dsp_init(void)
{
dspmem_size = 0;