Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a787e6d authored by Satyajit Desai's avatar Satyajit Desai Committed by Gerrit - the friendly Code Review server
Browse files

coresight: Set clk rate for all coresight devices



Call clk driver api to set the clk rate as dynamic. Without
the call, clk rate is set to the default rate(MIN) for all
coresight devices.

Change-Id: Ib83e1bd5954f42f9d4ff07324375c6197eab258a
Signed-off-by: default avatarSatyajit Desai <sadesai@codeaurora.org>
Signed-off-by: default avatarRama Aparna Mallavarapu <aparnam@codeaurora.org>
parent 29a7fcd4
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -13,6 +13,7 @@
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/mutex.h>
#include <linux/clk.h>
#include <linux/clk.h>
#include <dt-bindings/clock/qcom,aop-qmp.h>
#include <linux/coresight.h>
#include <linux/coresight.h>
#include <linux/of_platform.h>
#include <linux/of_platform.h>
#include <linux/delay.h>
#include <linux/delay.h>
@@ -1046,6 +1047,14 @@ struct coresight_device *coresight_register(struct coresight_desc *desc)
	atomic_t *refcnts = NULL;
	atomic_t *refcnts = NULL;
	struct coresight_device *csdev;
	struct coresight_device *csdev;
	struct coresight_connection *conns = NULL;
	struct coresight_connection *conns = NULL;
	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);
	csdev = kzalloc(sizeof(*csdev), GFP_KERNEL);
	if (!csdev) {
	if (!csdev) {