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 /** 103a06ae860SPratik Patel * struct coresight_platform_data - data harvested from the DT specification 104a06ae860SPratik Patel * @nr_inport: number of input ports for this component. 105a06ae860SPratik Patel * @nr_outport: number of output ports for this component. 106c2c72941SSuzuki K Poulose * @conns: Array of nr_outport connections from this component 107a06ae860SPratik Patel */ 108a06ae860SPratik Patel struct coresight_platform_data { 109a06ae860SPratik Patel int nr_inport; 110a06ae860SPratik Patel int nr_outport; 111c2c72941SSuzuki K Poulose struct coresight_connection *conns; 112a06ae860SPratik Patel }; 113a06ae860SPratik Patel 114a06ae860SPratik Patel /** 115a06ae860SPratik Patel * struct coresight_desc - description of a component required from drivers 116a06ae860SPratik Patel * @type: as defined by @coresight_dev_type. 117a06ae860SPratik Patel * @subtype: as defined by @coresight_dev_subtype. 118a06ae860SPratik Patel * @ops: generic operations for this component, as defined 1192ede79a6SSuzuki K Poulose * by @coresight_ops. 120a06ae860SPratik Patel * @pdata: platform data collected from DT. 121a06ae860SPratik Patel * @dev: The device entity associated to this component. 122a06ae860SPratik Patel * @groups: operations specific to this component. These will end up 1232ede79a6SSuzuki K Poulose * in the component's sysfs sub-directory. 1242ede79a6SSuzuki K Poulose * @name: name for the coresight device, also shown under sysfs. 125a06ae860SPratik Patel */ 126a06ae860SPratik Patel struct coresight_desc { 127a06ae860SPratik Patel enum coresight_dev_type type; 12800b78e8bSSuzuki K Poulose union coresight_dev_subtype subtype; 129a06ae860SPratik Patel const struct coresight_ops *ops; 130a06ae860SPratik Patel struct coresight_platform_data *pdata; 131a06ae860SPratik Patel struct device *dev; 132a06ae860SPratik Patel const struct attribute_group **groups; 1332ede79a6SSuzuki K Poulose const char *name; 134a06ae860SPratik Patel }; 135a06ae860SPratik Patel 136a06ae860SPratik Patel /** 137a06ae860SPratik Patel * struct coresight_connection - representation of a single connection 138a06ae860SPratik Patel * @outport: a connection's output port number. 139a06ae860SPratik Patel * @child_port: remote component's port number @output is connected to. 14037ea1ffdSSuzuki K Poulose * @chid_fwnode: remote component's fwnode handle. 141a06ae860SPratik Patel * @child_dev: a @coresight_device representation of the component 142a06ae860SPratik Patel connected to @outport. 143*8a7365c2SSuzuki K Poulose * @link: Representation of the connection as a sysfs link. 144a06ae860SPratik Patel */ 145a06ae860SPratik Patel struct coresight_connection { 146a06ae860SPratik Patel int outport; 147a06ae860SPratik Patel int child_port; 14837ea1ffdSSuzuki K Poulose struct fwnode_handle *child_fwnode; 149a06ae860SPratik Patel struct coresight_device *child_dev; 150*8a7365c2SSuzuki K Poulose struct coresight_sysfs_link *link; 151a06ae860SPratik Patel }; 152a06ae860SPratik Patel 153a06ae860SPratik Patel /** 15480961525SMike Leach * struct coresight_sysfs_link - representation of a connection in sysfs. 15580961525SMike Leach * @orig: Originating (master) coresight device for the link. 15680961525SMike Leach * @orig_name: Name to use for the link orig->target. 15780961525SMike Leach * @target: Target (slave) coresight device for the link. 15880961525SMike Leach * @target_name: Name to use for the link target->orig. 15980961525SMike Leach */ 16080961525SMike Leach struct coresight_sysfs_link { 16180961525SMike Leach struct coresight_device *orig; 16280961525SMike Leach const char *orig_name; 16380961525SMike Leach struct coresight_device *target; 16480961525SMike Leach const char *target_name; 16580961525SMike Leach }; 16680961525SMike Leach 16780961525SMike Leach /** 168a06ae860SPratik Patel * struct coresight_device - representation of a device as used by the framework 169b77e3ed0SSuzuki K Poulose * @pdata: Platform data with device connections associated to this device. 170a06ae860SPratik Patel * @type: as defined by @coresight_dev_type. 171a06ae860SPratik Patel * @subtype: as defined by @coresight_dev_subtype. 172a06ae860SPratik Patel * @ops: generic operations for this component, as defined 173a06ae860SPratik Patel by @coresight_ops. 174a06ae860SPratik Patel * @dev: The device entity associated to this component. 175a06ae860SPratik Patel * @refcnt: keep track of what is in use. 176a06ae860SPratik Patel * @orphan: true if the component has connections that haven't been linked. 177a06ae860SPratik Patel * @enable: 'true' if component is currently part of an active path. 178a06ae860SPratik Patel * @activated: 'true' only if a _sink_ has been activated. A sink can be 179bb8e370bSMathieu Poirier * activated but not yet enabled. Enabling for a _sink_ 180bb8e370bSMathieu Poirier * appens when a source has been selected for that it. 181bb8e370bSMathieu Poirier * @ea: Device attribute for sink representation under PMU directory. 182177af828SMike Leach * @ect_dev: Associated cross trigger device. Not part of the trace data 183177af828SMike Leach * path or connections. 18480961525SMike Leach * @nr_links: number of sysfs links created to other components from this 18580961525SMike Leach * device. These will appear in the "connections" group. 18680961525SMike Leach * @has_conns_grp: Have added a "connections" group for sysfs links. 187a06ae860SPratik Patel */ 188a06ae860SPratik Patel struct coresight_device { 189b77e3ed0SSuzuki K Poulose struct coresight_platform_data *pdata; 190a06ae860SPratik Patel enum coresight_dev_type type; 19100b78e8bSSuzuki K Poulose union coresight_dev_subtype subtype; 192a06ae860SPratik Patel const struct coresight_ops *ops; 193a06ae860SPratik Patel struct device dev; 194a06ae860SPratik Patel atomic_t *refcnt; 195a06ae860SPratik Patel bool orphan; 196a06ae860SPratik Patel bool enable; /* true only if configured as part of a path */ 197bb8e370bSMathieu Poirier /* sink specific fields */ 198a06ae860SPratik Patel bool activated; /* true only if a sink is part of a path */ 199bb8e370bSMathieu Poirier struct dev_ext_attribute *ea; 200177af828SMike Leach /* cross trigger handling */ 201177af828SMike Leach struct coresight_device *ect_dev; 20280961525SMike Leach /* sysfs links between components */ 20380961525SMike Leach int nr_links; 20480961525SMike Leach bool has_conns_grp; 205a06ae860SPratik Patel }; 206a06ae860SPratik Patel 2070f5f9b6bSSuzuki K Poulose /* 2080f5f9b6bSSuzuki K Poulose * coresight_dev_list - Mapping for devices to "name" index for device 2090f5f9b6bSSuzuki K Poulose * names. 2100f5f9b6bSSuzuki K Poulose * 2110f5f9b6bSSuzuki K Poulose * @nr_idx: Number of entries already allocated. 2120f5f9b6bSSuzuki K Poulose * @pfx: Prefix pattern for device name. 2130f5f9b6bSSuzuki K Poulose * @fwnode_list: Array of fwnode_handles associated with each allocated 2140f5f9b6bSSuzuki K Poulose * index, upto nr_idx entries. 2150f5f9b6bSSuzuki K Poulose */ 2160f5f9b6bSSuzuki K Poulose struct coresight_dev_list { 2170f5f9b6bSSuzuki K Poulose int nr_idx; 2180f5f9b6bSSuzuki K Poulose const char *pfx; 2190f5f9b6bSSuzuki K Poulose struct fwnode_handle **fwnode_list; 2200f5f9b6bSSuzuki K Poulose }; 2210f5f9b6bSSuzuki K Poulose 2220f5f9b6bSSuzuki K Poulose #define DEFINE_CORESIGHT_DEVLIST(var, dev_pfx) \ 2230f5f9b6bSSuzuki K Poulose static struct coresight_dev_list (var) = { \ 2240f5f9b6bSSuzuki K Poulose .pfx = dev_pfx, \ 2250f5f9b6bSSuzuki K Poulose .nr_idx = 0, \ 2260f5f9b6bSSuzuki K Poulose .fwnode_list = NULL, \ 2270f5f9b6bSSuzuki K Poulose } 2280f5f9b6bSSuzuki K Poulose 229a06ae860SPratik Patel #define to_coresight_device(d) container_of(d, struct coresight_device, dev) 230a06ae860SPratik Patel 231a06ae860SPratik Patel #define source_ops(csdev) csdev->ops->source_ops 232a06ae860SPratik Patel #define sink_ops(csdev) csdev->ops->sink_ops 233a06ae860SPratik Patel #define link_ops(csdev) csdev->ops->link_ops 2348a091d84SSuzuki K Poulose #define helper_ops(csdev) csdev->ops->helper_ops 235835d722bSMike Leach #define ect_ops(csdev) csdev->ops->ect_ops 236a06ae860SPratik Patel 237a06ae860SPratik Patel /** 238a06ae860SPratik Patel * struct coresight_ops_sink - basic operations for a sink 239a06ae860SPratik Patel * Operations available for sinks 240a06ae860SPratik Patel * @enable: enables the sink. 241a06ae860SPratik Patel * @disable: disables the sink. 2422997aa40SMathieu Poirier * @alloc_buffer: initialises perf's ring buffer for trace collection. 2432997aa40SMathieu Poirier * @free_buffer: release memory allocated in @get_config. 2442997aa40SMathieu Poirier * @update_buffer: update buffer pointers after a trace session. 245a06ae860SPratik Patel */ 246a06ae860SPratik Patel struct coresight_ops_sink { 2473d6e8935SSuzuki K Poulose int (*enable)(struct coresight_device *csdev, u32 mode, void *data); 2486c817a95SMathieu Poirier int (*disable)(struct coresight_device *csdev); 249a0f08a6aSMathieu Poirier void *(*alloc_buffer)(struct coresight_device *csdev, 250a0f08a6aSMathieu Poirier struct perf_event *event, void **pages, 251a0f08a6aSMathieu Poirier int nr_pages, bool overwrite); 2522997aa40SMathieu Poirier void (*free_buffer)(void *config); 2537ec786adSSuzuki K Poulose unsigned long (*update_buffer)(struct coresight_device *csdev, 2542997aa40SMathieu Poirier struct perf_output_handle *handle, 2552997aa40SMathieu Poirier void *sink_config); 256a06ae860SPratik Patel }; 257a06ae860SPratik Patel 258a06ae860SPratik Patel /** 259a06ae860SPratik Patel * struct coresight_ops_link - basic operations for a link 260a06ae860SPratik Patel * Operations available for links. 261a06ae860SPratik Patel * @enable: enables flow between iport and oport. 262a06ae860SPratik Patel * @disable: disables flow between iport and oport. 263a06ae860SPratik Patel */ 264a06ae860SPratik Patel struct coresight_ops_link { 265a06ae860SPratik Patel int (*enable)(struct coresight_device *csdev, int iport, int oport); 266a06ae860SPratik Patel void (*disable)(struct coresight_device *csdev, int iport, int oport); 267a06ae860SPratik Patel }; 268a06ae860SPratik Patel 269a06ae860SPratik Patel /** 270a06ae860SPratik Patel * struct coresight_ops_source - basic operations for a source 271a06ae860SPratik Patel * Operations available for sources. 27252210c87SMathieu Poirier * @cpu_id: returns the value of the CPU number this component 27352210c87SMathieu Poirier * is associated to. 274a06ae860SPratik Patel * @trace_id: returns the value of the component's trace ID as known 275882d5e11SMathieu Poirier * to the HW. 2761d27ff5aSMathieu Poirier * @enable: enables tracing for a source. 277a06ae860SPratik Patel * @disable: disables tracing for a source. 278a06ae860SPratik Patel */ 279a06ae860SPratik Patel struct coresight_ops_source { 28052210c87SMathieu Poirier int (*cpu_id)(struct coresight_device *csdev); 281a06ae860SPratik Patel int (*trace_id)(struct coresight_device *csdev); 282882d5e11SMathieu Poirier int (*enable)(struct coresight_device *csdev, 28368905d73SMathieu Poirier struct perf_event *event, u32 mode); 28468905d73SMathieu Poirier void (*disable)(struct coresight_device *csdev, 28568905d73SMathieu Poirier struct perf_event *event); 286a06ae860SPratik Patel }; 287a06ae860SPratik Patel 2888a091d84SSuzuki K Poulose /** 2898a091d84SSuzuki K Poulose * struct coresight_ops_helper - Operations for a helper device. 2908a091d84SSuzuki K Poulose * 2918a091d84SSuzuki K Poulose * All operations could pass in a device specific data, which could 2928a091d84SSuzuki K Poulose * help the helper device to determine what to do. 2938a091d84SSuzuki K Poulose * 2948a091d84SSuzuki K Poulose * @enable : Enable the device 2958a091d84SSuzuki K Poulose * @disable : Disable the device 2968a091d84SSuzuki K Poulose */ 2978a091d84SSuzuki K Poulose struct coresight_ops_helper { 2988a091d84SSuzuki K Poulose int (*enable)(struct coresight_device *csdev, void *data); 2998a091d84SSuzuki K Poulose int (*disable)(struct coresight_device *csdev, void *data); 3008a091d84SSuzuki K Poulose }; 3018a091d84SSuzuki K Poulose 302835d722bSMike Leach /** 303835d722bSMike Leach * struct coresight_ops_ect - Ops for an embedded cross trigger device 304835d722bSMike Leach * 305835d722bSMike Leach * @enable : Enable the device 306835d722bSMike Leach * @disable : Disable the device 307835d722bSMike Leach */ 308835d722bSMike Leach struct coresight_ops_ect { 309835d722bSMike Leach int (*enable)(struct coresight_device *csdev); 310835d722bSMike Leach int (*disable)(struct coresight_device *csdev); 311835d722bSMike Leach }; 312835d722bSMike Leach 313a06ae860SPratik Patel struct coresight_ops { 314a06ae860SPratik Patel const struct coresight_ops_sink *sink_ops; 315a06ae860SPratik Patel const struct coresight_ops_link *link_ops; 316a06ae860SPratik Patel const struct coresight_ops_source *source_ops; 3178a091d84SSuzuki K Poulose const struct coresight_ops_helper *helper_ops; 318835d722bSMike Leach const struct coresight_ops_ect *ect_ops; 319a06ae860SPratik Patel }; 320a06ae860SPratik Patel 321a06ae860SPratik Patel #ifdef CONFIG_CORESIGHT 322a06ae860SPratik Patel extern struct coresight_device * 323a06ae860SPratik Patel coresight_register(struct coresight_desc *desc); 324a06ae860SPratik Patel extern void coresight_unregister(struct coresight_device *csdev); 325a06ae860SPratik Patel extern int coresight_enable(struct coresight_device *csdev); 326a06ae860SPratik Patel extern void coresight_disable(struct coresight_device *csdev); 327a06ae860SPratik Patel extern int coresight_timeout(void __iomem *addr, u32 offset, 328a06ae860SPratik Patel int position, int value); 3292478a6aeSSuzuki K Poulose 3302478a6aeSSuzuki K Poulose extern int coresight_claim_device(void __iomem *base); 3312478a6aeSSuzuki K Poulose extern int coresight_claim_device_unlocked(void __iomem *base); 3322478a6aeSSuzuki K Poulose 3332478a6aeSSuzuki K Poulose extern void coresight_disclaim_device(void __iomem *base); 3342478a6aeSSuzuki K Poulose extern void coresight_disclaim_device_unlocked(void __iomem *base); 3350f5f9b6bSSuzuki K Poulose extern char *coresight_alloc_device_name(struct coresight_dev_list *devs, 3360f5f9b6bSSuzuki K Poulose struct device *dev); 337f188b5e7SAndrew Murray 338f188b5e7SAndrew Murray extern bool coresight_loses_context_with_cpu(struct device *dev); 339a06ae860SPratik Patel #else 340a06ae860SPratik Patel static inline struct coresight_device * 341a06ae860SPratik Patel coresight_register(struct coresight_desc *desc) { return NULL; } 342a06ae860SPratik Patel static inline void coresight_unregister(struct coresight_device *csdev) {} 343a06ae860SPratik Patel static inline int 344a06ae860SPratik Patel coresight_enable(struct coresight_device *csdev) { return -ENOSYS; } 345a06ae860SPratik Patel static inline void coresight_disable(struct coresight_device *csdev) {} 346a06ae860SPratik Patel static inline int coresight_timeout(void __iomem *addr, u32 offset, 347a06ae860SPratik Patel int position, int value) { return 1; } 3482478a6aeSSuzuki K Poulose static inline int coresight_claim_device_unlocked(void __iomem *base) 3492478a6aeSSuzuki K Poulose { 3502478a6aeSSuzuki K Poulose return -EINVAL; 3512478a6aeSSuzuki K Poulose } 3522478a6aeSSuzuki K Poulose 3532478a6aeSSuzuki K Poulose static inline int coresight_claim_device(void __iomem *base) 3542478a6aeSSuzuki K Poulose { 3552478a6aeSSuzuki K Poulose return -EINVAL; 3562478a6aeSSuzuki K Poulose } 3572478a6aeSSuzuki K Poulose 3582478a6aeSSuzuki K Poulose static inline void coresight_disclaim_device(void __iomem *base) {} 3592478a6aeSSuzuki K Poulose static inline void coresight_disclaim_device_unlocked(void __iomem *base) {} 3602478a6aeSSuzuki K Poulose 361f188b5e7SAndrew Murray static inline bool coresight_loses_context_with_cpu(struct device *dev) 362f188b5e7SAndrew Murray { 363f188b5e7SAndrew Murray return false; 364f188b5e7SAndrew Murray } 365c61c4b5dSMathieu Poirier #endif 366c61c4b5dSMathieu Poirier 36791824db2SSuzuki K Poulose extern int coresight_get_cpu(struct device *dev); 368a06ae860SPratik Patel 369f03631daSSuzuki K Poulose struct coresight_platform_data *coresight_get_platform_data(struct device *dev); 370f03631daSSuzuki K Poulose 371a06ae860SPratik Patel #endif 372