Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1393669
| From | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 26/27] coresight: configuring ETF in FIFO mode when acting as link |
| Date | 2016-05-03 19:40 +0200 |
| Message-ID | <ruMsI-3Sd-63@gated-at.bofh.it> (permalink) |
| References | <ruMsG-3Sd-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When part of a path but not identified as a sink, the EFT has to
be configured as a link and placed in HW FIFO mode. As such when
enabling a path, call the right configuration function based on
the role the ETF if playing in this trace run.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
drivers/hwtracing/coresight/coresight.c | 32 ++++++++++++++++++++++++++++----
1 file changed, 28 insertions(+), 4 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c
index 0995df8f85bc..5443d03a1eec 100644
--- a/drivers/hwtracing/coresight/coresight.c
+++ b/drivers/hwtracing/coresight/coresight.c
@@ -265,15 +265,27 @@ static void coresight_disable_source(struct coresight_device *csdev)
void coresight_disable_path(struct list_head *path)
{
+ u32 type;
struct coresight_node *nd;
struct coresight_device *csdev, *parent, *child;
list_for_each_entry(nd, path, link) {
csdev = nd->csdev;
+ type = csdev->type;
- switch (csdev->type) {
+ /*
+ * ETF devices are tricky... They can be a link or a sink,
+ * depending on how they are configured. If an ETF has been
+ * "activated" it will be configured as a sink, otherwise
+ * go ahead with the link configuration.
+ */
+ if (type == CORESIGHT_DEV_TYPE_LINKSINK)
+ type = (csdev == coresight_get_sink(path)) ?
+ CORESIGHT_DEV_TYPE_SINK :
+ CORESIGHT_DEV_TYPE_LINK;
+
+ switch (type) {
case CORESIGHT_DEV_TYPE_SINK:
- case CORESIGHT_DEV_TYPE_LINKSINK:
coresight_disable_sink(csdev);
break;
case CORESIGHT_DEV_TYPE_SOURCE:
@@ -294,15 +306,27 @@ int coresight_enable_path(struct list_head *path, u32 mode)
{
int ret = 0;
+ u32 type;
struct coresight_node *nd;
struct coresight_device *csdev, *parent, *child;
list_for_each_entry_reverse(nd, path, link) {
csdev = nd->csdev;
+ type = csdev->type;
+
+ /*
+ * ETF devices are tricky... They can be a link or a sink,
+ * depending on how they are configured. If an ETF has been
+ * "activated" it will be configured as a sink, otherwise
+ * go ahead with the link configuration.
+ */
+ if (type == CORESIGHT_DEV_TYPE_LINKSINK)
+ type = (csdev == coresight_get_sink(path)) ?
+ CORESIGHT_DEV_TYPE_SINK :
+ CORESIGHT_DEV_TYPE_LINK;
- switch (csdev->type) {
+ switch (type) {
case CORESIGHT_DEV_TYPE_SINK:
- case CORESIGHT_DEV_TYPE_LINKSINK:
ret = coresight_enable_sink(csdev, mode);
if (ret)
goto err;
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/27] coresight: next v4.6-rc6 Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:40 +0200
[PATCH 26/27] coresight: configuring ETF in FIFO mode when acting as link Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:40 +0200
[PATCH 14/27] coresight: tmc: introducing new header file Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:40 +0200
[PATCH 05/27] coresight: stm: Bindings for System Trace Macrocell Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:40 +0200
[PATCH 04/27] coresight: adding path for STM device Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:50 +0200
[PATCH 03/27] stm class: Support devices that override software assigned masters Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:50 +0200
[PATCH 07/27] coresight: etb10: fixing the right amount of words to read Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:50 +0200
[PATCH 06/27] coresight: stm: adding driver for CoreSight STM component Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:50 +0200
[PATCH 01/27] coresight: no need to do the forced type conversion Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-05-03 19:50 +0200
Re: [PATCH 01/27] coresight: no need to do the forced type conversion Greg KH <gregkh@linuxfoundation.org> - 2016-05-04 00:00 +0200
csiph-web