|
@@ -269,6 +269,13 @@ static int qce_crypto_config(struct qce_device *pce_dev,
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static void qce_enable_clock_gating(struct qce_device *pce_dev)
|
|
|
+{
|
|
|
+ writel_relaxed(0x1, pce_dev->iobase + CRYPTO_PWR_CTRL);
|
|
|
+ //Write memory barrier
|
|
|
+ wmb();
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* IV counter mask is be set based on the values sent through the offload ioctl
|
|
|
* calls. Currently for offload operations, it is 64 bytes of mask for AES CTR,
|
|
@@ -2359,6 +2366,8 @@ int qce_manage_timeout(void *handle, int req_info)
|
|
|
if (qce_sps_pipe_reset(pce_dev, op))
|
|
|
pr_err("%s: pipe reset failed\n", __func__);
|
|
|
|
|
|
+ qce_enable_clock_gating(pce_dev);
|
|
|
+
|
|
|
if (_qce_unlock_other_pipes(pce_dev, req_info))
|
|
|
pr_err("%s: fail unlock other pipes\n", __func__);
|
|
|
|
|
@@ -5330,6 +5339,7 @@ static int _qce_resume(void *handle)
|
|
|
pr_err("Producer cb registration failed rc = %d\n",
|
|
|
rc);
|
|
|
}
|
|
|
+ qce_enable_clock_gating(pce_dev);
|
|
|
|
|
|
return rc;
|
|
|
}
|
|
@@ -6591,6 +6601,7 @@ void *qce_open(struct platform_device *pdev, int *rc)
|
|
|
pce_dev->dev_no = pcedev_no;
|
|
|
pcedev_no++;
|
|
|
pce_dev->owner = QCE_OWNER_NONE;
|
|
|
+ qce_enable_clock_gating(pce_dev);
|
|
|
mutex_unlock(&qce_iomap_mutex);
|
|
|
return pce_dev;
|
|
|
err:
|