drivers/hwtracing/coresight/coresight-tpdm.h

Source file repositories/reference/linux-study-clean/drivers/hwtracing/coresight/coresight-tpdm.h

File Facts

System
Linux kernel
Corpus path
drivers/hwtracing/coresight/coresight-tpdm.h
Extension
.h
Size
10697 bytes
Lines
361
Domain
Driver Families
Bucket
drivers/hwtracing
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct dsb_dataset {
	u32			mode;
	u32			edge_ctrl_idx;
	u32			edge_ctrl[TPDM_DSB_MAX_EDCR];
	u32			edge_ctrl_mask[TPDM_DSB_MAX_EDCMR];
	u32			patt_val[TPDM_DSB_MAX_PATT];
	u32			patt_mask[TPDM_DSB_MAX_PATT];
	u32			trig_patt[TPDM_DSB_MAX_PATT];
	u32			trig_patt_mask[TPDM_DSB_MAX_PATT];
	u32			msr[TPDM_DSB_MAX_MSR];
	bool			patt_ts;
	bool			patt_type;
	bool			trig_ts;
	bool			trig_type;
};

/**
 * struct cmb_dataset
 * @trace_mode:       Dataset collection mode
 * @patt_val:         Save value for pattern
 * @patt_mask:        Save value for pattern mask
 * @trig_patt:        Save value for trigger pattern
 * @trig_patt_mask:   Save value for trigger pattern mask
 * @msr               Save value for MSR
 * @patt_ts:          Indicates if pattern match for timestamp is enabled.
 * @trig_ts:          Indicates if CTI trigger for timestamp is enabled.
 * @ts_all:           Indicates if timestamp is enabled for all packets.
 * struct mcmb_dataset
 * @mcmb_trig_lane:       Save data for trigger lane
 * @mcmb_lane_select:     Save data for lane enablement
 */
struct cmb_dataset {
	u32			trace_mode;
	u32			patt_val[TPDM_CMB_MAX_PATT];
	u32			patt_mask[TPDM_CMB_MAX_PATT];
	u32			trig_patt[TPDM_CMB_MAX_PATT];
	u32			trig_patt_mask[TPDM_CMB_MAX_PATT];
	u32			msr[TPDM_CMB_MAX_MSR];
	bool			patt_ts;
	bool			trig_ts;
	bool			ts_all;
	struct {
		u8		trig_lane;
		u8		lane_select;
	} mcmb;
};

/**
 * struct tpdm_drvdata - specifics associated to an TPDM component
 * @base:       memory mapped base address for this component.
 * @dev:        The device entity associated to this component.
 * @csdev:      component vitals needed by the framework.
 * @spinlock:   lock for the drvdata value.
 * @enable:     enable status of the component.
 * @datasets:   The datasets types present of the TPDM.
 * @dsb         Specifics associated to TPDM DSB.
 * @cmb         Specifics associated to TPDM CMB.
 * @dsb_msr_num Number of MSR supported by DSB TPDM
 * @cmb_msr_num Number of MSR supported by CMB TPDM
 * @traceid	Trace ID of the path.
 */

struct tpdm_drvdata {
	void __iomem		*base;
	struct device		*dev;
	struct coresight_device	*csdev;
	spinlock_t		spinlock;
	bool			enable;
	unsigned long		datasets;
	struct dsb_dataset	*dsb;
	struct cmb_dataset	*cmb;
	u32			dsb_msr_num;
	u32			cmb_msr_num;
	u8			traceid;
};

/* Enumerate members of various datasets */
enum dataset_mem {
	DSB_EDGE_CTRL,
	DSB_EDGE_CTRL_MASK,
	DSB_TRIG_PATT,
	DSB_TRIG_PATT_MASK,
	DSB_PATT,
	DSB_PATT_MASK,
	DSB_MSR,
	CMB_TRIG_PATT,
	CMB_TRIG_PATT_MASK,
	CMB_PATT,
	CMB_PATT_MASK,
	CMB_MSR

Annotation

Implementation Notes