Lines Matching +full:non +full:- +full:coresight
1 /* SPDX-License-Identifier: GPL-2.0 */
17 /* Peripheral id registers (0xFD0-0xFEC) */
26 /* Component id registers (0xFF0-0xFFC) */
78 * union coresight_dev_subtype - further characterisation of a type
99 * struct coresight_platform_data - data harvested from the firmware
118 * struct csdev_access - Abstraction of a CoreSight device access.
144 * struct coresight_desc - description of a component required from drivers
152 * in the component's sysfs sub-directory.
153 * @name: name for the coresight device, also shown under sysfs.
168 * struct coresight_connection - representation of a single connection
179 * +-----------------------------+ +-----------------------------+
181 * |-----------------------------| |-----------------------------|
183 * | | | dest_dev*|<--
184 * |pdata->out_conns[nr_outconns]|<->|src_dev* | |
186 * +-----------------------------+ +-----------------------------+ |
188 * +-----------------------------+ |
190 * |------------------------------ |
192 * | pdata->in_conns[nr_inconns]|<--
194 * +-----------------------------+
208 * struct coresight_sysfs_link - representation of a connection in sysfs.
209 * @orig: Originating (master) coresight device for the link.
210 * @orig_name: Name to use for the link orig->target.
211 * @target: Target (slave) coresight device for the link.
212 * @target_name: Name to use for the link target->orig.
240 * struct coresight_device - representation of a device as used by the framework
251 * but wherever it's done from within the Coresight device's lock,
252 * a non-atomic read would also work. This is the main point of
304 * coresight_dev_list - Mapping for devices to "name" index for device
333 #define source_ops(csdev) csdev->ops->source_ops
334 #define sink_ops(csdev) csdev->ops->sink_ops
335 #define link_ops(csdev) csdev->ops->link_ops
336 #define helper_ops(csdev) csdev->ops->helper_ops
337 #define ect_ops(csdev) csdev->ops->ect_ops
340 * struct coresight_ops_sink - basic operations for a sink
362 * struct coresight_ops_link - basic operations for a link
377 * struct coresight_ops_source - basic operations for a source
393 * struct coresight_ops_helper - Operations for a helper device.
417 if (likely(csa->io_mem)) in csdev_access_relaxed_read32()
418 return readl_relaxed(csa->base + offset); in csdev_access_relaxed_read32()
420 return csa->read(offset, true, false); in csdev_access_relaxed_read32()
447 * clk - Clock is found and enabled
448 * NULL - clock is not found
449 * ERROR - Clock is found but failed to enable
483 if (likely(csa->io_mem)) { in csdev_access_relaxed_read_pair()
484 return readl_relaxed(csa->base + lo_offset) | in csdev_access_relaxed_read_pair()
485 ((u64)readl_relaxed(csa->base + hi_offset) << 32); in csdev_access_relaxed_read_pair()
488 return csa->read(lo_offset, true, false) | (csa->read(hi_offset, true, false) << 32); in csdev_access_relaxed_read_pair()
494 if (likely(csa->io_mem)) { in csdev_access_relaxed_write_pair()
495 writel_relaxed((u32)val, csa->base + lo_offset); in csdev_access_relaxed_write_pair()
496 writel_relaxed((u32)(val >> 32), csa->base + hi_offset); in csdev_access_relaxed_write_pair()
498 csa->write((u32)val, lo_offset, true, false); in csdev_access_relaxed_write_pair()
499 csa->write((u32)(val >> 32), hi_offset, true, false); in csdev_access_relaxed_write_pair()
505 if (likely(csa->io_mem)) in csdev_access_read32()
506 return readl(csa->base + offset); in csdev_access_read32()
508 return csa->read(offset, false, false); in csdev_access_read32()
514 if (likely(csa->io_mem)) in csdev_access_relaxed_write32()
515 writel_relaxed(val, csa->base + offset); in csdev_access_relaxed_write32()
517 csa->write(val, offset, true, false); in csdev_access_relaxed_write32()
522 if (likely(csa->io_mem)) in csdev_access_write32()
523 writel(val, csa->base + offset); in csdev_access_write32()
525 csa->write(val, offset, false, false); in csdev_access_write32()
533 if (likely(csa->io_mem)) in csdev_access_relaxed_read64()
534 return readq_relaxed(csa->base + offset); in csdev_access_relaxed_read64()
536 return csa->read(offset, true, true); in csdev_access_relaxed_read64()
541 if (likely(csa->io_mem)) in csdev_access_read64()
542 return readq(csa->base + offset); in csdev_access_read64()
544 return csa->read(offset, false, true); in csdev_access_read64()
550 if (likely(csa->io_mem)) in csdev_access_relaxed_write64()
551 writeq_relaxed(val, csa->base + offset); in csdev_access_relaxed_write64()
553 csa->write(val, offset, true, true); in csdev_access_relaxed_write64()
558 if (likely(csa->io_mem)) in csdev_access_write64()
559 writeq(val, csa->base + offset); in csdev_access_write64()
561 csa->write(val, offset, false, true); in csdev_access_write64()
593 return csdev && (csdev->type == CORESIGHT_DEV_TYPE_SOURCE) && in coresight_is_percpu_source()
594 (csdev->subtype.source_subtype == CORESIGHT_DEV_SUBTYPE_SOURCE_PROC); in coresight_is_percpu_source()
599 return csdev && (csdev->type == CORESIGHT_DEV_TYPE_SINK) && in coresight_is_percpu_sink()
600 (csdev->subtype.sink_subtype == CORESIGHT_DEV_SUBTYPE_SINK_PERCPU_SYSMEM); in coresight_is_percpu_sink()
610 return local_cmpxchg(&csdev->mode, CS_MODE_DISABLED, new_mode) == in coresight_take_mode()
616 return local_read(&csdev->mode); in coresight_get_mode()
632 local_set(&csdev->mode, new_mode); in coresight_set_mode()