soc: swr-mstr: Avoid master reinit during clock stop-resume
Avoid reinitializing master when resuming from clock stop to avoid possible slave sync lost. Change-Id: I8b2403bf10c0ec2ab7b294d64441b4d9a8afcaa0 Signed-off-by: Ramprasad Katkam <katkam@codeaurora.org>
This commit is contained in:
parent
662dec1e1e
commit
48b49b2117
1 changed files with 4 additions and 8 deletions
|
@ -1235,7 +1235,7 @@ static irqreturn_t swr_mstr_interrupt(int irq, void *dev)
|
|||
if (ret) {
|
||||
dev_err(swrm->dev, "no slave alert found.\
|
||||
spurious interrupt\n");
|
||||
return ret;
|
||||
break;
|
||||
}
|
||||
list_for_each_entry(swr_dev, &mstr->devices, dev_list) {
|
||||
if (swr_dev->dev_num != devnum)
|
||||
|
@ -1348,10 +1348,6 @@ static void swrm_wakeup_work(struct work_struct *work)
|
|||
return;
|
||||
}
|
||||
pm_runtime_get_sync(swrm->dev);
|
||||
|
||||
swrm_cmd_fifo_wr_cmd(swrm, 0x4, 0xF, 0xF,
|
||||
SWRS_SCP_INT_STATUS_MASK_1);
|
||||
|
||||
pm_runtime_mark_last_busy(swrm->dev);
|
||||
pm_runtime_put_autosuspend(swrm->dev);
|
||||
}
|
||||
|
@ -1871,14 +1867,14 @@ static int swrm_runtime_resume(struct device *dev)
|
|||
goto exit;
|
||||
}
|
||||
}
|
||||
swr_master_write(swrm, SWRM_COMP_SW_RESET, 0x01);
|
||||
swr_master_write(swrm, SWRM_COMP_SW_RESET, 0x01);
|
||||
swrm_master_init(swrm);
|
||||
} else {
|
||||
/*wake up from clock stop*/
|
||||
swr_master_write(swrm, SWRM_MCP_BUS_CTRL_ADDR, 0x2);
|
||||
usleep_range(100, 105);
|
||||
}
|
||||
swr_master_write(swrm, SWRM_COMP_SW_RESET, 0x01);
|
||||
swr_master_write(swrm, SWRM_COMP_SW_RESET, 0x01);
|
||||
swrm_master_init(swrm);
|
||||
}
|
||||
exit:
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, auto_suspend_timer);
|
||||
|
|
Loading…
Add table
Reference in a new issue