OSDN Git Service

coresight tmc: Add support for Coresight SoC 600 TMC
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 2 Aug 2017 16:22:17 +0000 (10:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 14:05:49 +0000 (16:05 +0200)
The coresight SoC 600 supports ETR save-restore which allows us
to restore a trace session by retaining the RRP/RWP/STS.Full values
when the TMC leaves the Disabled state. However, the TMC doesn't
have a scatter-gather unit in built.

Also, TMCs have different PIDs in different configurations (ETF,
ETB & ETR), unlike the previous generation.

While the DEVID exposes some of the features/changes in the TMC,
it doesn't explicitly advertises the new save-restore feature
as described above.

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

index 5bfc1b3..4fd112f 100644 (file)
@@ -442,6 +442,22 @@ static struct amba_id tmc_ids[] = {
                .id     = 0x0003b961,
                .mask   = 0x0003ffff,
        },
+       {
+               /* Coresight SoC 600 TMC-ETR/ETS */
+               .id     = 0x000bb9e8,
+               .mask   = 0x000fffff,
+               .data   = (void *)(unsigned long)CORESIGHT_SOC_600_ETR_CAPS,
+       },
+       {
+               /* Coresight SoC 600 TMC-ETB */
+               .id     = 0x000bb9e9,
+               .mask   = 0x000fffff,
+       },
+       {
+               /* Coresight SoC 600 TMC-ETF */
+               .id     = 0x000bb9ea,
+               .mask   = 0x000fffff,
+       },
        { 0, 0},
 };
 
index d0da43a..8df7a81 100644 (file)
@@ -129,6 +129,10 @@ enum tmc_mem_intf_width {
  */
 #define TMC_ETR_SAVE_RESTORE           (0x1U << 2)
 
+/* Coresight SoC-600 TMC-ETR unadvertised capabilities */
+#define CORESIGHT_SOC_600_ETR_CAPS     \
+       (TMC_ETR_SAVE_RESTORE | TMC_ETR_AXI_ARCACHE)
+
 /**
  * struct tmc_drvdata - specifics associated to an TMC component
  * @base:      memory mapped base address for this component.