1ad0dfdfdSMathieu Poirier /* SPDX-License-Identifier: GPL-2.0 */ 2ad0dfdfdSMathieu Poirier /* 3ad0dfdfdSMathieu Poirier * Copyright (c) 2012, The Linux Foundation. All rights reserved. 4a06ae860SPratik Patel */ 5a06ae860SPratik Patel 6a06ae860SPratik Patel #ifndef _LINUX_CORESIGHT_H 7a06ae860SPratik Patel #define _LINUX_CORESIGHT_H 8a06ae860SPratik Patel 9a06ae860SPratik Patel #include <linux/device.h> 10882d5e11SMathieu Poirier #include <linux/perf_event.h> 11ff63ec13SMark Brown #include <linux/sched.h> 12a06ae860SPratik Patel 13a06ae860SPratik Patel /* Peripheral id registers (0xFD0-0xFEC) */ 14a06ae860SPratik Patel #define CORESIGHT_PERIPHIDR4 0xfd0 15a06ae860SPratik Patel #define CORESIGHT_PERIPHIDR5 0xfd4 16a06ae860SPratik Patel #define CORESIGHT_PERIPHIDR6 0xfd8 17a06ae860SPratik Patel #define CORESIGHT_PERIPHIDR7 0xfdC 18a06ae860SPratik Patel #define CORESIGHT_PERIPHIDR0 0xfe0 19a06ae860SPratik Patel #define CORESIGHT_PERIPHIDR1 0xfe4 20a06ae860SPratik Patel #define CORESIGHT_PERIPHIDR2 0xfe8 21a06ae860SPratik Patel #define CORESIGHT_PERIPHIDR3 0xfeC 22a06ae860SPratik Patel /* Component id registers (0xFF0-0xFFC) */ 23a06ae860SPratik Patel #define CORESIGHT_COMPIDR0 0xff0 24a06ae860SPratik Patel #define CORESIGHT_COMPIDR1 0xff4 25a06ae860SPratik Patel #define CORESIGHT_COMPIDR2 0xff8 26a06ae860SPratik Patel #define CORESIGHT_COMPIDR3 0xffC 27a06ae860SPratik Patel 28a06ae860SPratik Patel #define ETM_ARCH_V3_3 0x23 29a06ae860SPratik Patel #define ETM_ARCH_V3_5 0x25 30a06ae860SPratik Patel #define PFT_ARCH_V1_0 0x30 31a06ae860SPratik Patel #define PFT_ARCH_V1_1 0x31 32a06ae860SPratik Patel 33a06ae860SPratik Patel #define CORESIGHT_UNLOCK 0xc5acce55 34a06ae860SPratik Patel 35a06ae860SPratik Patel extern struct bus_type coresight_bustype; 36a06ae860SPratik Patel 37a06ae860SPratik Patel enum coresight_dev_type { 38a06ae860SPratik Patel CORESIGHT_DEV_TYPE_NONE, 39a06ae860SPratik Patel CORESIGHT_DEV_TYPE_SINK, 40a06ae860SPratik Patel CORESIGHT_DEV_TYPE_LINK, 41a06ae860SPratik Patel CORESIGHT_DEV_TYPE_LINKSINK, 42a06ae860SPratik Patel CORESIGHT_DEV_TYPE_SOURCE, 438a091d84SSuzuki K Poulose CORESIGHT_DEV_TYPE_HELPER, 44835d722bSMike Leach CORESIGHT_DEV_TYPE_ECT, 45a06ae860SPratik Patel }; 46a06ae860SPratik Patel 47a06ae860SPratik Patel enum coresight_dev_subtype_sink { 48a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_SINK_NONE, 49a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_SINK_PORT, 50a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_SINK_BUFFER, 51a06ae860SPratik Patel }; 52a06ae860SPratik Patel 53a06ae860SPratik Patel enum coresight_dev_subtype_link { 54a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_LINK_NONE, 55a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_LINK_MERG, 56a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_LINK_SPLIT, 57a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_LINK_FIFO, 58a06ae860SPratik Patel }; 59a06ae860SPratik Patel 60a06ae860SPratik Patel enum coresight_dev_subtype_source { 61a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_SOURCE_NONE, 62a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_SOURCE_PROC, 63a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_SOURCE_BUS, 64a06ae860SPratik Patel CORESIGHT_DEV_SUBTYPE_SOURCE_SOFTWARE, 65a06ae860SPratik Patel }; 66a06ae860SPratik Patel 678a091d84SSuzuki K Poulose enum coresight_dev_subtype_helper { 688a091d84SSuzuki K Poulose CORESIGHT_DEV_SUBTYPE_HELPER_NONE, 69fcacb5c1SSuzuki K Poulose CORESIGHT_DEV_SUBTYPE_HELPER_CATU, 708a091d84SSuzuki K Poulose }; 718a091d84SSuzuki K Poulose 72835d722bSMike Leach /* Embedded Cross Trigger (ECT) sub-types */ 73835d722bSMike Leach enum coresight_dev_subtype_ect { 74835d722bSMike Leach CORESIGHT_DEV_SUBTYPE_ECT_NONE, 75835d722bSMike Leach CORESIGHT_DEV_SUBTYPE_ECT_CTI, 76835d722bSMike Leach }; 77835d722bSMike Leach 78a06ae860SPratik Patel /** 7900b78e8bSSuzuki K Poulose * union coresight_dev_subtype - further characterisation of a type 80a06ae860SPratik Patel * @sink_subtype: type of sink this component is, as defined 8100b78e8bSSuzuki K Poulose * by @coresight_dev_subtype_sink. 82a06ae860SPratik Patel * @link_subtype: type of link this component is, as defined 8300b78e8bSSuzuki K Poulose * by @coresight_dev_subtype_link. 84a06ae860SPratik Patel * @source_subtype: type of source this component is, as defined 8500b78e8bSSuzuki K Poulose * by @coresight_dev_subtype_source. 868a091d84SSuzuki K Poulose * @helper_subtype: type of helper this component is, as defined 878a091d84SSuzuki K Poulose * by @coresight_dev_subtype_helper. 88835d722bSMike Leach * @ect_subtype: type of cross trigger this component is, as 89835d722bSMike Leach * defined by @coresight_dev_subtype_ect 90a06ae860SPratik Patel */ 9100b78e8bSSuzuki K Poulose union coresight_dev_subtype { 9200b78e8bSSuzuki K Poulose /* We have some devices which acts as LINK and SINK */ 9300b78e8bSSuzuki K Poulose struct { 94a06ae860SPratik Patel enum coresight_dev_subtype_sink sink_subtype; 95a06ae860SPratik Patel enum coresight_dev_subtype_link link_subtype; 9600b78e8bSSuzuki K Poulose }; 97a06ae860SPratik Patel enum coresight_dev_subtype_source source_subtype; 988a091d84SSuzuki K Poulose enum coresight_dev_subtype_helper helper_subtype; 99835d722bSMike Leach enum coresight_dev_subtype_ect ect_subtype; 100a06ae860SPratik Patel }; 101a06ae860SPratik Patel 102a06ae860SPratik Patel /** 103d375b356SSuzuki K Poulose * struct coresight_platform_data - data harvested from the firmware 104d375b356SSuzuki K Poulose * specification. 105d375b356SSuzuki K Poulose * 106d375b356SSuzuki K Poulose * @nr_inport: Number of elements for the input connections. 107d375b356SSuzuki K Poulose * @nr_outport: Number of elements for the output connections. 108d375b356SSuzuki K Poulose * @conns: Sparse array of nr_outport connections from this component. 109a06ae860SPratik Patel */ 110a06ae860SPratik Patel struct coresight_platform_data { 111a06ae860SPratik Patel int nr_inport; 112a06ae860SPratik Patel int nr_outport; 113c2c72941SSuzuki K Poulose struct coresight_connection *conns; 114a06ae860SPratik Patel }; 115a06ae860SPratik Patel 116a06ae860SPratik Patel /** 117a06ae860SPratik Patel * struct coresight_desc - description of a component required from drivers 118a06ae860SPratik Patel * @type: as defined by @coresight_dev_type. 119a06ae860SPratik Patel * @subtype: as defined by @coresight_dev_subtype. 120a06ae860SPratik Patel * @ops: generic operations for this component, as defined 1212ede79a6SSuzuki K Poulose * by @coresight_ops. 122a06ae860SPratik Patel * @pdata: platform data collected from DT. 123a06ae860SPratik Patel * @dev: The device entity associated to this component. 124a06ae860SPratik Patel * @groups: operations specific to this component. These will end up 1252ede79a6SSuzuki K Poulose * in the component's sysfs sub-directory. 1262ede79a6SSuzuki K Poulose * @name: name for the coresight device, also shown under sysfs. 127a06ae860SPratik Patel */ 128a06ae860SPratik Patel struct coresight_desc { 129a06ae860SPratik Patel enum coresight_dev_type type; 13000b78e8bSSuzuki K Poulose union coresight_dev_subtype subtype; 131a06ae860SPratik Patel const struct coresight_ops *ops; 132a06ae860SPratik Patel struct coresight_platform_data *pdata; 133a06ae860SPratik Patel struct device *dev; 134a06ae860SPratik Patel const struct attribute_group **groups; 1352ede79a6SSuzuki K Poulose const char *name; 136a06ae860SPratik Patel }; 137a06ae860SPratik Patel 138a06ae860SPratik Patel /** 139a06ae860SPratik Patel * struct coresight_connection - representation of a single connection 140a06ae860SPratik Patel * @outport: a connection's output port number. 141a06ae860SPratik Patel * @child_port: remote component's port number @output is connected to. 14237ea1ffdSSuzuki K Poulose * @chid_fwnode: remote component's fwnode handle. 143a06ae860SPratik Patel * @child_dev: a @coresight_device representation of the component 144a06ae860SPratik Patel connected to @outport. 1458a7365c2SSuzuki K Poulose * @link: Representation of the connection as a sysfs link. 146a06ae860SPratik Patel */ 147a06ae860SPratik Patel struct coresight_connection { 148a06ae860SPratik Patel int outport; 149a06ae860SPratik Patel int child_port; 15037ea1ffdSSuzuki K Poulose struct fwnode_handle *child_fwnode; 151a06ae860SPratik Patel struct coresight_device *child_dev; 1528a7365c2SSuzuki K Poulose struct coresight_sysfs_link *link; 153a06ae860SPratik Patel }; 154a06ae860SPratik Patel 155a06ae860SPratik Patel /** 15680961525SMike Leach * struct coresight_sysfs_link - representation of a connection in sysfs. 15780961525SMike Leach * @orig: Originating (master) coresight device for the link. 15880961525SMike Leach * @orig_name: Name to use for the link orig->target. 15980961525SMike Leach * @target: Target (slave) coresight device for the link. 16080961525SMike Leach * @target_name: Name to use for the link target->orig. 16180961525SMike Leach */ 16280961525SMike Leach struct coresight_sysfs_link { 16380961525SMike Leach struct coresight_device *orig; 16480961525SMike Leach const char *orig_name; 16580961525SMike Leach struct coresight_device *target; 16680961525SMike Leach const char *target_name; 16780961525SMike Leach }; 16880961525SMike Leach 16980961525SMike Leach /** 170a06ae860SPratik Patel * struct coresight_device - representation of a device as used by the framework 171b77e3ed0SSuzuki K Poulose * @pdata: Platform data with device connections associated to this device. 172a06ae860SPratik Patel * @type: as defined by @coresight_dev_type. 173a06ae860SPratik Patel * @subtype: as defined by @coresight_dev_subtype. 174a06ae860SPratik Patel * @ops: generic operations for this component, as defined 175a06ae860SPratik Patel by @coresight_ops. 176a06ae860SPratik Patel * @dev: The device entity associated to this component. 177a06ae860SPratik Patel * @refcnt: keep track of what is in use. 178a06ae860SPratik Patel * @orphan: true if the component has connections that haven't been linked. 179a06ae860SPratik Patel * @enable: 'true' if component is currently part of an active path. 180a06ae860SPratik Patel * @activated: 'true' only if a _sink_ has been activated. A sink can be 181bb8e370bSMathieu Poirier * activated but not yet enabled. Enabling for a _sink_ 182*d061cd73SMike Leach * happens when a source has been selected and a path is enabled 183*d061cd73SMike Leach * from source to that sink. 184bb8e370bSMathieu Poirier * @ea: Device attribute for sink representation under PMU directory. 185177af828SMike Leach * @ect_dev: Associated cross trigger device. Not part of the trace data 186177af828SMike Leach * path or connections. 18780961525SMike Leach * @nr_links: number of sysfs links created to other components from this 18880961525SMike Leach * device. These will appear in the "connections" group. 18980961525SMike Leach * @has_conns_grp: Have added a "connections" group for sysfs links. 190a06ae860SPratik Patel */ 191a06ae860SPratik Patel struct coresight_device { 192b77e3ed0SSuzuki K Poulose struct coresight_platform_data *pdata; 193a06ae860SPratik Patel enum coresight_dev_type type; 19400b78e8bSSuzuki K Poulose union coresight_dev_subtype subtype; 195a06ae860SPratik Patel const struct coresight_ops *ops; 196a06ae860SPratik Patel struct device dev; 197a06ae860SPratik Patel atomic_t *refcnt; 198a06ae860SPratik Patel bool orphan; 199a06ae860SPratik Patel bool enable; /* true only if configured as part of a path */ 200bb8e370bSMathieu Poirier /* sink specific fields */ 201a06ae860SPratik Patel bool activated; /* true only if a sink is part of a path */ 202bb8e370bSMathieu Poirier struct dev_ext_attribute *ea; 203177af828SMike Leach /* cross trigger handling */ 204177af828SMike Leach struct coresight_device *ect_dev; 20580961525SMike Leach /* sysfs links between components */ 20680961525SMike Leach int nr_links; 20780961525SMike Leach bool has_conns_grp; 208a06ae860SPratik Patel }; 209a06ae860SPratik Patel 2100f5f9b6bSSuzuki K Poulose /* 2110f5f9b6bSSuzuki K Poulose * coresight_dev_list - Mapping for devices to "name" index for device 2120f5f9b6bSSuzuki K Poulose * names. 2130f5f9b6bSSuzuki K Poulose * 2140f5f9b6bSSuzuki K Poulose * @nr_idx: Number of entries already allocated. 2150f5f9b6bSSuzuki K Poulose * @pfx: Prefix pattern for device name. 2160f5f9b6bSSuzuki K Poulose * @fwnode_list: Array of fwnode_handles associated with each allocated 2170f5f9b6bSSuzuki K Poulose * index, upto nr_idx entries. 2180f5f9b6bSSuzuki K Poulose */ 2190f5f9b6bSSuzuki K Poulose struct coresight_dev_list { 2200f5f9b6bSSuzuki K Poulose int nr_idx; 2210f5f9b6bSSuzuki K Poulose const char *pfx; 2220f5f9b6bSSuzuki K Poulose struct fwnode_handle **fwnode_list; 2230f5f9b6bSSuzuki K Poulose }; 2240f5f9b6bSSuzuki K Poulose 2250f5f9b6bSSuzuki K Poulose #define DEFINE_CORESIGHT_DEVLIST(var, dev_pfx) \ 2260f5f9b6bSSuzuki K Poulose static struct coresight_dev_list (var) = { \ 2270f5f9b6bSSuzuki K Poulose .pfx = dev_pfx, \ 2280f5f9b6bSSuzuki K Poulose .nr_idx = 0, \ 2290f5f9b6bSSuzuki K Poulose .fwnode_list = NULL, \ 2300f5f9b6bSSuzuki K Poulose } 2310f5f9b6bSSuzuki K Poulose 232a06ae860SPratik Patel #define to_coresight_device(d) container_of(d, struct coresight_device, dev) 233a06ae860SPratik Patel 234a06ae860SPratik Patel #define source_ops(csdev) csdev->ops->source_ops 235a06ae860SPratik Patel #define sink_ops(csdev) csdev->ops->sink_ops 236a06ae860SPratik Patel #define link_ops(csdev) csdev->ops->link_ops 2378a091d84SSuzuki K Poulose #define helper_ops(csdev) csdev->ops->helper_ops 238835d722bSMike Leach #define ect_ops(csdev) csdev->ops->ect_ops 239a06ae860SPratik Patel 240a06ae860SPratik Patel /** 241a06ae860SPratik Patel * struct coresight_ops_sink - basic operations for a sink 242a06ae860SPratik Patel * Operations available for sinks 243a06ae860SPratik Patel * @enable: enables the sink. 244a06ae860SPratik Patel * @disable: disables the sink. 2452997aa40SMathieu Poirier * @alloc_buffer: initialises perf's ring buffer for trace collection. 2462997aa40SMathieu Poirier * @free_buffer: release memory allocated in @get_config. 2472997aa40SMathieu Poirier * @update_buffer: update buffer pointers after a trace session. 248a06ae860SPratik Patel */ 249a06ae860SPratik Patel struct coresight_ops_sink { 2503d6e8935SSuzuki K Poulose int (*enable)(struct coresight_device *csdev, u32 mode, void *data); 2516c817a95SMathieu Poirier int (*disable)(struct coresight_device *csdev); 252a0f08a6aSMathieu Poirier void *(*alloc_buffer)(struct coresight_device *csdev, 253a0f08a6aSMathieu Poirier struct perf_event *event, void **pages, 254a0f08a6aSMathieu Poirier int nr_pages, bool overwrite); 2552997aa40SMathieu Poirier void (*free_buffer)(void *config); 2567ec786adSSuzuki K Poulose unsigned long (*update_buffer)(struct coresight_device *csdev, 2572997aa40SMathieu Poirier struct perf_output_handle *handle, 2582997aa40SMathieu Poirier void *sink_config); 259a06ae860SPratik Patel }; 260a06ae860SPratik Patel 261a06ae860SPratik Patel /** 262a06ae860SPratik Patel * struct coresight_ops_link - basic operations for a link 263a06ae860SPratik Patel * Operations available for links. 264a06ae860SPratik Patel * @enable: enables flow between iport and oport. 265a06ae860SPratik Patel * @disable: disables flow between iport and oport. 266a06ae860SPratik Patel */ 267a06ae860SPratik Patel struct coresight_ops_link { 268a06ae860SPratik Patel int (*enable)(struct coresight_device *csdev, int iport, int oport); 269a06ae860SPratik Patel void (*disable)(struct coresight_device *csdev, int iport, int oport); 270a06ae860SPratik Patel }; 271a06ae860SPratik Patel 272a06ae860SPratik Patel /** 273a06ae860SPratik Patel * struct coresight_ops_source - basic operations for a source 274a06ae860SPratik Patel * Operations available for sources. 27552210c87SMathieu Poirier * @cpu_id: returns the value of the CPU number this component 27652210c87SMathieu Poirier * is associated to. 277a06ae860SPratik Patel * @trace_id: returns the value of the component's trace ID as known 278882d5e11SMathieu Poirier * to the HW. 2791d27ff5aSMathieu Poirier * @enable: enables tracing for a source. 280a06ae860SPratik Patel * @disable: disables tracing for a source. 281a06ae860SPratik Patel */ 282a06ae860SPratik Patel struct coresight_ops_source { 28352210c87SMathieu Poirier int (*cpu_id)(struct coresight_device *csdev); 284a06ae860SPratik Patel int (*trace_id)(struct coresight_device *csdev); 285882d5e11SMathieu Poirier int (*enable)(struct coresight_device *csdev, 28668905d73SMathieu Poirier struct perf_event *event, u32 mode); 28768905d73SMathieu Poirier void (*disable)(struct coresight_device *csdev, 28868905d73SMathieu Poirier struct perf_event *event); 289a06ae860SPratik Patel }; 290a06ae860SPratik Patel 2918a091d84SSuzuki K Poulose /** 2928a091d84SSuzuki K Poulose * struct coresight_ops_helper - Operations for a helper device. 2938a091d84SSuzuki K Poulose * 2948a091d84SSuzuki K Poulose * All operations could pass in a device specific data, which could 2958a091d84SSuzuki K Poulose * help the helper device to determine what to do. 2968a091d84SSuzuki K Poulose * 2978a091d84SSuzuki K Poulose * @enable : Enable the device 2988a091d84SSuzuki K Poulose * @disable : Disable the device 2998a091d84SSuzuki K Poulose */ 3008a091d84SSuzuki K Poulose struct coresight_ops_helper { 3018a091d84SSuzuki K Poulose int (*enable)(struct coresight_device *csdev, void *data); 3028a091d84SSuzuki K Poulose int (*disable)(struct coresight_device *csdev, void *data); 3038a091d84SSuzuki K Poulose }; 3048a091d84SSuzuki K Poulose 305835d722bSMike Leach /** 306835d722bSMike Leach * struct coresight_ops_ect - Ops for an embedded cross trigger device 307835d722bSMike Leach * 308835d722bSMike Leach * @enable : Enable the device 309835d722bSMike Leach * @disable : Disable the device 310835d722bSMike Leach */ 311835d722bSMike Leach struct coresight_ops_ect { 312835d722bSMike Leach int (*enable)(struct coresight_device *csdev); 313835d722bSMike Leach int (*disable)(struct coresight_device *csdev); 314835d722bSMike Leach }; 315835d722bSMike Leach 316a06ae860SPratik Patel struct coresight_ops { 317a06ae860SPratik Patel const struct coresight_ops_sink *sink_ops; 318a06ae860SPratik Patel const struct coresight_ops_link *link_ops; 319a06ae860SPratik Patel const struct coresight_ops_source *source_ops; 3208a091d84SSuzuki K Poulose const struct coresight_ops_helper *helper_ops; 321835d722bSMike Leach const struct coresight_ops_ect *ect_ops; 322a06ae860SPratik Patel }; 323a06ae860SPratik Patel 324a06ae860SPratik Patel #ifdef CONFIG_CORESIGHT 325a06ae860SPratik Patel extern struct coresight_device * 326a06ae860SPratik Patel coresight_register(struct coresight_desc *desc); 327a06ae860SPratik Patel extern void coresight_unregister(struct coresight_device *csdev); 328a06ae860SPratik Patel extern int coresight_enable(struct coresight_device *csdev); 329a06ae860SPratik Patel extern void coresight_disable(struct coresight_device *csdev); 330a06ae860SPratik Patel extern int coresight_timeout(void __iomem *addr, u32 offset, 331a06ae860SPratik Patel int position, int value); 3322478a6aeSSuzuki K Poulose 3332478a6aeSSuzuki K Poulose extern int coresight_claim_device(void __iomem *base); 3342478a6aeSSuzuki K Poulose extern int coresight_claim_device_unlocked(void __iomem *base); 3352478a6aeSSuzuki K Poulose 3362478a6aeSSuzuki K Poulose extern void coresight_disclaim_device(void __iomem *base); 3372478a6aeSSuzuki K Poulose extern void coresight_disclaim_device_unlocked(void __iomem *base); 3380f5f9b6bSSuzuki K Poulose extern char *coresight_alloc_device_name(struct coresight_dev_list *devs, 3390f5f9b6bSSuzuki K Poulose struct device *dev); 340f188b5e7SAndrew Murray 341f188b5e7SAndrew Murray extern bool coresight_loses_context_with_cpu(struct device *dev); 342a06ae860SPratik Patel #else 343a06ae860SPratik Patel static inline struct coresight_device * 344a06ae860SPratik Patel coresight_register(struct coresight_desc *desc) { return NULL; } 345a06ae860SPratik Patel static inline void coresight_unregister(struct coresight_device *csdev) {} 346a06ae860SPratik Patel static inline int 347a06ae860SPratik Patel coresight_enable(struct coresight_device *csdev) { return -ENOSYS; } 348a06ae860SPratik Patel static inline void coresight_disable(struct coresight_device *csdev) {} 349a06ae860SPratik Patel static inline int coresight_timeout(void __iomem *addr, u32 offset, 350a06ae860SPratik Patel int position, int value) { return 1; } 3512478a6aeSSuzuki K Poulose static inline int coresight_claim_device_unlocked(void __iomem *base) 3522478a6aeSSuzuki K Poulose { 3532478a6aeSSuzuki K Poulose return -EINVAL; 3542478a6aeSSuzuki K Poulose } 3552478a6aeSSuzuki K Poulose 3562478a6aeSSuzuki K Poulose static inline int coresight_claim_device(void __iomem *base) 3572478a6aeSSuzuki K Poulose { 3582478a6aeSSuzuki K Poulose return -EINVAL; 3592478a6aeSSuzuki K Poulose } 3602478a6aeSSuzuki K Poulose 3612478a6aeSSuzuki K Poulose static inline void coresight_disclaim_device(void __iomem *base) {} 3622478a6aeSSuzuki K Poulose static inline void coresight_disclaim_device_unlocked(void __iomem *base) {} 3632478a6aeSSuzuki K Poulose 364f188b5e7SAndrew Murray static inline bool coresight_loses_context_with_cpu(struct device *dev) 365f188b5e7SAndrew Murray { 366f188b5e7SAndrew Murray return false; 367f188b5e7SAndrew Murray } 368c61c4b5dSMathieu Poirier #endif 369c61c4b5dSMathieu Poirier 37091824db2SSuzuki K Poulose extern int coresight_get_cpu(struct device *dev); 371a06ae860SPratik Patel 372f03631daSSuzuki K Poulose struct coresight_platform_data *coresight_get_platform_data(struct device *dev); 373f03631daSSuzuki K Poulose 374a06ae860SPratik Patel #endif 375