Lines Matching +full:coresight +full:- +full:cti
1 /* SPDX-License-Identifier: GPL-2.0 */
6 #include <asm/hardware/coresight.h>
35 * CoreSight v1.0 Architecture Specification
41 * struct cti - cross trigger interface struct
42 * @base: mapped virtual address for the cti base
43 * @irq: irq number for the cti
47 * cti struct used to operate cti registers.
49 struct cti { struct
56 * cti_init - initialize the cti instance argument
57 * @cti: cti instance
58 * @base: mapped virtual address for the cti base
59 * @irq: irq number for the cti
64 * @base, @irq and @trig_out to cti.
66 static inline void cti_init(struct cti *cti, in cti_init() argument
69 cti->base = base; in cti_init()
70 cti->irq = irq; in cti_init()
71 cti->trig_out_for_irq = trig_out; in cti_init()
75 * cti_map_trigger - use the @chan to map @trig_in to @trig_out
76 * @cti: cti instance
84 static inline void cti_map_trigger(struct cti *cti, in cti_map_trigger() argument
87 void __iomem *base = cti->base; in cti_map_trigger()
100 * cti_enable - enable the cti module
101 * @cti: cti instance
103 * enable the cti module
105 static inline void cti_enable(struct cti *cti) in cti_enable() argument
107 __raw_writel(0x1, cti->base + CTICONTROL); in cti_enable()
111 * cti_disable - disable the cti module
112 * @cti: cti instance
114 * enable the cti module
116 static inline void cti_disable(struct cti *cti) in cti_disable() argument
118 __raw_writel(0, cti->base + CTICONTROL); in cti_disable()
122 * cti_irq_ack - clear the cti irq
123 * @cti: cti instance
125 * clear the cti irq
127 static inline void cti_irq_ack(struct cti *cti) in cti_irq_ack() argument
129 void __iomem *base = cti->base; in cti_irq_ack()
133 val |= BIT(cti->trig_out_for_irq); in cti_irq_ack()
138 * cti_unlock - unlock cti module
139 * @cti: cti instance
141 * unlock the cti module, or else any writes to the cti
144 static inline void cti_unlock(struct cti *cti) in cti_unlock() argument
146 __raw_writel(CS_LAR_KEY, cti->base + LOCKACCESS); in cti_unlock()
150 * cti_lock - lock cti module
151 * @cti: cti instance
153 * lock the cti module, so any writes to the cti
156 static inline void cti_lock(struct cti *cti) in cti_lock() argument
158 __raw_writel(~CS_LAR_KEY, cti->base + LOCKACCESS); in cti_lock()