MSM8960 LCC fixes
Subsystems (3)
cover MSM8960 LCC fixes
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(-)
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 1/3 clk: qcom: Fix slimbus n and m val offsets
These shifts were copy/pasted from the pcm which is a different size RCG. Use the correct offsets so that slimbus rates are correct.
--- drivers/clk/qcom/lcc-msm8960.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/qcom/lcc-msm8960.c +2 -2
@@ -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 = {
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 2/3 clk: qcom: lcc-msm8960: Fix PLL rate detection
In reply to Stephen Boydregmap_read() returns 0 on success, not the value of the register that is read. Fix it so we properly detect the frequency plan.
controller (LCC) driver"
--- drivers/clk/qcom/lcc-msm8960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/lcc-msm8960.c +1 -1
@@ -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;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 3/3 clk: qcom: Add PLL4 vote clock
In reply to Stephen BoydThis clock is needed for most audio clock frequencies. Add it.
--- drivers/clk/qcom/gcc-msm8960.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/clk/qcom/gcc-msm8960.c +13 -0
@@ -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,
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Mike Turquette
AppliedQuoting Stephen Boyd (2015-01-29 15:38:10)
Quoted 2 lines
A couple of small fixes found while testing the audio clock control on apq8064.
Applied to clk-fixes.
Regards,
Mike
Quoted 14 lines
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 clockdrivers/clk/qcom/gcc-msm8960.c | 13 +++++++++++++ drivers/clk/qcom/lcc-msm8960.c | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-)Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project