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

Commit 05de21ec authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add qcom,hw-enable-check in tpdm dcc for QCS405"

parents efb51708 454c7e3a
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -157,6 +157,9 @@ its hardware characteristcs.


	* qcom,tpdm-regs: List of regulators required.
	* qcom,tpdm-regs: List of regulators required.


	* qcom,hw-enable-check: Check if the tpdm need to be probed as some tpdms
	  are not enabled in secure device.

* Required property for Remote ETMs:
* Required property for Remote ETMs:


	* qcom,inst-id: must be present. QMI instance id for remote ETMs.
	* qcom,inst-id: must be present. QMI instance id for remote ETMs.
+1 −0
Original line number Original line Diff line number Diff line
@@ -542,6 +542,7 @@
			 <&clock_rpmcc RPM_QDSS_A_CLK>;
			 <&clock_rpmcc RPM_QDSS_A_CLK>;
		clock-names = "apb_pclk", "core_a_clk";
		clock-names = "apb_pclk", "core_a_clk";


		qcom,hw-enable-check;
		qcom,msr-fix-req;
		qcom,msr-fix-req;


		port {
		port {
+13 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/of.h>
#include <linux/of.h>
#include <linux/coresight.h>
#include <linux/coresight.h>
#include <linux/regulator/consumer.h>
#include <linux/regulator/consumer.h>
#include <soc/qcom/scm.h>


#include "coresight-priv.h"
#include "coresight-priv.h"


@@ -138,6 +139,8 @@ do { \
#define TPDM_REVISION_A		0
#define TPDM_REVISION_A		0
#define TPDM_REVISION_B		1
#define TPDM_REVISION_B		1


#define HW_ENABLE_CHECK_VALUE   0x10

enum tpdm_dataset {
enum tpdm_dataset {
	TPDM_DS_IMPLDEF,
	TPDM_DS_IMPLDEF,
	TPDM_DS_DSB,
	TPDM_DS_DSB,
@@ -4352,12 +4355,22 @@ static int tpdm_probe(struct amba_device *adev, const struct amba_id *id)
	static int traceid = TPDM_TRACE_ID_START;
	static int traceid = TPDM_TRACE_ID_START;
	uint32_t version;
	uint32_t version;
	const char *tclk_name, *treg_name;
	const char *tclk_name, *treg_name;
	struct scm_desc des = {0};
	u32 scm_ret = 0;


	pdata = of_get_coresight_platform_data(dev, adev->dev.of_node);
	pdata = of_get_coresight_platform_data(dev, adev->dev.of_node);
	if (IS_ERR(pdata))
	if (IS_ERR(pdata))
		return PTR_ERR(pdata);
		return PTR_ERR(pdata);
	adev->dev.platform_data = pdata;
	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)
			return -ENXIO;
	}

	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
	if (!drvdata)
	if (!drvdata)
		return -ENOMEM;
		return -ENOMEM;