diff options
author | Archit Taneja <architt@codeaurora.org> | 2015-11-30 07:17:17 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2015-12-14 10:39:59 -0500 |
commit | e6c4c78c10d87a99f298a2455a4aaede5743bb4f (patch) | |
tree | 2ca0933e4373626474320bc287c5fbb9193ed1a5 /drivers | |
parent | af6d0423dfe33ca3bb9a0d1f50eb165b087fd88e (diff) |
drm/msm/dsi: Don't get byte/pixel source clocks from DT
We retrieve the byte and pixel source clocks (RCG clocks) in the dsi
driver via DT. These are needed so that we can re-parent these source
clocks if we want to drive it using a different DSI PLL.
We shouldn't get these via DT because they aren't clocks that directly
serve as inputs to the dsi host.
Fortunately, there is a static parent-child link between the
byte_clk_src/pixel_clk_src and byte_clk/pixel_clk clocks. So, we can
retrieve the source clocks via clk_get_parent.
Do this instead of retrieving via DT.
Cc: Rob Herring <robh@kernel.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi_host.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 4c49868efcda..aec97c8e5ac4 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c | |||
@@ -356,20 +356,17 @@ static int dsi_clk_init(struct msm_dsi_host *msm_host) | |||
356 | goto exit; | 356 | goto exit; |
357 | } | 357 | } |
358 | 358 | ||
359 | msm_host->byte_clk_src = devm_clk_get(dev, "byte_clk_src"); | 359 | msm_host->byte_clk_src = clk_get_parent(msm_host->byte_clk); |
360 | if (IS_ERR(msm_host->byte_clk_src)) { | 360 | if (!msm_host->byte_clk_src) { |
361 | ret = PTR_ERR(msm_host->byte_clk_src); | 361 | ret = -ENODEV; |
362 | pr_err("%s: can't find byte_clk_src. ret=%d\n", __func__, ret); | 362 | pr_err("%s: can't find byte_clk_src. ret=%d\n", __func__, ret); |
363 | msm_host->byte_clk_src = NULL; | ||
364 | goto exit; | 363 | goto exit; |
365 | } | 364 | } |
366 | 365 | ||
367 | msm_host->pixel_clk_src = devm_clk_get(dev, "pixel_clk_src"); | 366 | msm_host->pixel_clk_src = clk_get_parent(msm_host->pixel_clk); |
368 | if (IS_ERR(msm_host->pixel_clk_src)) { | 367 | if (!msm_host->pixel_clk_src) { |
369 | ret = PTR_ERR(msm_host->pixel_clk_src); | 368 | ret = -ENODEV; |
370 | pr_err("%s: can't find pixel_clk_src. ret=%d\n", __func__, ret); | 369 | pr_err("%s: can't find pixel_clk_src. ret=%d\n", __func__, ret); |
371 | msm_host->pixel_clk_src = NULL; | ||
372 | goto exit; | ||
373 | } | 370 | } |
374 | 371 | ||
375 | exit: | 372 | exit: |