diff options
| author | Shashank Mittal <mittals@codeaurora.org> | 2016-01-15 19:28:53 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:15:39 -0700 |
| commit | 481bb168021173a65a6308526656f3c839a4ae06 (patch) | |
| tree | 9657a37274e1e9f30f187901d0726bcfb2a1c997 /include/linux | |
| parent | 0f30f750c43617ece7d57a7979b048bdc7f3a691 (diff) | |
coresight: add STM driver support in upstream implementation
Add STM driver in upstream implementation of Coresight driver.
This change copies drivers/coresight/coresight-stm.c (commit :
90095b2ae1d987882f67c6d4a512baa98eecd6cb) to driver/hwtracing/coresight
directory.
Change-Id: Id023bf85df0345205ca8baa6a97ff340d5808aeb
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/coresight-stm.h | 35 | ||||
| -rw-r--r-- | include/linux/coresight.h | 7 |
2 files changed, 42 insertions, 0 deletions
diff --git a/include/linux/coresight-stm.h b/include/linux/coresight-stm.h new file mode 100644 index 000000000000..375d96666f91 --- /dev/null +++ b/include/linux/coresight-stm.h @@ -0,0 +1,35 @@ +#ifndef __LINUX_CORESIGHT_STM_H_ +#define __LINUX_CORESIGHT_STM_H_ + +#include <uapi/linux/coresight-stm.h> + +#define stm_log_inv(entity_id, proto_id, data, size) \ + stm_trace(STM_OPTION_NONE, entity_id, proto_id, data, size) + +#define stm_log_inv_ts(entity_id, proto_id, data, size) \ + stm_trace(STM_OPTION_TIMESTAMPED, entity_id, proto_id, \ + data, size) + +#define stm_log_gtd(entity_id, proto_id, data, size) \ + stm_trace(STM_OPTION_GUARANTEED, entity_id, proto_id, \ + data, size) + +#define stm_log_gtd_ts(entity_id, proto_id, data, size) \ + stm_trace(STM_OPTION_GUARANTEED | STM_OPTION_TIMESTAMPED, \ + entity_id, proto_id, data, size) + +#define stm_log(entity_id, data, size) \ + stm_log_inv_ts(entity_id, 0, data, size) + +#ifdef CONFIG_CORESIGHT_STM +extern int stm_trace(uint32_t options, uint8_t entity_id, uint8_t proto_id, + const void *data, uint32_t size); +#else +static inline int stm_trace(uint32_t options, uint8_t entity_id, + uint8_t proto_id, const void *data, uint32_t size) +{ + return 0; +} +#endif + +#endif diff --git a/include/linux/coresight.h b/include/linux/coresight.h index a7cabfa23b55..d22570d2a646 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -40,6 +40,13 @@ extern struct bus_type coresight_bustype; +enum coresight_clk_rate { + CORESIGHT_CLK_RATE_OFF, + CORESIGHT_CLK_RATE_TRACE = 1000, + CORESIGHT_CLK_RATE_HSTRACE = 2000, + CORESIGHT_CLK_RATE_FIXED = 3000, +}; + enum coresight_dev_type { CORESIGHT_DEV_TYPE_NONE, CORESIGHT_DEV_TYPE_SINK, |
