Loading drivers/hwtracing/coresight/coresight.c +16 −3 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012, The Linux Foundation. All rights reserved. * Copyright (c) 2012, 2019 The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading @@ -14,6 +14,7 @@ #include <linux/stringhash.h> #include <linux/mutex.h> #include <linux/clk.h> #include <dt-bindings/clock/qcom,aop-qmp.h> #include <linux/coresight.h> #include <linux/of_platform.h> #include <linux/delay.h> Loading Loading @@ -1194,6 +1195,14 @@ struct coresight_device *coresight_register(struct coresight_desc *desc) int nr_refcnts = 1; atomic_t *refcnts = NULL; struct coresight_device *csdev; struct clk *pclk; pclk = clk_get(desc->dev, "apb_pclk"); if (!IS_ERR(pclk)) { ret = clk_set_rate(pclk, QDSS_CLK_LEVEL_DYNAMIC); if (ret) dev_err(desc->dev, "clk set rate failed\n"); } csdev = kzalloc(sizeof(*csdev), GFP_KERNEL); if (!csdev) { Loading Loading @@ -1317,12 +1326,16 @@ static inline int coresight_search_device_idx(struct coresight_dev_list *dict, * duplicate indices for the same device (e.g, if we defer probing of * a device due to dependencies), in case the index is requested again. */ char *coresight_alloc_device_name(struct coresight_dev_list *dict, const char *coresight_alloc_device_name(struct coresight_dev_list *dict, struct device *dev) { int idx; char *name = NULL; const char *name = NULL; struct fwnode_handle **list; struct device_node *node = dev->of_node; if (!of_property_read_string(node, "coresight-name", &name)) return name; mutex_lock(&coresight_mutex); Loading include/linux/coresight.h +2 −2 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2012, The Linux Foundation. All rights reserved. * Copyright (c) 2012, 2019 The Linux Foundation. All rights reserved. */ #ifndef _LINUX_CORESIGHT_H Loading Loading @@ -283,7 +283,7 @@ extern int coresight_claim_device_unlocked(void __iomem *base); extern void coresight_disclaim_device(void __iomem *base); extern void coresight_disclaim_device_unlocked(void __iomem *base); extern char *coresight_alloc_device_name(struct coresight_dev_list *devs, extern const char *coresight_alloc_device_name(struct coresight_dev_list *devs, struct device *dev); #else static inline struct coresight_device * Loading Loading
drivers/hwtracing/coresight/coresight.c +16 −3 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2012, The Linux Foundation. All rights reserved. * Copyright (c) 2012, 2019 The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading @@ -14,6 +14,7 @@ #include <linux/stringhash.h> #include <linux/mutex.h> #include <linux/clk.h> #include <dt-bindings/clock/qcom,aop-qmp.h> #include <linux/coresight.h> #include <linux/of_platform.h> #include <linux/delay.h> Loading Loading @@ -1194,6 +1195,14 @@ struct coresight_device *coresight_register(struct coresight_desc *desc) int nr_refcnts = 1; atomic_t *refcnts = NULL; struct coresight_device *csdev; struct clk *pclk; pclk = clk_get(desc->dev, "apb_pclk"); if (!IS_ERR(pclk)) { ret = clk_set_rate(pclk, QDSS_CLK_LEVEL_DYNAMIC); if (ret) dev_err(desc->dev, "clk set rate failed\n"); } csdev = kzalloc(sizeof(*csdev), GFP_KERNEL); if (!csdev) { Loading Loading @@ -1317,12 +1326,16 @@ static inline int coresight_search_device_idx(struct coresight_dev_list *dict, * duplicate indices for the same device (e.g, if we defer probing of * a device due to dependencies), in case the index is requested again. */ char *coresight_alloc_device_name(struct coresight_dev_list *dict, const char *coresight_alloc_device_name(struct coresight_dev_list *dict, struct device *dev) { int idx; char *name = NULL; const char *name = NULL; struct fwnode_handle **list; struct device_node *node = dev->of_node; if (!of_property_read_string(node, "coresight-name", &name)) return name; mutex_lock(&coresight_mutex); Loading
include/linux/coresight.h +2 −2 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2012, The Linux Foundation. All rights reserved. * Copyright (c) 2012, 2019 The Linux Foundation. All rights reserved. */ #ifndef _LINUX_CORESIGHT_H Loading Loading @@ -283,7 +283,7 @@ extern int coresight_claim_device_unlocked(void __iomem *base); extern void coresight_disclaim_device(void __iomem *base); extern void coresight_disclaim_device_unlocked(void __iomem *base); extern char *coresight_alloc_device_name(struct coresight_dev_list *devs, extern const char *coresight_alloc_device_name(struct coresight_dev_list *devs, struct device *dev); #else static inline struct coresight_device * Loading