summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/coresight/coresight-tmc.h
diff options
context:
space:
mode:
authorSuzuki K Poulose <suzuki.poulose@arm.com>2019-08-29 23:28:31 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-03 23:01:16 +0300
commit8a4bc4f195044004520e38da7b8a52a76ccc9945 (patch)
treeaadd5ab4df9c571608199ba1f74fc1d2030b3256 /drivers/hwtracing/coresight/coresight-tmc.h
parentf52ff9b7d64953b9a1a03faaf797d23b5c1d10d0 (diff)
downloadlinux-8a4bc4f195044004520e38da7b8a52a76ccc9945.tar.xz
coresight: tmc-etr: Check if non-secure access is enabled
CoreSight TMC-ETR must have the non-secure invasive debug access enabled for use by self-hosted tracing. Without it, there is no point in enabling the ETR. So, let us check it in the TMC_AUTHSTATUS register and fail the probe if it is disabled. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-7-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-tmc.h')
-rw-r--r--drivers/hwtracing/coresight/coresight-tmc.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tmc.h b/drivers/hwtracing/coresight/coresight-tmc.h
index 95d2e2747970..4c59f2a4ad0e 100644
--- a/drivers/hwtracing/coresight/coresight-tmc.h
+++ b/drivers/hwtracing/coresight/coresight-tmc.h
@@ -39,6 +39,7 @@
#define TMC_ITATBCTR2 0xef0
#define TMC_ITATBCTR1 0xef4
#define TMC_ITATBCTR0 0xef8
+#define TMC_AUTHSTATUS 0xfb8
/* register description */
/* TMC_CTL - 0x020 */
@@ -90,6 +91,8 @@
#define TMC_DEVID_AXIAW_SHIFT 17
#define TMC_DEVID_AXIAW_MASK 0x7f
+#define TMC_AUTH_NSID_MASK GENMASK(1, 0)
+
enum tmc_config_type {
TMC_CONFIG_TYPE_ETB,
TMC_CONFIG_TYPE_ETR,