Skip to contentSkip to conversation

clk: qcom: clk-rpmh: Add QCOM RPMh clock driver

PATCH Superseded Taniya Das 2 participants 3 messages May 3, 2018

Subsystems (3)

v7 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Taniya Das

author
#0 lore raw

v7 cover clk: qcom: clk-rpmh: Add QCOM RPMh clock driver

[v7]
* Addressed comments from Stephen
- Keep only xo_board as clock parent.
- Associate divs from SoC specific clock listing to calculate the clock rate.
- Add back the recalc_rate clock ops to return the clock rate based on the parent rate and div associated with clock.
- void cast kept to avoid compiler warnings.

[v6]
* Addressed comments from Rob
* Addressed comments from Stephen

[v5]
* Addressed comments from Stephen
* Introduced a new DT property to take clock divs

[v4]
* Addressed comments from Stephen

[v3]
* Addressed documentation & code review comments from Bjorn
* Addressed bindings comments from Rob
* Updated the patch series order for bindings

[v2]
* Addressed comments from Stephen
* Addressed comments from Evan

This patch series adds a driver and device tree documentation binding for the clock control via Resource Power Manager-hardened (RPMh) on some Qualcomm Technologies, Inc, SoCs such as SDM845. The clock RPMh driver would send requests for the RPMh managed clock resources.

The RPMh clock driver depends upon the RPMh driver [1] and command DB driver [2] which are both still undergoing review.

Thanks,
Taniya

[1]: https://lkml.org/lkml/2018/3/9/979
[2]: https://lkml.org/lkml/2018/3/14/787

Taniya Das (1):
clk: qcom: clk-rpmh: Add QCOM RPMh clock driver

 drivers/clk/qcom/Kconfig    |   9 ++
 drivers/clk/qcom/Makefile   |   1 +
 drivers/clk/qcom/clk-rpmh.c | 368 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 378 insertions(+)
 create mode 100644 drivers/clk/qcom/clk-rpmh.c

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

author
#1 lore raw

PATCH v7 1/1 clk: qcom: clk-rpmh: Add QCOM RPMh clock driver

Add the RPMh clock driver to control the RPMh managed clock resources on some of the Qualcomm Technologies, Inc. SoCs.

---
 drivers/clk/qcom/Kconfig    |   9 ++
 drivers/clk/qcom/Makefile   |   1 +
 drivers/clk/qcom/clk-rpmh.c | 368 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 378 insertions(+)
 create mode 100644 drivers/clk/qcom/clk-rpmh.c
drivers/clk/qcom/Kconfig +9 -0
index e42e1af..627e6e1 100644
@@ -59,6 +59,15 @@ config QCOM_CLK_SMD_RPM
 	  Say Y if you want to support the clocks exposed by the RPM on
 	  platforms such as apq8016, apq8084, msm8974 etc.
 
+config QCOM_CLK_RPMH
+	tristate "RPMh Clock Driver"
+	depends on COMMON_CLK_QCOM && QCOM_RPMH
+	help
+	 RPMh manages shared resources on some Qualcomm Technologies, Inc.
+	 SoCs. It accepts requests from other hardware subsystems via RSC.
+	 Say Y if you want to support the clocks exposed by RPMh on
+	 platforms such as SDM845.
+
 config APQ_GCC_8084
 	tristate "APQ8084 Global Clock Controller"
 	select QCOM_GDSC
drivers/clk/qcom/Makefile +1 -0
index 7c09ab1..246a721 100644
@@ -37,5 +37,6 @@ obj-$(CONFIG_MSM_MMCC_8996) += mmcc-msm8996.o
 obj-$(CONFIG_QCOM_A53PLL) += a53-pll.o
 obj-$(CONFIG_QCOM_CLK_APCS_MSM8916) += apcs-msm8916.o
 obj-$(CONFIG_QCOM_CLK_RPM) += clk-rpm.o
+obj-$(CONFIG_QCOM_CLK_RPMH) += clk-rpmh.o
 obj-$(CONFIG_QCOM_CLK_SMD_RPM) += clk-smd-rpm.o
 obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o
drivers/clk/qcom/clk-rpmh.c new file +368 -0

368 lines not on this page · raw message

--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc.is a member of the Code Aurora Forum, hosted by the Linux Foundation.

#2 lore raw

Hi,

drivers/clk/qcom/clk-rpmh.c line 281

Quoted 7 lines · Taniya Das
drivers/clk/qcom/clk-rpmh.c new file +7 -0
+       rpmh_client = rpmh_get_client(pdev);
+       if (IS_ERR(rpmh_client)) {
+               ret = PTR_ERR(rpmh_client);
+               dev_err(&pdev->dev, "Failed to request RPMh client, ret=%d\n",
+                                                                       ret);
+               return ret;
+       }

Please rebase atop the latest RPMh code (v7). There is no more rpmh_get_client(). If you want help doing this, please see
<http://crosreview.com/1042987> which contains all the changes to work with v7.

-Doug