Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1470426
| Path | csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Mathieu Poirier <mathieu.poirier@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 18/28] coresight: etm4x: request to retain power to the trace unit when active |
| Date | Thu, 25 Aug 2016 23:30:01 +0200 |
| Message-ID | <saanL-6sR-5@gated-at.bofh.it> (permalink) |
| References | <saanL-6sR-7@gated-at.bofh.it> |
| X-Original-To | gregkh@linuxfoundation.org |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FdIeCCF69q193Tg76BWf8mKRejKVLyxBh8mG7jDQndA=; b=B/DaTmk3tIW47RigPKiJGkoF6S8w/fByi6RF9iDwqWC/qpl7W9RquoO844Do32/uyW SIH0bIdEpjz5t9rg5/vznfjjN0+NbYCRwq4ak3rc//QU1XCBKJv050yu2nHPniJucCog FLvxcSNlcKNkLU61z9hoiugsaW582z+dH2eT0= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FdIeCCF69q193Tg76BWf8mKRejKVLyxBh8mG7jDQndA=; b=Zn47jzSKILo+rGwQqC7sbXz1E2DIkP0v41f3KhVkxRmCL/rRHOlHHAye8/W07hd4Pu I8tOKbFWXdPYwCoI9+k+M0v5b3tJjLnpCvz3MTE/jRVLHQsuR2Eis3Vb87XTybY5vAtB wn+yQwTmm0dQji46X4Px/jCi37uRauBBYTeLVNARwLycFt4SbUqsgi98FO9p/ElNgiuy kQ1x80IekEqpbOZ5lNHcGSaitynXJlae2DvO4nJs38X2d3C+dJnkDC+mzYgj14CWFJjp /k2Wk3fMrCiKejoti3ttqMDkYvbCsE2y56mRB37An1xxeDlW3wONd16avpBWRCcyqA4c eK7Q== |
| X-Gm-Message-State | AEkoouuSGFd3eHXNzgiZw6AhdNlawM3CDMmrtodPd54B/CFdzfbiqGNKCVJhLX2z9GMrlLrU |
| X-Received | by 10.36.233.196 with SMTP id f187mr7776548ith.19.1472159993941; Thu, 25 Aug 2016 14:19:53 -0700 (PDT) |
| X-Mailer | git-send-email 2.7.4 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 77 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Thu, 25 Aug 2016 15:19:08 -0600 |
| X-Original-Message-ID | <1472159958-5981-19-git-send-email-mathieu.poirier@linaro.org> |
| X-Original-References | <1472159958-5981-1-git-send-email-mathieu.poirier@linaro.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1470426 |
Show key headers only | View raw
From: Sudeep Holla <sudeep.holla@arm.com> The Coresight ETMv4 architecture provides a way to request to keep the power to the trace unit. This might help to collect the traces without the need to disable the CPU power management(entering/exiting deeper idle states). Trace PowerDown Control Register provides powerup request bit which when set requests the system to retain power to the trace unit and emulate the powerdown request. Typically, a trace unit drives a signal to the power controller to request that the trace unit core power domain is powered up. However, if the trace unit and the CPU are in the same power domain then the implementation might combine the trace unit power up status with a signal from the CPU. This patch requests to retain power to the trace unit when active and to remove when inactive. Note this change will only request but the behaviour depends on the implementation. However, it matches the exact behaviour expected when the external debugger is connected with respect to CPU power states. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> --- drivers/hwtracing/coresight/coresight-etm4x.c | 12 ++++++++++++ drivers/hwtracing/coresight/coresight-etm4x.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index b3bde2aec2b9..c8c7829f7046 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -164,6 +164,13 @@ static void etm4_enable_hw(void *info) writel_relaxed(config->vmid_mask0, drvdata->base + TRCVMIDCCTLR0); writel_relaxed(config->vmid_mask1, drvdata->base + TRCVMIDCCTLR1); + /* + * Request to keep the trace unit powered and also + * emulation of powerdown + */ + writel_relaxed(readl_relaxed(drvdata->base + TRCPDCR) | TRCPDCR_PU, + drvdata->base + TRCPDCR); + /* Enable the trace unit */ writel_relaxed(1, drvdata->base + TRCPRGCTLR); @@ -294,6 +301,11 @@ static void etm4_disable_hw(void *info) CS_UNLOCK(drvdata->base); + /* power can be removed from the trace unit now */ + control = readl_relaxed(drvdata->base + TRCPDCR); + control &= ~TRCPDCR_PU; + writel_relaxed(control, drvdata->base + TRCPDCR); + control = readl_relaxed(drvdata->base + TRCPRGCTLR); /* EN, bit[0] Trace unit enable bit */ diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index 5359c5197c1d..2629954429a1 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -183,6 +183,9 @@ #define TRCSTATR_IDLE_BIT 0 #define ETM_DEFAULT_ADDR_COMP 0 +/* PowerDown Control Register bits */ +#define TRCPDCR_PU BIT(3) + /* secure state access levels */ #define ETM_EXLEVEL_S_APP BIT(8) #define ETM_EXLEVEL_S_OS BIT(9) -- 2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 18/28] coresight: etm4x: request to retain power to the trace unit when active Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-08-25 23:30 +0200
csiph-web