--- zzzz-none-000/linux-4.4.60/include/linux/coresight.h 2017-04-08 07:53:53.000000000 +0000 +++ scorpion-7490-727/linux-4.4.60/include/linux/coresight.h 2021-02-04 17:41:59.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012, 2016 The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -94,6 +94,7 @@ connected to. * @nr_outport: number of output ports for this component. * @clk: The clock this component is associated to. + * @default_sink: Flag to set default sink */ struct coresight_platform_data { int cpu; @@ -104,6 +105,7 @@ int *child_ports; int nr_outport; struct clk *clk; + bool default_sink; }; /** @@ -185,10 +187,12 @@ * Operations available for sinks * @enable: enables the sink. * @disable: disables the sink. + * @abort: captures sink trace on abort */ struct coresight_ops_sink { int (*enable)(struct coresight_device *csdev); void (*disable)(struct coresight_device *csdev); + void (*abort)(struct coresight_device *csdev); }; /** @@ -230,6 +234,9 @@ extern void coresight_disable(struct coresight_device *csdev); extern int coresight_timeout(void __iomem *addr, u32 offset, int position, int value); +extern void coresight_abort(void); +extern void register_usb_qdss_open(void *fn); +extern void register_usb_qdss_close(void *fn); #else static inline struct coresight_device * coresight_register(struct coresight_desc *desc) { return NULL; } @@ -239,14 +246,21 @@ static inline void coresight_disable(struct coresight_device *csdev) {} static inline int coresight_timeout(void __iomem *addr, u32 offset, int position, int value) { return 1; } +static inline void coresight_abort(void) {} +static inline void register_usb_qdss_open(void *fn) {} +static inline void register_usb_qdss_close(void *fn) {} #endif -#ifdef CONFIG_OF +#if defined(CONFIG_OF) && defined(CONFIG_CORESIGHT) extern struct coresight_platform_data *of_get_coresight_platform_data( struct device *dev, struct device_node *node); +extern struct coresight_cti_data *of_get_coresight_cti_data( + struct device *dev, struct device_node *node); #else static inline struct coresight_platform_data *of_get_coresight_platform_data( struct device *dev, struct device_node *node) { return NULL; } +static inline struct coresight_cti_data *of_get_coresight_cti_data( + struct device *dev, struct device_node *node) { return NULL; } #endif #ifdef CONFIG_PID_NS