瀏覽代碼

msm: eva: Skip sleep clock enable/disable

It's always enabled by framework.

Change-Id: I6f6c8fded0333e2b2fca0a73d5d60f96d65b9940
Signed-off-by: George Shen <[email protected]>
George Shen 2 年之前
父節點
當前提交
d9076b962e
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      msm/eva/msm_cvp_clocks.c

+ 11 - 0
msm/eva/msm_cvp_clocks.c

@@ -321,6 +321,12 @@ int msm_cvp_prepare_enable_clk(struct iris_hfi_device *device,
 		* them.  Since we don't really have a load at this point,
 		* scale it to the lowest frequency possible
 		*/
+		if (!cl->clk) {
+			dprintk(CVP_PWR, "%s %s already enabled by framework",
+				__func__, cl->name);
+			return 0;
+		}
+
 		if (cl->has_scaling) {
 			if (device->mmrm_cvp != NULL) {
 				// set min freq and cur freq to 0;
@@ -375,6 +381,11 @@ int msm_cvp_disable_unprepare_clk(struct iris_hfi_device *device,
 	iris_hfi_for_each_clock_reverse(device, cl) {
 		if (strcmp(cl->name, name))
 			continue;
+		if (!cl->clk) {
+			dprintk(CVP_PWR, "%s %s always enabled by framework",
+				__func__, cl->name);
+			return 0;
+		}
 		clk_disable_unprepare(cl->clk);
 		dprintk(CVP_PWR, "Clock: %s disable and unprepare\n",
 			cl->name);