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

Commit b2f38092 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Update platform file to support 8916 LA 2.0"

parents 6be32da5 576cd8b4
Loading
Loading
Loading
Loading
+18 −7
Original line number Diff line number Diff line
@@ -32,11 +32,8 @@
/*--------------- Implementation -------------- */
#include <soc/qcom/scm.h>

/* from following file */
#define SCM_SVC_MOBICORE		250
#define SCM_CMD_MOBICORE		1

#ifdef CONFIG_ARM64
#if defined(CONFIG_ARCH_APQ8084) || defined(CONFIG_ARCH_MSM8916) || defined(CONFIG_ARCH_MSM8994)
//#ifdef CONFIG_ARM64

	#include <soc/qcom/qseecomi.h>
	#include <linux/slab.h>
@@ -52,14 +49,22 @@
			TZ_SYSCALL_PARAM_TYPE_BUF_RW, TZ_SYSCALL_PARAM_TYPE_VAL, \
			TZ_SYSCALL_PARAM_TYPE_BUF_RW, TZ_SYSCALL_PARAM_TYPE_VAL)

//#endif
#endif

/* from following file */
#define SCM_SVC_MOBICORE		250
#define SCM_CMD_MOBICORE		1


extern int scm_call(u32 svc_id, u32 cmd_id, const void *cmd_buf, size_t cmd_len,
		    void *resp_buf, size_t resp_len);

static inline int smc_fastcall(void *fc_generic, size_t size)
{
#ifdef CONFIG_ARM64
#if defined(CONFIG_ARCH_APQ8084) || defined(CONFIG_ARCH_MSM8916) || defined(CONFIG_ARCH_MSM8994)
    if (is_scm_armv8())
    {
	struct scm_desc desc = {0};
	int ret;
	void* scm_buf = NULL;
@@ -82,10 +87,16 @@ static inline int smc_fastcall(void *fc_generic, size_t size)
	memcpy(fc_generic, scm_buf, size);
	kfree(scm_buf);
	return ret;
#else
    }
    else
    {
#endif

	return scm_call(SCM_SVC_MOBICORE, SCM_CMD_MOBICORE,
			fc_generic, size,
			fc_generic, size);
#if defined(CONFIG_ARCH_APQ8084) || defined(CONFIG_ARCH_MSM8916) || defined(CONFIG_ARCH_MSM8994)
    }
#endif
}