180-clk-qcom-Always-add-factor-clock-for-xo-clocks.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From patchwork Wed Nov 2 15:56:58 2016
  2. Content-Type: text/plain; charset="utf-8"
  3. MIME-Version: 1.0
  4. Content-Transfer-Encoding: 7bit
  5. Subject: [v9,3/3] clk: qcom: Always add factor clock for xo clocks
  6. From: Georgi Djakov <georgi.djakov@linaro.org>
  7. X-Patchwork-Id: 9409421
  8. Message-Id: <20161102155658.32203-4-georgi.djakov@linaro.org>
  9. To: sboyd@codeaurora.org, mturquette@baylibre.com
  10. Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
  11. robh+dt@kernel.org, mark.rutland@arm.com,
  12. linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
  13. georgi.djakov@linaro.org
  14. Date: Wed, 2 Nov 2016 17:56:58 +0200
  15. Currently the RPM/RPM-SMD clock drivers do not register the xo clocks,
  16. so we should always add factor clock. When we later add xo clocks support
  17. into the drivers, we should update this function to skip registration.
  18. By doing so we avoid any DT dependencies.
  19. Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
  20. ---
  21. drivers/clk/qcom/common.c | 15 ++++++---------
  22. 1 file changed, 6 insertions(+), 9 deletions(-)
  23. --
  24. To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
  25. the body of a message to majordomo@vger.kernel.org
  26. More majordomo info at http://vger.kernel.org/majordomo-info.html
  27. --- a/drivers/clk/qcom/common.c
  28. +++ b/drivers/clk/qcom/common.c
  29. @@ -154,15 +154,12 @@ int qcom_cc_register_board_clk(struct de
  30. const char *name, unsigned long rate)
  31. {
  32. bool add_factor = true;
  33. - struct device_node *node;
  34. - /* The RPM clock driver will add the factor clock if present */
  35. - if (IS_ENABLED(CONFIG_QCOM_RPMCC)) {
  36. - node = of_find_compatible_node(NULL, NULL, "qcom,rpmcc");
  37. - if (of_device_is_available(node))
  38. - add_factor = false;
  39. - of_node_put(node);
  40. - }
  41. + /*
  42. + * TODO: The RPM clock driver currently does not support the xo clock.
  43. + * When xo is added to the RPM clock driver, we should change this
  44. + * function to skip registration of xo factor clocks.
  45. + */
  46. return _qcom_cc_register_board_clk(dev, path, name, rate, add_factor);
  47. }