50 #define PWRSTST_TIMEOUT 200
59 #ifdef CONFIG_TIDSPBRIDGE_DVFS
64 constraint_val = (
u32 *) (pargs);
67 (
u32) *(constraint_val + 1));
86 #ifdef CONFIG_TIDSPBRIDGE_DVFS
98 pr_err(
"Waiting for DSP OFF mode interrupted\n");
105 pr_err(
"%s: Timed out waiting for DSP off mode\n", __func__);
111 omap_mbox_save_ctx(dev_context->
mbox);
122 #ifdef CONFIG_TIDSPBRIDGE_DVFS
126 status = DSP_EHANDLE;
154 #ifdef CONFIG_TIDSPBRIDGE_NTFY_PWRERR
158 u32 pwr_state, target_pwr_state;
168 omap_mbox_save_ctx(dev_context->
mbox);
180 omap_mbox_save_ctx(dev_context->
mbox);
197 dev_dbg(
bridge,
"PM: %s - Bridge in Illegal state\n", __func__);
206 while ((pwr_state != target_pwr_state) && --timeout) {
208 pr_err(
"Waiting for DSP to Suspend interrupted\n");
216 pr_err(
"%s: Timed out waiting for DSP off mode, state %x\n",
217 __func__, pwr_state);
218 #ifdef CONFIG_TIDSPBRIDGE_NTFY_PWRERR
237 #ifdef CONFIG_TIDSPBRIDGE_DVFS
289 u32 dsp_per_clks_before;
294 ext_clk = (
u32) *((
u32 *) pargs);
299 if (ext_clk_id == bpwr_clkid[tmp_index]) {
300 clk_id_index = tmp_index;
306 if (clk_id_index == MBX_PM_MAX_RESOURCES) {
311 switch (ext_clk_cmd) {
318 (~((
u32) (1 << bpwr_clks[clk_id_index].clk)));
326 (1 << bpwr_clks[clk_id_index].clk);
344 #ifdef CONFIG_TIDSPBRIDGE_DVFS
348 voltage_domain = *((
u32 *) pargs);
349 level = *((
u32 *) pargs + 1);
351 dev_dbg(
bridge,
"OPP: %s voltage_domain = %x, level = 0x%x\n",
352 __func__, voltage_domain, level);
356 dev_dbg(
bridge,
"OPP: %s IVA in sleep. No message to DSP\n");
360 dev_dbg(
bridge,
"OPP: %s sent notification to DSP\n", __func__);
379 #ifdef CONFIG_TIDSPBRIDGE_DVFS
388 voltage_domain = *((
u32 *) pargs);
389 level = *((
u32 *) pargs + 1);
390 dev_dbg(
bridge,
"OPP: %s voltage_domain = %x, level = 0x%x\n",
391 __func__, voltage_domain, level);
404 dev_dbg(
bridge,
"OPP: %s wrote to shm. Sent post notification "
405 "to DSP\n", __func__);