Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c165c228 authored by Prasad Sodagudi's avatar Prasad Sodagudi
Browse files

soc: qcom: Remove couple of exported functions



Client driver should be able to call scm_call2
and need of exporting APIs for individual calls.
So remove following scm_restore_sec_cfg and
scm_get_feat_version APIs.

Change-Id: I3025319115cd950f584c34191b844434ee44b36f
Signed-off-by: default avatarPrasad Sodagudi <psodagud@codeaurora.org>
parent 77d5d77e
Loading
Loading
Loading
Loading
+0 −43
Original line number Diff line number Diff line
@@ -558,49 +558,6 @@ int scm_is_call_available(u32 svc_id, u32 cmd_id)
}
EXPORT_SYMBOL(scm_is_call_available);

#define GET_FEAT_VERSION_CMD	3
int scm_get_feat_version(u32 feat)
{
	struct scm_desc desc = {0};
	int ret;

	ret = scm_is_call_available(SCM_SVC_INFO, GET_FEAT_VERSION_CMD);
	if (ret <= 0)
		return 0;

	desc.args[0] = feat;
	desc.arginfo = SCM_ARGS(1);
	ret = scm_call2(SCM_SIP_FNID(SCM_SVC_INFO, GET_FEAT_VERSION_CMD),
			&desc);
	if (!ret)
		return desc.ret[0];

	return 0;
}
EXPORT_SYMBOL(scm_get_feat_version);

#define RESTORE_SEC_CFG    2
int scm_restore_sec_cfg(u32 device_id, u32 spare, int *scm_ret)
{
	struct scm_desc desc = {0};
	int ret;

	if (IS_ERR_OR_NULL(scm_ret))
		return -EINVAL;

	desc.args[0] = device_id;
	desc.args[1] = spare;
	desc.arginfo = SCM_ARGS(2);

	ret = scm_call2(SCM_SIP_FNID(SCM_SVC_MP, RESTORE_SEC_CFG), &desc);
	if (ret)
		return ret;

	*scm_ret = desc.ret[0];
	return 0;
}
EXPORT_SYMBOL(scm_restore_sec_cfg);

/*
 * SCM call command ID to check secure mode
 * Return zero for secure device.
+0 −13
Original line number Diff line number Diff line
@@ -99,11 +99,8 @@ struct scm_desc {
#define SCM_VERSION(major, minor) (((major) << 16) | ((minor) & 0xFF))
extern int scm_call2(u32 cmd_id, struct scm_desc *desc);
extern int scm_call2_atomic(u32 cmd_id, struct scm_desc *desc);

extern u32 scm_get_version(void);
extern int scm_is_call_available(u32 svc_id, u32 cmd_id);
extern int scm_get_feat_version(u32 feat);
extern int scm_restore_sec_cfg(u32 device_id, u32 spare, int *scm_ret);
extern u32 scm_io_read(phys_addr_t address);
extern int scm_io_write(phys_addr_t address, u32 val);
extern bool scm_is_secure_device(void);
@@ -132,21 +129,11 @@ static inline int scm_is_call_available(u32 svc_id, u32 cmd_id)
	return 0;
}

static inline int scm_get_feat_version(u32 feat)
{
	return 0;
}

static inline bool is_scm_armv8(void)
{
	return true;
}

static inline int scm_restore_sec_cfg(u32 device_id, u32 spare, int *scm_ret)
{
	return 0;
}

static inline u32 scm_io_read(phys_addr_t address)
{
	return 0;