public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] MSM8960 LCC fixes
@ 2015-01-29 23:38 Stephen Boyd
  2015-01-29 23:38 ` [PATCH 1/3] clk: qcom: Fix slimbus n and m val offsets Stephen Boyd
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Stephen Boyd @ 2015-01-29 23:38 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd; +Cc: linux-kernel, linux-arm-msm

A couple of small fixes found while testing the audio clock control
on apq8064.

Stephen Boyd (3):
  clk: qcom: lcc-msm8960: Fix slimbus n and m val offsets
  clk: qcom: lcc-msm8960: Fix PLL rate detection
  clk: qcom: Add PLL4 vote clock

 drivers/clk/qcom/gcc-msm8960.c | 13 +++++++++++++
 drivers/clk/qcom/lcc-msm8960.c |  6 +++---
 2 files changed, 16 insertions(+), 3 deletions(-)

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] clk: qcom: Fix slimbus n and m val offsets
  2015-01-29 23:38 [PATCH 0/3] MSM8960 LCC fixes Stephen Boyd
@ 2015-01-29 23:38 ` Stephen Boyd
  2015-01-29 23:38 ` [PATCH 2/3] clk: qcom: lcc-msm8960: Fix PLL rate detection Stephen Boyd
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2015-01-29 23:38 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd; +Cc: linux-kernel, linux-arm-msm

These shifts were copy/pasted from the pcm which is a different
size RCG. Use the correct offsets so that slimbus rates are
correct.

Fixes: b82875ee07e5 "clk: qcom: Add MSM8960/APQ8064 LPASS clock controller (LCC) driver"
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/clk/qcom/lcc-msm8960.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/qcom/lcc-msm8960.c b/drivers/clk/qcom/lcc-msm8960.c
index a75a408cfccd..705e4d5bb6c7 100644
--- a/drivers/clk/qcom/lcc-msm8960.c
+++ b/drivers/clk/qcom/lcc-msm8960.c
@@ -417,8 +417,8 @@ static struct clk_rcg slimbus_src = {
 		.mnctr_en_bit = 8,
 		.mnctr_reset_bit = 7,
 		.mnctr_mode_shift = 5,
-		.n_val_shift = 16,
-		.m_val_shift = 16,
+		.n_val_shift = 24,
+		.m_val_shift = 8,
 		.width = 8,
 	},
 	.p = {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] clk: qcom: lcc-msm8960: Fix PLL rate detection
  2015-01-29 23:38 [PATCH 0/3] MSM8960 LCC fixes Stephen Boyd
  2015-01-29 23:38 ` [PATCH 1/3] clk: qcom: Fix slimbus n and m val offsets Stephen Boyd
@ 2015-01-29 23:38 ` Stephen Boyd
  2015-01-29 23:38 ` [PATCH 3/3] clk: qcom: Add PLL4 vote clock Stephen Boyd
  2015-02-25 20:08 ` [PATCH 0/3] MSM8960 LCC fixes Mike Turquette
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2015-01-29 23:38 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd; +Cc: linux-kernel, linux-arm-msm

regmap_read() returns 0 on success, not the value of the register
that is read. Fix it so we properly detect the frequency plan.

Fixes: b82875ee07e5 "clk: qcom: Add MSM8960/APQ8064 LPASS clock
controller (LCC) driver"
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/clk/qcom/lcc-msm8960.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/lcc-msm8960.c b/drivers/clk/qcom/lcc-msm8960.c
index 705e4d5bb6c7..3ecade0de9d2 100644
--- a/drivers/clk/qcom/lcc-msm8960.c
+++ b/drivers/clk/qcom/lcc-msm8960.c
@@ -547,7 +547,7 @@ static int lcc_msm8960_probe(struct platform_device *pdev)
 		return PTR_ERR(regmap);
 
 	/* Use the correct frequency plan depending on speed of PLL4 */
-	val = regmap_read(regmap, 0x4, &val);
+	regmap_read(regmap, 0x4, &val);
 	if (val == 0x12) {
 		slimbus_src.freq_tbl = clk_tbl_aif_osr_492;
 		mi2s_osr_src.freq_tbl = clk_tbl_aif_osr_492;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] clk: qcom: Add PLL4 vote clock
  2015-01-29 23:38 [PATCH 0/3] MSM8960 LCC fixes Stephen Boyd
  2015-01-29 23:38 ` [PATCH 1/3] clk: qcom: Fix slimbus n and m val offsets Stephen Boyd
  2015-01-29 23:38 ` [PATCH 2/3] clk: qcom: lcc-msm8960: Fix PLL rate detection Stephen Boyd
@ 2015-01-29 23:38 ` Stephen Boyd
  2015-02-25 20:08 ` [PATCH 0/3] MSM8960 LCC fixes Mike Turquette
  3 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2015-01-29 23:38 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd; +Cc: linux-kernel, linux-arm-msm

This clock is needed for most audio clock frequencies. Add it.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/clk/qcom/gcc-msm8960.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c
index b0b562b9ce0e..e60feffc10a1 100644
--- a/drivers/clk/qcom/gcc-msm8960.c
+++ b/drivers/clk/qcom/gcc-msm8960.c
@@ -48,6 +48,17 @@ static struct clk_pll pll3 = {
 	},
 };
 
+static struct clk_regmap pll4_vote = {
+	.enable_reg = 0x34c0,
+	.enable_mask = BIT(4),
+	.hw.init = &(struct clk_init_data){
+		.name = "pll4_vote",
+		.parent_names = (const char *[]){ "pll4" },
+		.num_parents = 1,
+		.ops = &clk_pll_vote_ops,
+	},
+};
+
 static struct clk_pll pll8 = {
 	.l_reg = 0x3144,
 	.m_reg = 0x3148,
@@ -3023,6 +3034,7 @@ static struct clk_branch rpm_msg_ram_h_clk = {
 
 static struct clk_regmap *gcc_msm8960_clks[] = {
 	[PLL3] = &pll3.clkr,
+	[PLL4_VOTE] = &pll4_vote,
 	[PLL8] = &pll8.clkr,
 	[PLL8_VOTE] = &pll8_vote,
 	[PLL14] = &pll14.clkr,
@@ -3247,6 +3259,7 @@ static const struct qcom_reset_map gcc_msm8960_resets[] = {
 
 static struct clk_regmap *gcc_apq8064_clks[] = {
 	[PLL3] = &pll3.clkr,
+	[PLL4_VOTE] = &pll4_vote,
 	[PLL8] = &pll8.clkr,
 	[PLL8_VOTE] = &pll8_vote,
 	[PLL14] = &pll14.clkr,
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] MSM8960 LCC fixes
  2015-01-29 23:38 [PATCH 0/3] MSM8960 LCC fixes Stephen Boyd
                   ` (2 preceding siblings ...)
  2015-01-29 23:38 ` [PATCH 3/3] clk: qcom: Add PLL4 vote clock Stephen Boyd
@ 2015-02-25 20:08 ` Mike Turquette
  3 siblings, 0 replies; 5+ messages in thread
From: Mike Turquette @ 2015-02-25 20:08 UTC (permalink / raw)
  To: Stephen Boyd, Stephen Boyd; +Cc: linux-kernel, linux-arm-msm

Quoting Stephen Boyd (2015-01-29 15:38:10)
> A couple of small fixes found while testing the audio clock control
> on apq8064.

Applied to clk-fixes.

Regards,
Mike

> 
> Stephen Boyd (3):
>   clk: qcom: lcc-msm8960: Fix slimbus n and m val offsets
>   clk: qcom: lcc-msm8960: Fix PLL rate detection
>   clk: qcom: Add PLL4 vote clock
> 
>  drivers/clk/qcom/gcc-msm8960.c | 13 +++++++++++++
>  drivers/clk/qcom/lcc-msm8960.c |  6 +++---
>  2 files changed, 16 insertions(+), 3 deletions(-)
> 
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-25 20:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 23:38 [PATCH 0/3] MSM8960 LCC fixes Stephen Boyd
2015-01-29 23:38 ` [PATCH 1/3] clk: qcom: Fix slimbus n and m val offsets Stephen Boyd
2015-01-29 23:38 ` [PATCH 2/3] clk: qcom: lcc-msm8960: Fix PLL rate detection Stephen Boyd
2015-01-29 23:38 ` [PATCH 3/3] clk: qcom: Add PLL4 vote clock Stephen Boyd
2015-02-25 20:08 ` [PATCH 0/3] MSM8960 LCC fixes Mike Turquette

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox