linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
To: Rob Herring <robh+dt@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Vivek Gautam <vivek.gautam@codeaurora.org>,
	Jeffrey Hugo <jhugo@codeaurora.org>,
	Doug Anderson <dianders@chromium.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	devicetree@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
	Marc Gonzalez <marc.w.gonzalez@free.fr>
Cc: Rajendra Nayak <rnayak@codeaurora.org>,
	Sibi Sankar <sibis@codeaurora.org>,
	Tingwei Zhang <tingwei@codeaurora.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Subject: [PATCHv5 6/7] coresight: debug: Add Unique Component Identifier (UCI) table
Date: Tue, 29 Jan 2019 00:44:03 +0530	[thread overview]
Message-ID: <1019e6fed1ade6a580f01df9b3f70c2a9df5b3be.1548419933.git.saiprakash.ranjan@codeaurora.org> (raw)
In-Reply-To: <cover.1548419933.git.saiprakash.ranjan@codeaurora.org>

Add UCI table and a helper macro for coresight CPU debug
module. This patch adds the UCI entries for Krypo CPUs
found on MSM8996 which shares the same PIDs as ETMs.

Without this, below error is observed on MSM8996:

[    5.429867] OF: graph: no port node found in /soc/debug@3810000
[    5.429938] coresight-etm4x: probe of 3810000.debug failed with error -22
[    5.435415] coresight-cpu-debug 3810000.debug: Coresight debug-CPU0 initialized
[    5.446474] OF: graph: no port node found in /soc/debug@3910000
[    5.448927] coresight-etm4x: probe of 3910000.debug failed with error -22
[    5.454681] coresight-cpu-debug 3910000.debug: Coresight debug-CPU1 initialized
[    5.487765] OF: graph: no port node found in /soc/debug@3a10000
[    5.488007] coresight-etm4x: probe of 3a10000.debug failed with error -22
[    5.493024] coresight-cpu-debug 3a10000.debug: Coresight debug-CPU2 initialized
[    5.501802] OF: graph: no port node found in /soc/debug@3b10000
[    5.512901] coresight-etm4x: probe of 3b10000.debug failed with error -22
[    5.513192] coresight-cpu-debug 3b10000.debug: Coresight debug-CPU3 initialized

Also add a helper macro to make adding CPU PIDs easier
similar to ETM4X driver.

Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>

---
This patch depends on UCI support by Mike Leach in below link:
 https://lore.kernel.org/lkml/20190121233151.13363-2-mike.leach@linaro.org/
---
 .../hwtracing/coresight/coresight-cpu-debug.c | 41 +++++++++++++------
 1 file changed, 28 insertions(+), 13 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c
index 45b2460f3166..a126ed0b9a76 100644
--- a/drivers/hwtracing/coresight/coresight-cpu-debug.c
+++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c
@@ -655,20 +655,35 @@ static int debug_remove(struct amba_device *adev)
 	return 0;
 }
 
+#define DEBUG_AMBA_ID(pid)			\
+	{					\
+		.id	= pid,			\
+		.mask	= 0x000fffff,		\
+	}
+
+static struct amba_cs_uci_id uci_id_debug[] = {
+	{
+		/*  CPU Debug UCI data */
+		.devarch	= 0x47706a15,
+		.devarch_mask	= 0xfff0ffff,
+		.devtype	= 0x00000015,
+	}
+};
+
+#define DEBUG_AMBA_UCI_ID(pid)			\
+	{					\
+		.id	= pid,			\
+		.mask	= 0x000fffff,		\
+		.data	= uci_id_debug,		\
+	}
+
 static const struct amba_id debug_ids[] = {
-	{       /* Debug for Cortex-A53 */
-		.id	= 0x000bbd03,
-		.mask	= 0x000fffff,
-	},
-	{       /* Debug for Cortex-A57 */
-		.id	= 0x000bbd07,
-		.mask	= 0x000fffff,
-	},
-	{       /* Debug for Cortex-A72 */
-		.id	= 0x000bbd08,
-		.mask	= 0x000fffff,
-	},
-	{ 0, 0 },
+	DEBUG_AMBA_ID(0x000bbd03),		/* Cortex-A53 */
+	DEBUG_AMBA_ID(0x000bbd07),		/* Cortex-A57 */
+	DEBUG_AMBA_ID(0x000bbd08),		/* Cortex-A72 */
+	DEBUG_AMBA_UCI_ID(0x000f0205),		/* Qualcomm Kryo */
+	DEBUG_AMBA_UCI_ID(0x000f0211),		/* Qualcomm Kryo */
+	{},
 };
 
 static struct amba_driver debug_driver = {
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


  parent reply	other threads:[~2019-01-28 19:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-28 19:13 [PATCHv5 0/7] Add coresight support for SDM845, MSM8998 and MSM8996 Sai Prakash Ranjan
2019-01-28 19:13 ` [PATCHv5 1/7] arm64: dts: qcom: sdm845: Add Coresight support Sai Prakash Ranjan
2019-01-30 18:37   ` Mathieu Poirier
2019-01-31 13:16     ` Sai Prakash Ranjan
2019-01-28 19:13 ` [PATCHv5 2/7] arm64: dts: qcom: msm8998: " Sai Prakash Ranjan
2019-01-28 19:14 ` [PATCHv5 3/7] arm64: dts: qcom: msm8996: " Sai Prakash Ranjan
2019-01-28 19:14 ` [PATCHv5 4/7] coresight: etm4x: Add support to enable ETMv4.2 Sai Prakash Ranjan
2019-01-29  9:26   ` Suzuki K Poulose
2019-01-29 14:46     ` Sai Prakash Ranjan
2019-01-28 19:14 ` [PATCHv5 5/7] coresight: etm4x: Add ETM PIDs for SDM845 and MSM8996 Sai Prakash Ranjan
2019-01-29  9:28   ` Suzuki K Poulose
2019-01-28 19:14 ` Sai Prakash Ranjan [this message]
2019-01-29 13:25   ` [PATCHv5 6/7] coresight: debug: Add Unique Component Identifier (UCI) table Leo Yan
2019-01-29 13:36     ` Leo Yan
2019-01-29 14:54       ` Sai Prakash Ranjan
2019-01-29 14:48     ` Sai Prakash Ranjan
2019-01-28 19:14 ` [PATCHv5 7/7] arm64: dts: qcom: sdm845: Remove the duplicate header inclusion Sai Prakash Ranjan
2019-01-28 19:24   ` Doug Anderson
2019-01-29  4:35     ` saiprakash.ranjan
2019-01-29 10:28 ` [PATCHv5 0/7] Add coresight support for SDM845, MSM8998 and MSM8996 Marc Gonzalez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1019e6fed1ade6a580f01df9b3f70c2a9df5b3be.1548419933.git.saiprakash.ranjan@codeaurora.org \
    --to=saiprakash.ranjan@codeaurora.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=jhugo@codeaurora.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.w.gonzalez@free.fr \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=rnayak@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sibis@codeaurora.org \
    --cc=suzuki.poulose@arm.com \
    --cc=tingwei@codeaurora.org \
    --cc=vivek.gautam@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).