android_kernel_oneplus_msm8998/include/linux/coresight-stm.h
Pratik Patel feff85e807 coresight: stm: adding driver for CoreSight STM component
This driver adds support for the STM CoreSight IP block, allowing any
system compoment (HW or SW) to log and aggregate messages via a
single entity.

The CoreSight STM exposes an application defined number of channels
called stimulus port.  Configuration is done using entries in sysfs
and channels made available to userspace via configfs.

Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Michael Williams <michael.williams@arm.com>
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 237483aa5cf43105d148d3f03b29eed47c3e6cf9)
2016-06-01 15:45:21 -06: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