msm: camera: utils: Migrate SCM calls
Migrate secure world calls to qcom scm driver. CRs-Fixed: 2564857 Change-Id: I8eb7498e4f80ff7ac1e22b7dcd364048e5338746 Signed-off-by: Elliot Berman <eberman@codeaurora.org> Signed-off-by: Karthik Jayakumar <kjayakum@codeaurora.org>
This commit is contained in:

committed by
Karthik Jayakumar

parent
50c8c09ead
commit
10891f6916
@@ -4,21 +4,17 @@
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <dt-bindings/msm/msm-camera.h>
|
||||
|
||||
#include "cam_compat.h"
|
||||
#include "cam_csiphy_core.h"
|
||||
#include "cam_csiphy_dev.h"
|
||||
#include "cam_csiphy_soc.h"
|
||||
#include "cam_common_util.h"
|
||||
#include "cam_packet_util.h"
|
||||
|
||||
#include <dt-bindings/msm/msm-camera.h>
|
||||
|
||||
#include <soc/qcom/scm.h>
|
||||
#include <cam_mem_mgr.h>
|
||||
#include <cam_cpas_api.h>
|
||||
|
||||
#define SCM_SVC_CAMERASS 0x18
|
||||
#define SECURE_SYSCALL_ID 0x6
|
||||
#define SECURE_SYSCALL_ID_2 0x7
|
||||
#include "cam_mem_mgr.h"
|
||||
#include "cam_cpas_api.h"
|
||||
|
||||
#define LANE_MASK_2PH 0x1F
|
||||
#define LANE_MASK_3PH 0x7
|
||||
@@ -26,29 +22,6 @@
|
||||
static int csiphy_dump;
|
||||
module_param(csiphy_dump, int, 0644);
|
||||
|
||||
static int cam_csiphy_notify_secure_mode(struct csiphy_device *csiphy_dev,
|
||||
bool protect, int32_t offset)
|
||||
{
|
||||
struct scm_desc desc = {0};
|
||||
|
||||
if (offset >= CSIPHY_MAX_INSTANCES) {
|
||||
CAM_ERR(CAM_CSIPHY, "Invalid CSIPHY offset");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
desc.arginfo = SCM_ARGS(2, SCM_VAL, SCM_VAL);
|
||||
desc.args[0] = protect;
|
||||
desc.args[1] = csiphy_dev->csiphy_cpas_cp_reg_mask[offset];
|
||||
|
||||
if (scm_call2(SCM_SIP_FNID(SCM_SVC_CAMERASS, SECURE_SYSCALL_ID_2),
|
||||
&desc)) {
|
||||
CAM_ERR(CAM_CSIPHY, "scm call to hypervisor failed");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t cam_csiphy_get_instance_offset(
|
||||
struct csiphy_device *csiphy_dev,
|
||||
int32_t dev_handle)
|
||||
|
Reference in New Issue
Block a user