Эх сурвалжийг харах

msm: synx: ipclite: Switch to qcom_scm_assign_mem from hyp_assign_phys()

hyp_assign_phys is replaced by the upstream API qcom_scm_assign_mem,
as hyp_assign_phys is planned to be deprecated

Change-Id: I4371675b881735b92cc12d3f87c7d171acda5a97
Signed-off-by: Chelliah Vinu R <[email protected]>
Chelliah Vinu R 2 жил өмнө
parent
commit
5ea1e02ada
1 өөрчлөгдсөн 13 нэмэгдсэн , 12 устгасан
  1. 13 12
      msm/synx/ipclite.c

+ 13 - 12
msm/synx/ipclite.c

@@ -17,16 +17,13 @@
 #include <linux/sizes.h>
 
 #include <linux/hwspinlock.h>
-#include <soc/qcom/secure_buffer.h>
+#include <linux/qcom_scm.h>
 
 #include <linux/sysfs.h>
 
 #include "ipclite_client.h"
 #include "ipclite.h"
 
-#define VMID_HLOS       3
-#define VMID_SSC_Q6     5
-#define VMID_ADSP_Q6    6
 #define VMID_CDSP       30
 #define GLOBAL_ATOMICS_ENABLED	1
 #define GLOBAL_ATOMICS_DISABLED	0
@@ -1005,14 +1002,18 @@ static void ipcmem_init(struct ipclite_mem *ipcmem)
 static int set_ipcmem_access_control(struct ipclite_info *ipclite)
 {
 	int ret = 0;
-	int srcVM[1] = {VMID_HLOS};
-	int destVM[2] = {VMID_HLOS, VMID_CDSP};
-	int destVMperm[2] = {PERM_READ | PERM_WRITE,
-				PERM_READ | PERM_WRITE};
-
-	ret = hyp_assign_phys(ipclite->ipcmem.mem.aux_base,
-				ipclite->ipcmem.mem.size, srcVM, 1,
-				destVM, destVMperm, 2);
+	u64 srcVM = BIT(QCOM_SCM_VMID_HLOS);
+	struct qcom_scm_vmperm destVM[2];
+
+	destVM[0].vmid = QCOM_SCM_VMID_HLOS;
+	destVM[0].perm = QCOM_SCM_PERM_RW;
+
+	destVM[1].vmid = VMID_CDSP;
+	destVM[1].perm = QCOM_SCM_PERM_RW;
+
+	ret = qcom_scm_assign_mem(ipclite->ipcmem.mem.aux_base,
+				ipclite->ipcmem.mem.size, &srcVM,
+				destVM, ARRAY_SIZE(destVM));
 	return ret;
 }