瀏覽代碼

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 <[email protected]>
Ramprasad Katkam 6 年之前
父節點
當前提交
48b49b2117
共有 1 個文件被更改,包括 4 次插入8 次删除
  1. 4 8
      soc/swr-mstr-ctrl.c

+ 4 - 8
soc/swr-mstr-ctrl.c

@@ -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);