From: mathieu.poirier@linaro.org (Mathieu Poirier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 14/18] coresight tmc etr: Cleanup AXICTL register handling
Date: Mon, 17 Jul 2017 11:06:59 -0600 [thread overview]
Message-ID: <20170717170659.GA21523@xps15> (raw)
In-Reply-To: <1500037463-19951-15-git-send-email-suzuki.poulose@arm.com>
On Fri, Jul 14, 2017 at 02:04:19PM +0100, Suzuki K Poulose wrote:
> This patch cleans up how we setup the AXICTL register on
> TMC ETR. At the moment we don't set the CacheCtrl bits, which
> drives the arcache and awcache bits on AXI bus specifying the
> cacheablitiy. Set this to Write-back Read and Write-allocate.
>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
> drivers/hwtracing/coresight/coresight-tmc-etr.c | 10 +++-------
> drivers/hwtracing/coresight/coresight-tmc.h | 17 ++++++++++++++++-
> 2 files changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c
> index ff11b92..4aa5d36 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
> @@ -36,13 +36,9 @@ static void tmc_etr_enable_hw(struct tmc_drvdata *drvdata)
> writel_relaxed(TMC_MODE_CIRCULAR_BUFFER, drvdata->base + TMC_MODE);
>
> axictl = readl_relaxed(drvdata->base + TMC_AXICTL);
> - axictl |= TMC_AXICTL_WR_BURST_16;
> - writel_relaxed(axictl, drvdata->base + TMC_AXICTL);
> - axictl &= ~TMC_AXICTL_SCT_GAT_MODE;
> - writel_relaxed(axictl, drvdata->base + TMC_AXICTL);
> - axictl = (axictl &
> - ~(TMC_AXICTL_PROT_CTL_B0 | TMC_AXICTL_PROT_CTL_B1)) |
> - TMC_AXICTL_PROT_CTL_B1;
> + axictl &= ~TMC_AXICTL_CLEAR_MASK;
> + axictl |= (TMC_AXICTL_PROT_CTL_B1 | TMC_AXICTL_WR_BURST_16);
> + axictl |= TMC_AXICTL_AxCACHE_OS;
> writel_relaxed(axictl, drvdata->base + TMC_AXICTL);
> tmc_write_dba(drvdata, drvdata->paddr);
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc.h b/drivers/hwtracing/coresight/coresight-tmc.h
> index a0668f6..5d6d7e5 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc.h
> +++ b/drivers/hwtracing/coresight/coresight-tmc.h
> @@ -55,11 +55,26 @@
> #define TMC_STS_TMCREADY_BIT 2
> #define TMC_STS_FULL BIT(0)
> #define TMC_STS_TRIGGERED BIT(1)
> -/* TMC_AXICTL - 0x110 */
> +/*
> + * TMC_AXICTL - 0x110
> + *
> + * TMC AXICTL format for SoC-400
> + * Bits [0-1] : ProtCtrlBit0-1
> + * Bits [2-5] : CacheCtrlBits 0-3 (AxCACHE)
> + * Bit 6 : Reserved
> + * Bit 7 : ScatterGatherMode
> + * Bits [8-11] : WrBurstLen
> + * Bits [12-31] : Reserved.
> + */
> +#define TMC_AXICTL_CLEAR_MASK 0xfbf
> +
> #define TMC_AXICTL_PROT_CTL_B0 BIT(0)
> #define TMC_AXICTL_PROT_CTL_B1 BIT(1)
> #define TMC_AXICTL_SCT_GAT_MODE BIT(7)
> #define TMC_AXICTL_WR_BURST_16 0xF00
> +/* Write-back Read and Write-allocate */
> +#define TMC_AXICTL_AxCACHE_OS (0xf << 2)
Please use a capital 'x' here.
Also this patch is giving me a few checkpatch.pl warnings.
> +
> /* TMC_FFCR - 0x304 */
> #define TMC_FFCR_FLUSHMAN_BIT 6
> #define TMC_FFCR_EN_FMT BIT(0)
> --
> 2.7.5
>
next prev parent reply other threads:[~2017-07-17 17:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 13:04 [PATCH v3 00/16] coresight: Support for ARM Coresight SoC-600 Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 01/18] coresight replicator: Cleanup programmable replicator naming Suzuki K Poulose
2017-07-17 17:45 ` Mathieu Poirier
2017-07-18 9:11 ` Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 02/18] arm64: juno: dts: Use the new coresight replicator string Suzuki K Poulose
2017-07-17 16:01 ` Mathieu Poirier
2017-07-14 13:04 ` [PATCH v3 03/18] arm: qcom-msm8974: dts: Update coresight replicator Suzuki K Poulose
2017-07-17 16:02 ` Mathieu Poirier
2017-07-14 13:04 ` [PATCH v3 04/18] arm64: qcom-msm8916: " Suzuki K Poulose
2017-07-17 16:03 ` Mathieu Poirier
2017-07-14 13:04 ` [PATCH v3 05/18] coresight: Extend the PIDR mask to cover relevant bits in PIDR2 Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 06/18] coresight: Add support for reading 64bit registers Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 07/18] coresight tmc: Add helpers for accessing " Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 08/18] coresight tmc: Expose DBA and AXICTL Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 09/18] coresight replicator: Expose replicator management registers Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 10/18] coresight tmc: Handle configuration types properly Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 11/18] coresight tmc etr: Add capabilitiy information Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 12/18] coresight tmc: Detect support for scatter gather Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 13/18] coresight tmc etr: Detect address width at runtime Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 14/18] coresight tmc etr: Cleanup AXICTL register handling Suzuki K Poulose
2017-07-17 17:06 ` Mathieu Poirier [this message]
2017-07-18 9:07 ` Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 15/18] coresigh tmc etr: Setup AXI cache encoding for read transfers Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 16/18] coresight tmc: Support for save-restore in ETR Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 17/18] coresight tmc: Add support for Coresight SoC 600 TMC Suzuki K Poulose
2017-07-14 13:04 ` [PATCH v3 18/18] coresight: Add support for Coresight SoC 600 components Suzuki K Poulose
2017-07-17 17:48 ` [PATCH v3 00/16] coresight: Support for ARM Coresight SoC-600 Mathieu Poirier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170717170659.GA21523@xps15 \
--to=mathieu.poirier@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).