From d321e284cb41b9e43b96abe6b2f20cd960e7302d Mon Sep 17 00:00:00 2001 From: Elliot Berman Date: Tue, 24 Sep 2019 15:17:45 -0700 Subject: [PATCH] coresight: tpdm: Migrate SCM calls Use upstream qcom_scm driver for SCM call to hw-enable check. Change-Id: I1278bf2af22540d6b9e7c6c42e60c969124ad133 Signed-off-by: Elliot Berman --- drivers/hwtracing/coresight/coresight-tpdm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c index e844c3895dd3..356da12ddf43 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.c +++ b/drivers/hwtracing/coresight/coresight-tpdm.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include "coresight-priv.h" @@ -4103,8 +4103,7 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id) struct coresight_desc desc = { 0 }; static int traceid = TPDM_TRACE_ID_START; uint32_t version; - struct scm_desc des = {0}; - u32 scm_ret = 0; + u32 dump_state = 0; desc.name = coresight_alloc_device_name(&tpdm_devs, dev); if (!desc.name) @@ -4115,10 +4114,8 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id) adev->dev.platform_data = pdata; if (of_property_read_bool(adev->dev.of_node, "qcom,hw-enable-check")) { - ret = scm_call2(SCM_SIP_FNID(SCM_SVC_UTIL, - HW_ENABLE_CHECK_VALUE), &des); - scm_ret = des.ret[0]; - if (scm_ret == 0) + ret = qcom_scm_get_sec_dump_state(&dump_state); + if (ret || !dump_state) return -ENXIO; }