diff options
| author | Satyajit Desai <sadesai@codeaurora.org> | 2016-10-07 18:06:50 -0700 |
|---|---|---|
| committer | Satyajit Desai <sadesai@codeaurora.org> | 2016-10-19 16:35:20 -0700 |
| commit | e96c109b73fbfdd127454155c7ebffd85bd3ed67 (patch) | |
| tree | 38ad52a7a0b2a5fa5fc83a225bc5b8e35f7af5b8 /drivers/hwtracing | |
| parent | 9e2d528dc47d04e98c5e6f1c4ef84fc268115d36 (diff) | |
coresight: set appropriate clock rate for coresight devices
For certain coresight devices probed via amba framework the clock
rate is not being set during probe time. The patch sets the rate
to an appropriate value instead of relying on default behavior.
Change-Id: I15607dcb06564a603910709fafb9eba563bf102c
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
Diffstat (limited to 'drivers/hwtracing')
| -rw-r--r-- | drivers/hwtracing/coresight/coresight-etm4x.c | 4 | ||||
| -rw-r--r-- | drivers/hwtracing/coresight/coresight-tmc.c | 4 | ||||
| -rw-r--r-- | drivers/hwtracing/coresight/coresight-tpiu.c | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index 5697ad3b1d13..a37b5ce9a6b2 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -2801,6 +2801,10 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) put_online_cpus(); + ret = clk_set_rate(adev->pclk, CORESIGHT_CLK_RATE_TRACE); + if (ret) + return ret; + pm_runtime_put(&adev->dev); mutex_lock(&drvdata->mutex); diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c index 306465ededf9..6eebe27d757c 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.c +++ b/drivers/hwtracing/coresight/coresight-tmc.c @@ -1890,6 +1890,10 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id) drvdata->size = readl_relaxed(drvdata->base + TMC_RSZ) * 4; } + ret = clk_set_rate(adev->pclk, CORESIGHT_CLK_RATE_TRACE); + if (ret) + return ret; + pm_runtime_put(&adev->dev); if (drvdata->config_type == TMC_CONFIG_TYPE_ETR) { diff --git a/drivers/hwtracing/coresight/coresight-tpiu.c b/drivers/hwtracing/coresight/coresight-tpiu.c index 7baa1e750a23..3fd080b94069 100644 --- a/drivers/hwtracing/coresight/coresight-tpiu.c +++ b/drivers/hwtracing/coresight/coresight-tpiu.c @@ -162,6 +162,9 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id) /* Disable tpiu to support older devices */ tpiu_disable_hw(drvdata); + ret = clk_set_rate(adev->pclk, CORESIGHT_CLK_RATE_TRACE); + if (ret) + return ret; pm_runtime_put(&adev->dev); |
