mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 14:43:27 -04:00
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:
parent
731f76b0e7
commit
b1d5974213
1 changed files with 9 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue