linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mike.leach@linaro.org (Mike Leach)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v2 3/3] amba: coresight: Driver test for new CoreSight UCI matching
Date: Wed, 28 Nov 2018 10:14:23 +0000	[thread overview]
Message-ID: <20181128101423.15961-4-mike.leach@linaro.org> (raw)
In-Reply-To: <20181128101423.15961-1-mike.leach@linaro.org>

This patch adds in logging and modifications to amba driver, etmv4 driver
and DB410C device tree to allow testing of the new UCI component matching
algorithm used for certain class of components on an AMBA bus.

Test only - not intended for upstream.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi         |  9 +++++++++
 drivers/amba/bus.c                            | 13 ++++++++++++-
 drivers/hwtracing/coresight/coresight-etm4x.c |  3 ++-
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index d302d8d639a1..c8b503a63b2c 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1368,6 +1368,15 @@
 			};
 		};
 
+		/* add an as yet unsupported CTI for UCI test - CPU-0 */
+		cti at 858000 {
+			compatible = "arm,coresight-cti", "arm,primecell";
+			reg = <0x858000 0x1000>;
+
+			clocks = <&rpmcc RPM_QDSS_CLK>;
+			clock-names = "apb_pclk";
+		};
+
 		venus: video-codec at 1d00000 {
 			compatible = "qcom,msm8916-venus";
 			reg = <0x01d00000 0xff000>;
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 387ee8f7720b..ccc2bb4a98b8 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -32,19 +32,30 @@ amba_cs_uci_id_match(const struct amba_id *table, struct amba_device *dev)
 {
 	int ret = 0;
 	struct amba_cs_uci_id *uci;
+	struct device *adev; /* device for test logging */
 
 	uci = table->data;
+	adev = &dev->dev;
 
 	/* no table data - return match on periphid */
-	if (!uci)
+	if (!uci) {
+		dev_info(adev, "uci_match: no UCI, use periphID\n");
 		return 1;
+	}
 
 	if (uci->devarch) {
 		ret = (dev->uci.devtype == uci->devtype) &&
 		       ((dev->uci.devarch & uci->devarch_mask) == uci->devarch);
+		dev_info(adev, "device: devtype[%x]; devarch[%x];\n",
+			 dev->uci.devtype, dev->uci.devarch);
+		dev_info(adev, "uci_match: devtype[%x]; devarch[%x]; (%s)\n",
+			 uci->devtype, uci->devarch,
+			 ret ? "match" : "no match");
 	} else {
 		/* devtype only if devarch set to 0 */
 		ret = dev->uci.devtype == uci->devtype;
+		dev_info(adev, "uci_match: devtype-only[%x]; (%s)\n",
+			 uci->devtype, ret ? "match" : "no match");
 	}
 	return ret;
 }
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index 2fb8054e43ab..4dfc41c37447 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -1090,11 +1090,12 @@ static struct amba_cs_uci_id uci_id_etm4[] = {
 	}
 
 static const struct amba_id etm4_ids[] = {
-	ETM4x_AMBA_ID(0x000bb95d),		/* Cortex-A53 */
+	ETM4x_AMBA_UCI_ID(0x000bb95d),	/* C-A53 - UCI optional for test */
 	ETM4x_AMBA_ID(0x000bb95e),		/* Cortex-A57 */
 	ETM4x_AMBA_ID(0x000bb95a),		/* Cortex-A72 */
 	ETM4x_AMBA_ID(0x000bb959),		/* Cortex-A73 */
 	ETM4x_AMBA_UCI_ID(0x000bb9da),		/* Cortex-A35 */
+	ETM4x_AMBA_UCI_ID(0x000bb9a8),	/* CTI PID A53 - test fail UCI match */
 	{},
 };
 
-- 
2.19.1

      parent reply	other threads:[~2018-11-28 10:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 10:14 [RFC PATCH v2 0/3] Update AMBA driver for enhanced component ID spec Mike Leach
2018-11-28 10:14 ` [RFC PATCH v2 1/3] drivers: amba: Updates to component identification for driver matching Mike Leach
2018-11-28 10:44   ` Suzuki K Poulose
2018-11-28 10:55     ` Suzuki K Poulose
2018-11-28 15:01       ` Mike Leach
2018-11-28 14:54     ` Mike Leach
2018-11-28 15:58       ` Mike Leach
2018-11-28 10:14 ` [RFC PATCH v2 2/3] coresight: etmv4: Update ID register table to add UCI support Mike Leach
2018-11-28 10:14 ` Mike Leach [this message]

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=20181128101423.15961-4-mike.leach@linaro.org \
    --to=mike.leach@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).