Skip to content

Commit 5364b7d

Browse files
coresight: tmc: cleaning up header file
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> (cherry picked from commit a8ab4268e0db93c564ee6ccb770bb3d53af24be9)
1 parent c3e22ca commit 5364b7d

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/hwtracing/coresight/coresight-tmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static void tmc_flush_and_stop(struct tmc_drvdata *drvdata)
5050
ffcr = readl_relaxed(drvdata->base + TMC_FFCR);
5151
ffcr |= TMC_FFCR_STOP_ON_FLUSH;
5252
writel_relaxed(ffcr, drvdata->base + TMC_FFCR);
53-
ffcr |= TMC_FFCR_FLUSHMAN;
53+
ffcr |= BIT(TMC_FFCR_FLUSHMAN_BIT);
5454
writel_relaxed(ffcr, drvdata->base + TMC_FFCR);
5555
/* Ensure flush completes */
5656
if (coresight_timeout(drvdata->base,

drivers/hwtracing/coresight/coresight-tmc.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,22 @@
4949
/* TMC_CTL - 0x020 */
5050
#define TMC_CTL_CAPT_EN BIT(0)
5151
/* TMC_STS - 0x00C */
52+
#define TMC_STS_TMCREADY_BIT 2
5253
#define TMC_STS_TRIGGERED BIT(1)
5354
/* TMC_AXICTL - 0x110 */
5455
#define TMC_AXICTL_PROT_CTL_B0 BIT(0)
5556
#define TMC_AXICTL_PROT_CTL_B1 BIT(1)
5657
#define TMC_AXICTL_SCT_GAT_MODE BIT(7)
5758
#define TMC_AXICTL_WR_BURST_16 0xF00
5859
/* TMC_FFCR - 0x304 */
60+
#define TMC_FFCR_FLUSHMAN_BIT 6
5961
#define TMC_FFCR_EN_FMT BIT(0)
6062
#define TMC_FFCR_EN_TI BIT(1)
6163
#define TMC_FFCR_FON_FLIN BIT(4)
6264
#define TMC_FFCR_FON_TRIG_EVT BIT(5)
63-
#define TMC_FFCR_FLUSHMAN BIT(6)
6465
#define TMC_FFCR_TRIGON_TRIGIN BIT(8)
6566
#define TMC_FFCR_STOP_ON_FLUSH BIT(12)
6667

67-
#define TMC_STS_TMCREADY_BIT 2
68-
#define TMC_FFCR_FLUSHMAN_BIT 6
6968

7069
enum tmc_config_type {
7170
TMC_CONFIG_TYPE_ETB,

0 commit comments

Comments
 (0)