From 118d9364563a4b60269750ec0ab928362942d94f Mon Sep 17 00:00:00 2001 From: Xiaogang Cui Date: Thu, 7 May 2015 15:03:17 +0800 Subject: [PATCH] coresight: make boot_enable support individual remote etm enablement Currently boot_enable supports enabling all remote ETM devices or none. Make it granular to support individual remote ETM device enablement thereby providing more control and flexibility. Change-Id: Ie8526591f617456fcfa03178a24510a9cbd73cba Signed-off-by: Xiaogang Cui --- drivers/coresight/Kconfig | 9 --------- drivers/coresight/coresight-remote-etm.c | 8 +++----- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/coresight/Kconfig b/drivers/coresight/Kconfig index 4880ce00856f..39983cadac40 100644 --- a/drivers/coresight/Kconfig +++ b/drivers/coresight/Kconfig @@ -241,15 +241,6 @@ config CORESIGHT_REMOTE_ETM tracing on remote processor via sysfs by configuring the required CoreSight components. -config CORESIGHT_REMOTE_ETM_DEFAULT_ENABLE - bool "Turn on remote processor ETM tracing by default" - help - Turns on CoreSight remote processor ETM tracing by default. Otherwise, - tracing is disabled by default but can be enabled via sysfs. - - If unsure, say 'N' here to avoid potential power and performance - penalty. - endif config CORESIGHT_QPDI diff --git a/drivers/coresight/coresight-remote-etm.c b/drivers/coresight/coresight-remote-etm.c index 21d3652279e1..b11491ca2b7c 100644 --- a/drivers/coresight/coresight-remote-etm.c +++ b/drivers/coresight/coresight-remote-etm.c @@ -25,11 +25,7 @@ #include #include "coresight-qmi.h" -#ifdef CONFIG_CORESIGHT_REMOTE_ETM_DEFAULT_ENABLE -static int boot_enable = 1; -#else static int boot_enable; -#endif module_param_named( boot_enable, boot_enable, int, S_IRUGO ); @@ -310,7 +306,9 @@ static int remote_etm_probe(struct platform_device *pdev) } dev_info(dev, "Remote ETM initialized\n"); - if (boot_enable) + if (drvdata->inst_id >= sizeof(int)*BITS_PER_BYTE) + dev_err(dev, "inst_id greater than boot_enable bit mask\n"); + else if (boot_enable & BIT(drvdata->inst_id)) coresight_enable(drvdata->csdev); return 0;