platform: msm8962: Add support for CE
8962 uses CE instanace 1, update the platform & target
code to use this instance.
Change-Id: I2177d1775481bde646031faef89c92855a8d3865
diff --git a/target/msm8974/init.c b/target/msm8974/init.c
index 866803b..5c8bfef 100644
--- a/target/msm8974/init.c
+++ b/target/msm8974/init.c
@@ -66,7 +66,8 @@
#define WDOG_DEBUG_DISABLE_BIT 17
-#define CE_INSTANCE 2
+#define CE1_INSTANCE 1
+#define CE2_INSTANCE 2
#define CE_EE 1
#define CE_FIFO_SIZE 64
#define CE_READ_PIPE 3
@@ -159,9 +160,18 @@
struct crypto_init_params ce_params;
/* Set up base addresses and instance. */
- ce_params.crypto_instance = CE_INSTANCE;
- ce_params.crypto_base = MSM_CE2_BASE;
- ce_params.bam_base = MSM_CE2_BAM_BASE;
+ if (platform_is_8x62())
+ {
+ ce_params.crypto_instance = CE1_INSTANCE;
+ ce_params.crypto_base = MSM_CE1_BASE;
+ ce_params.bam_base = MSM_CE1_BAM_BASE;
+ }
+ else
+ {
+ ce_params.crypto_instance = CE2_INSTANCE;
+ ce_params.crypto_base = MSM_CE2_BASE;
+ ce_params.bam_base = MSM_CE2_BAM_BASE;
+ }
/* Set up BAM config. */
ce_params.bam_ee = CE_EE;