coresight: tmc: cleaning up header file
authorMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 3 May 2016 17:33:49 +0000 (11:33 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 May 2016 21:59:30 +0000 (14:59 -0700)
This patch first move the TMC_STS_TMCREADY_BIT and
TMC_FFCR_FLUSHMAN_BIT defines to their respective section.
It also removes TMC_FFCR_FLUSHMAN, since the same result
can easily be obtained using the BIT() macro.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-tmc.c
drivers/hwtracing/coresight/coresight-tmc.h

index f9a6624ab5315b6d3359418c0723c62a8329ce12..07e2809d832be50b853b8d4a45136b22e4e09553 100644 (file)
@@ -50,7 +50,7 @@ static void tmc_flush_and_stop(struct tmc_drvdata *drvdata)
        ffcr = readl_relaxed(drvdata->base + TMC_FFCR);
        ffcr |= TMC_FFCR_STOP_ON_FLUSH;
        writel_relaxed(ffcr, drvdata->base + TMC_FFCR);
-       ffcr |= TMC_FFCR_FLUSHMAN;
+       ffcr |= BIT(TMC_FFCR_FLUSHMAN_BIT);
        writel_relaxed(ffcr, drvdata->base + TMC_FFCR);
        /* Ensure flush completes */
        if (coresight_timeout(drvdata->base,
index 49718b4a9788bd8527a2247af95f2f9b22787a7d..5a60830c8db5144b713760601fe49017ab295a7c 100644 (file)
@@ -49,6 +49,7 @@
 /* TMC_CTL - 0x020 */
 #define TMC_CTL_CAPT_EN                BIT(0)
 /* TMC_STS - 0x00C */
+#define TMC_STS_TMCREADY_BIT   2
 #define TMC_STS_TRIGGERED      BIT(1)
 /* TMC_AXICTL - 0x110 */
 #define TMC_AXICTL_PROT_CTL_B0 BIT(0)
 #define TMC_AXICTL_SCT_GAT_MODE        BIT(7)
 #define TMC_AXICTL_WR_BURST_16 0xF00
 /* TMC_FFCR - 0x304 */
+#define TMC_FFCR_FLUSHMAN_BIT  6
 #define TMC_FFCR_EN_FMT                BIT(0)
 #define TMC_FFCR_EN_TI         BIT(1)
 #define TMC_FFCR_FON_FLIN      BIT(4)
 #define TMC_FFCR_FON_TRIG_EVT  BIT(5)
-#define TMC_FFCR_FLUSHMAN      BIT(6)
 #define TMC_FFCR_TRIGON_TRIGIN BIT(8)
 #define TMC_FFCR_STOP_ON_FLUSH BIT(12)
 
-#define TMC_STS_TMCREADY_BIT   2
-#define TMC_FFCR_FLUSHMAN_BIT  6
 
 enum tmc_config_type {
        TMC_CONFIG_TYPE_ETB,