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: Satyajit Desai <sadesai@codeaurora.org>
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
This commit is contained in:
Satyajit Desai 2017-04-24 19:25:10 -07:00 • committed by Tingwei Zhang
commit b1d5974213

View file

@ -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>
@ -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) {