Hi
On Tue, 15 Jan 2019 at 18:08, Mathieu Poirier mathieu.poirier@linaro.org wrote:
On Wed, Jan 09, 2019 at 10:54:35PM +0000, Mike Leach wrote:
Adds in additional common function declarations to internal CoreSight headers to enable additional CTI funtionality.
Signed-off-by: Mike Leach mike.leach@linaro.org
drivers/hwtracing/coresight/coresight-priv.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h index 579f34943bf1..53fad3f070a7 100644 --- a/drivers/hwtracing/coresight/coresight-priv.h +++ b/drivers/hwtracing/coresight/coresight-priv.h @@ -22,6 +22,7 @@ #define CORESIGHT_LAR 0xfb0 #define CORESIGHT_LSR 0xfb4 #define CORESIGHT_AUTHSTATUS 0xfb8 +#define CORESIGHT_DEVARCH 0xfbc #define CORESIGHT_DEVID 0xfc8 #define CORESIGHT_DEVTYPE 0xfcc
@@ -159,4 +160,13 @@ static inline int etm_readl_cp14(u32 off, unsigned int *val) { return 0; } static inline int etm_writel_cp14(u32 off, u32 val) { return 0; } #endif
+#ifdef CONFIG_CORESIGHT_CTI +extern int cti_add_assoc_to_csdev(struct coresight_device *csdev); +extern void cti_device_release(struct device *dev); +#else +static inline int cti_add_assoc_to_csdev(struct coresight_device *csdev) +{ return 0; }
The above should return a negative error code since the functionatlity is not present. Returning 0 can mislead a user in thinking that everything is fine.
This code is guarded by the CONFIG_CORESIGHT_CTI define. Thus if there is no CTI driver configured then this function must return 0 to allow the rest of the CoreSight infrastructure to work. This mirrors the operation of the definitions guarded by the CONFIG_CORESIGHT_ETMV3 define above.
Regards
Mike
+static inline void cti_device_release(struct device *dev) {}; +#endif
#endif
2.19.1
CoreSight mailing list CoreSight@lists.linaro.org https://lists.linaro.org/mailman/listinfo/coresight