diff options
author | Mao Jinlong <quic_jinlmao@quicinc.com> | 2023-01-17 06:57:04 -0800 |
---|---|---|
committer | Suzuki K Poulose <suzuki.poulose@arm.com> | 2023-01-20 11:39:03 +0000 |
commit | 436cca9a2c0f05a3802a6a5a7c6849853590f919 (patch) | |
tree | 0fc87925a9ca64703354aca9cf6e9a29612502a3 /drivers/hwtracing/coresight/coresight-tpdm.h | |
parent | 1f00465d7fc742543ebc096879bddc01ee4a5993 (diff) |
coresight-tpdm: Add integration test support
Integration test for tpdm can help to generate the data for
verification of the topology during TPDM software bring up.
Sample:
echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink
echo 1 > /sys/bus/coresight/devices/tpdm0/enable_source
echo 1 > /sys/bus/coresight/devices/tpdm0/integration_test
echo 2 > /sys/bus/coresight/devices/tpdm0/integration_test
cat /dev/tmc_etf0 > /data/etf-tpdm0.bin
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Tao Zhang <quic_taozha@quicinc.com>
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230117145708.16739-6-quic_jinlmao@quicinc.com
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-tpdm.h')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-tpdm.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tpdm.h b/drivers/hwtracing/coresight/coresight-tpdm.h index 3f7ee37b6303..543854043a2d 100644 --- a/drivers/hwtracing/coresight/coresight-tpdm.h +++ b/drivers/hwtracing/coresight/coresight-tpdm.h @@ -14,6 +14,20 @@ /* Enable bit for DSB subunit */ #define TPDM_DSB_CR_ENA BIT(0) +/* TPDM integration test registers */ +#define TPDM_ITATBCNTRL (0xEF0) +#define TPDM_ITCNTRL (0xF00) + +/* Register value for integration test */ +#define ATBCNTRL_VAL_32 0xC00F1409 +#define ATBCNTRL_VAL_64 0xC01F1409 + +/* + * Number of cycles to write value when + * integration test. + */ +#define INTEGRATION_TEST_CYCLE 10 + /** * The bits of PERIPHIDR0 register. * The fields [6:0] of PERIPHIDR0 are used to determine what |