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

Commit b6345ceb authored by Shaoqing Liu's avatar Shaoqing Liu
Browse files

soc: qcom: initialize desc parameter before call scm_call2



Initialize desc parameter before calling scm_call2 function
to avoid scm_call2 fail.

Change-Id: I459d13a661ad6f6f61377eb672f95e84c9725457
Signed-off-by: default avatarShaoqing Liu <shaoqingliu@codeaurora.org>
parent 85e2fd95
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -178,6 +178,7 @@

#define MAX_ETM_STATE_SIZE	(165)

#define TZ_DBG_ETM_FEAT_ID	(0x8)
#define TZ_DBG_ETM_VER		(0x400000)
#define HW_SOC_ID_M8953		(293)
#define GET_FEAT_VERSION_CMD	3
@@ -1537,6 +1538,8 @@ static int jtag_mm_etm_online(unsigned int cpu)
		return 0;
	}
	if (etm_arch_supported(etm[cpu]->arch)) {
		desc.args[0] = TZ_DBG_ETM_FEAT_ID;
		desc.arginfo = SCM_ARGS(1);
		ret = scm_call2(SCM_SIP_FNID(SCM_SVC_INFO,
				GET_FEAT_VERSION_CMD), &desc);
		if (!ret) {
@@ -1631,6 +1634,8 @@ static int jtag_mm_etm_probe(struct platform_device *pdev, uint32_t cpu)
	mutex_lock(&etmdata->mutex);
	if (etmdata->init && !etmdata->enable) {
		if (etm_arch_supported(etmdata->arch)) {
			desc.args[0] = TZ_DBG_ETM_FEAT_ID;
			desc.arginfo = SCM_ARGS(1);
			ret = scm_call2(SCM_SIP_FNID(SCM_SVC_INFO,
					GET_FEAT_VERSION_CMD), &desc);
			if (!ret) {
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -52,6 +52,7 @@

#define OSLOCK_MAGIC		(0xC5ACCE55)
#define GET_FEAT_VERSION_CMD	3
#define TZ_DBG_ETM_FEAT_ID	(0x8)
#define TZ_DBG_ETM_VER		(0x400000)

static uint32_t msm_jtag_save_cntr[NR_CPUS];
@@ -965,6 +966,8 @@ static int __init msm_jtag_dbg_init(void)
	dbg_init_arch_data();

	if (dbg_arch_supported(dbg.arch)) {
		desc.args[0] = TZ_DBG_ETM_FEAT_ID;
		desc.arginfo = SCM_ARGS(1);
		ret = scm_call2(SCM_SIP_FNID(SCM_SVC_INFO,
				GET_FEAT_VERSION_CMD), &desc);
		if (!ret) {