Merge "platform: msm_shared: Enable crypto clocks only once"
diff --git a/platform/msm_shared/crypto5_eng.c b/platform/msm_shared/crypto5_eng.c
index 6f0cc8f..0861cc8 100644
--- a/platform/msm_shared/crypto5_eng.c
+++ b/platform/msm_shared/crypto5_eng.c
@@ -286,9 +286,6 @@
uint32_t config = CRYPTO_RESET_CONFIG
| (dev->bam.pipe[CRYPTO_READ_PIPE_INDEX].pipe_num >> 1) << PIPE_SET_SELECT_SHIFT;
- /* Configure CE clocks. */
- clock_config_ce(dev->instance);
-
/* Setup BAM */
if (crypto_bam_init(dev) != CRYPTO_ERR_NONE)
{
diff --git a/platform/msm_shared/crypto5_wrapper.c b/platform/msm_shared/crypto5_wrapper.c
index 0be227a..868eca0 100644
--- a/platform/msm_shared/crypto5_wrapper.c
+++ b/platform/msm_shared/crypto5_wrapper.c
@@ -28,6 +28,7 @@
#include <debug.h>
#include <crypto5_wrapper.h>
+#include <platform/clock.h>
/* This file is a wrapper to the crypto5_eng.c.
* This is required so that we maintian the backward compatibility
@@ -52,7 +53,8 @@
void ce_clock_init(void)
{
- /* Clock init is done during crypto_init. */
+ /* Configure CE clocks. */
+ clock_config_ce(dev.instance);
}
void crypto_eng_reset(void)