android_kernel_oneplus_msm8998/include/linux/coresight-stm.h
Shashank Mittal 481bb16802 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>
2016-03-22 11:15:39 -07:00

35 lines
1 KiB
C

#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