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 <xiaogang@codeaurora.org>
This commit is contained in:
parent
5c92255fcd
commit
118d936456
|
@ -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
|
||||
|
|
|
@ -25,11 +25,7 @@
|
|||
#include <linux/coresight.h>
|
||||
#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;
|
||||
|
|
Loading…
Reference in New Issue