drivers/hwtracing/coresight/coresight-cti.h
Source file repositories/reference/linux-study-clean/drivers/hwtracing/coresight/coresight-cti.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/hwtracing/coresight/coresight-cti.h- Extension
.h- Size
- 7542 bytes
- Lines
- 241
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/coresight.hlinux/device.hlinux/list.hlinux/spinlock.hlinux/sysfs.hlinux/types.hcoresight-priv.h
Detected Declarations
struct fwnode_handlestruct cti_trig_grpstruct cti_trig_construct cti_devicestruct cti_configstruct cti_drvdataenum cti_chan_openum cti_trig_direnum cti_chan_gate_openum cti_chan_set_opfunction cti_is_active
Annotated Snippet
struct cti_trig_grp {
int nr_sigs;
u32 used_mask;
int sig_types[];
};
/**
* Trigger connection - connection between a CTI and other (coresight) device
* lists input and output trigger signals for the device
*
* @con_in: connected CTIIN signals for the device.
* @con_out: connected CTIOUT signals for the device.
* @con_dev: coresight device connected to the CTI, NULL if not CS device
* @con_dev_name: name of connected device (CS or CPU)
* @node: entry node in list of connections.
* @con_attrs: Dynamic sysfs attributes specific to this connection.
* @attr_group: Dynamic attribute group created for this connection.
*/
struct cti_trig_con {
struct cti_trig_grp *con_in;
struct cti_trig_grp *con_out;
struct coresight_device *con_dev;
const char *con_dev_name;
struct list_head node;
struct attribute **con_attrs;
struct attribute_group *attr_group;
};
/**
* struct cti_device - description of CTI device properties.
*
* @nt_trig_con: Number of external devices connected to this device.
* @ctm_id: which CTM this device is connected to (by default it is
* assumed there is a single CTM per SoC, ID 0).
* @trig_cons: list of connections to this device.
* @cpu: CPU ID if associated with CPU, -1 otherwise.
* @con_groups: combined static and dynamic sysfs groups for trigger
* connections.
*/
struct cti_device {
int nr_trig_con;
u32 ctm_id;
struct list_head trig_cons;
int cpu;
const struct attribute_group **con_groups;
};
/**
* struct cti_config - configuration of the CTI device hardware
*
* @nr_trig_max: Max number of trigger signals implemented on device.
* (max of trig_in or trig_out) - from ID register.
* @nr_ctm_channels: number of available CTM channels - from ID register.
* @asicctl_impl: true if asicctl is implemented.
* @enable_req_count: CTI is enabled alongside >=1 associated devices.
* @trig_in_use: bitfield of in triggers registered as in use.
* @trig_out_use: bitfield of out triggers registered as in use.
* @trig_out_filter: bitfield of out triggers that are blocked if filter
* enabled. Typically this would be dbgreq / restart on
* a core CTI.
* @trig_filter_enable: 1 if filtering enabled.
* @xtrig_rchan_sel: channel selection for xtrigger connection show.
* @ctiappset: CTI Software application channel set.
* @ctiinout_sel: register selector for INEN and OUTEN regs.
* @ctiinen: enable input trigger to a channel.
* @ctiouten: enable output trigger from a channel.
* @ctigate: gate channel output from CTI to CTM.
* @asicctl: asic control register.
*/
struct cti_config {
/* hardware description */
int nr_ctm_channels;
int nr_trig_max;
bool asicctl_impl;
/* cti enable control */
int enable_req_count;
/* registered triggers and filtering */
u32 trig_in_use;
u32 trig_out_use;
u32 trig_out_filter;
bool trig_filter_enable;
u8 xtrig_rchan_sel;
/* cti cross trig programmable regs */
u32 ctiappset;
u8 ctiinout_sel;
u32 ctiinen[CTIINOUTEN_MAX];
u32 ctiouten[CTIINOUTEN_MAX];
Annotation
- Immediate include surface: `linux/coresight.h`, `linux/device.h`, `linux/list.h`, `linux/spinlock.h`, `linux/sysfs.h`, `linux/types.h`, `coresight-priv.h`.
- Detected declarations: `struct fwnode_handle`, `struct cti_trig_grp`, `struct cti_trig_con`, `struct cti_device`, `struct cti_config`, `struct cti_drvdata`, `enum cti_chan_op`, `enum cti_trig_dir`, `enum cti_chan_gate_op`, `enum cti_chan_set_op`.
- Atlas domain: Driver Families / drivers/hwtracing.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.