lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200501205728.152048-1-konradybcio@gmail.com>
Date:   Fri,  1 May 2020 22:57:26 +0200
From:   Konrad Dybcio <konradybcio@...il.com>
To:     skrzynka@...radybcio.pl
Cc:     Vincent Knecht <vincent.knecht@...loo.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] clk: qcom: smd: Add support for MSM8936 rpm clocks

From: Vincent Knecht <vincent.knecht@...loo.org>

Signed-off-by: Vincent Knecht <vincent.knecht@...loo.org>
---
 drivers/clk/qcom/clk-smd-rpm.c | 50 ++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/drivers/clk/qcom/clk-smd-rpm.c b/drivers/clk/qcom/clk-smd-rpm.c
index 52f63ad787ba9..4ac80d8ac6c25 100644
--- a/drivers/clk/qcom/clk-smd-rpm.c
+++ b/drivers/clk/qcom/clk-smd-rpm.c
@@ -452,6 +452,55 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8916 = {
 	.num_clks = ARRAY_SIZE(msm8916_clks),
 };
 
+/* msm8936 */
+DEFINE_CLK_SMD_RPM(msm8936, pcnoc_clk, pcnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 0);
+DEFINE_CLK_SMD_RPM(msm8936, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1);
+DEFINE_CLK_SMD_RPM(msm8936, bimc_clk, bimc_a_clk, QCOM_SMD_RPM_MEM_CLK, 0);
+DEFINE_CLK_SMD_RPM(msm8936, sysmmnoc_clk, sysmmnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 2);
+DEFINE_CLK_SMD_RPM_QDSS(msm8936, qdss_clk, qdss_a_clk, QCOM_SMD_RPM_MISC_CLK, 1);
+DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8936, bb_clk1, bb_clk1_a, 1);
+DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8936, bb_clk2, bb_clk2_a, 2);
+DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8936, rf_clk1, rf_clk1_a, 4);
+DEFINE_CLK_SMD_RPM_XO_BUFFER(msm8936, rf_clk2, rf_clk2_a, 5);
+DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8936, bb_clk1_pin, bb_clk1_a_pin, 1);
+DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8936, bb_clk2_pin, bb_clk2_a_pin, 2);
+DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8936, rf_clk1_pin, rf_clk1_a_pin, 4);
+DEFINE_CLK_SMD_RPM_XO_BUFFER_PINCTRL(msm8936, rf_clk2_pin, rf_clk2_a_pin, 5);
+
+static struct clk_smd_rpm *msm8936_clks[] = {
+		[RPM_SMD_PCNOC_CLK]		     = &msm8936_pcnoc_clk,
+		[RPM_SMD_PCNOC_A_CLK]		   = &msm8936_pcnoc_a_clk,
+		[RPM_SMD_SNOC_CLK]		      = &msm8936_snoc_clk,
+		[RPM_SMD_SNOC_A_CLK]		    = &msm8936_snoc_a_clk,
+		[RPM_SMD_BIMC_CLK]		      = &msm8936_bimc_clk,
+		[RPM_SMD_BIMC_A_CLK]		    = &msm8936_bimc_a_clk,
+		[RPM_SMD_SYSMMNOC_CLK]		  = &msm8936_sysmmnoc_clk,
+		[RPM_SMD_SYSMMNOC_A_CLK]		= &msm8936_sysmmnoc_a_clk,
+		[RPM_SMD_QDSS_CLK]		      = &msm8936_qdss_clk,
+		[RPM_SMD_QDSS_A_CLK]		    = &msm8936_qdss_a_clk,
+		[RPM_SMD_BB_CLK1]		       = &msm8936_bb_clk1,
+		[RPM_SMD_BB_CLK1_A]		     = &msm8936_bb_clk1_a,
+		[RPM_SMD_BB_CLK2]		       = &msm8936_bb_clk2,
+		[RPM_SMD_BB_CLK2_A]		     = &msm8936_bb_clk2_a,
+		[RPM_SMD_RF_CLK1]		       = &msm8936_rf_clk1,
+		[RPM_SMD_RF_CLK1_A]		     = &msm8936_rf_clk1_a,
+		[RPM_SMD_RF_CLK2]		       = &msm8936_rf_clk2,
+		[RPM_SMD_RF_CLK2_A]		     = &msm8936_rf_clk2_a,
+		[RPM_SMD_BB_CLK1_PIN]		   = &msm8936_bb_clk1_pin,
+		[RPM_SMD_BB_CLK1_A_PIN]		 = &msm8936_bb_clk1_a_pin,
+		[RPM_SMD_BB_CLK2_PIN]		   = &msm8936_bb_clk2_pin,
+		[RPM_SMD_BB_CLK2_A_PIN]		 = &msm8936_bb_clk2_a_pin,
+		[RPM_SMD_RF_CLK1_PIN]		   = &msm8936_rf_clk1_pin,
+		[RPM_SMD_RF_CLK1_A_PIN]		 = &msm8936_rf_clk1_a_pin,
+		[RPM_SMD_RF_CLK2_PIN]		   = &msm8936_rf_clk2_pin,
+		[RPM_SMD_RF_CLK2_A_PIN]		 = &msm8936_rf_clk2_a_pin,
+};
+
+static const struct rpm_smd_clk_desc rpm_clk_msm8936 = {
+		.clks = msm8936_clks,
+		.num_clks = ARRAY_SIZE(msm8936_clks),
+};
+
 /* msm8974 */
 DEFINE_CLK_SMD_RPM(msm8974, pnoc_clk, pnoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 0);
 DEFINE_CLK_SMD_RPM(msm8974, snoc_clk, snoc_a_clk, QCOM_SMD_RPM_BUS_CLK, 1);
@@ -768,6 +817,7 @@ static const struct rpm_smd_clk_desc rpm_clk_msm8998 = {
 
 static const struct of_device_id rpm_smd_clk_match_table[] = {
 	{ .compatible = "qcom,rpmcc-msm8916", .data = &rpm_clk_msm8916 },
+	{ .compatible = "qcom,rpmcc-msm8936", .data = &rpm_clk_msm8936 },
 	{ .compatible = "qcom,rpmcc-msm8974", .data = &rpm_clk_msm8974 },
 	{ .compatible = "qcom,rpmcc-msm8976", .data = &rpm_clk_msm8976 },
 	{ .compatible = "qcom,rpmcc-msm8996", .data = &rpm_clk_msm8996 },
-- 
2.26.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ