Commit 3d883e89 authored by Stephen Boyd's avatar Stephen Boyd

Merge tag 'clk-meson-fixes-v5.4-1' of https://github.com/BayLibre/clk-meson into clk-fixes

Pull first round of amlogic clock fixes from Jerome Brunet:

 - This fixes the clock rate propagation for the g12a cpu and gxbb adc clocks.

* tag 'clk-meson-fixes-v5.4-1' of https://github.com/BayLibre/clk-meson:
  clk: meson: g12a: set CLK_MUX_ROUND_CLOSEST on the cpu clock muxes
  clk: meson: g12a: fix cpu clock rate setting
  clk: meson: gxbb: let sar_adc_clk_div set the parent clock rate
parents 2200ab6a 90b171f6
...@@ -343,6 +343,7 @@ static struct clk_regmap g12a_cpu_clk_premux0 = { ...@@ -343,6 +343,7 @@ static struct clk_regmap g12a_cpu_clk_premux0 = {
.offset = HHI_SYS_CPU_CLK_CNTL0, .offset = HHI_SYS_CPU_CLK_CNTL0,
.mask = 0x3, .mask = 0x3,
.shift = 0, .shift = 0,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpu_clk_dyn0_sel", .name = "cpu_clk_dyn0_sel",
...@@ -353,8 +354,7 @@ static struct clk_regmap g12a_cpu_clk_premux0 = { ...@@ -353,8 +354,7 @@ static struct clk_regmap g12a_cpu_clk_premux0 = {
{ .hw = &g12a_fclk_div3.hw }, { .hw = &g12a_fclk_div3.hw },
}, },
.num_parents = 3, .num_parents = 3,
/* This sub-tree is used a parking clock */ .flags = CLK_SET_RATE_PARENT,
.flags = CLK_SET_RATE_NO_REPARENT,
}, },
}; };
...@@ -410,6 +410,7 @@ static struct clk_regmap g12a_cpu_clk_postmux0 = { ...@@ -410,6 +410,7 @@ static struct clk_regmap g12a_cpu_clk_postmux0 = {
.offset = HHI_SYS_CPU_CLK_CNTL0, .offset = HHI_SYS_CPU_CLK_CNTL0,
.mask = 0x1, .mask = 0x1,
.shift = 2, .shift = 2,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpu_clk_dyn0", .name = "cpu_clk_dyn0",
...@@ -466,6 +467,7 @@ static struct clk_regmap g12a_cpu_clk_dyn = { ...@@ -466,6 +467,7 @@ static struct clk_regmap g12a_cpu_clk_dyn = {
.offset = HHI_SYS_CPU_CLK_CNTL0, .offset = HHI_SYS_CPU_CLK_CNTL0,
.mask = 0x1, .mask = 0x1,
.shift = 10, .shift = 10,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpu_clk_dyn", .name = "cpu_clk_dyn",
...@@ -485,6 +487,7 @@ static struct clk_regmap g12a_cpu_clk = { ...@@ -485,6 +487,7 @@ static struct clk_regmap g12a_cpu_clk = {
.offset = HHI_SYS_CPU_CLK_CNTL0, .offset = HHI_SYS_CPU_CLK_CNTL0,
.mask = 0x1, .mask = 0x1,
.shift = 11, .shift = 11,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpu_clk", .name = "cpu_clk",
...@@ -504,6 +507,7 @@ static struct clk_regmap g12b_cpu_clk = { ...@@ -504,6 +507,7 @@ static struct clk_regmap g12b_cpu_clk = {
.offset = HHI_SYS_CPU_CLK_CNTL0, .offset = HHI_SYS_CPU_CLK_CNTL0,
.mask = 0x1, .mask = 0x1,
.shift = 11, .shift = 11,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpu_clk", .name = "cpu_clk",
...@@ -523,6 +527,7 @@ static struct clk_regmap g12b_cpub_clk_premux0 = { ...@@ -523,6 +527,7 @@ static struct clk_regmap g12b_cpub_clk_premux0 = {
.offset = HHI_SYS_CPUB_CLK_CNTL, .offset = HHI_SYS_CPUB_CLK_CNTL,
.mask = 0x3, .mask = 0x3,
.shift = 0, .shift = 0,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpub_clk_dyn0_sel", .name = "cpub_clk_dyn0_sel",
...@@ -533,6 +538,7 @@ static struct clk_regmap g12b_cpub_clk_premux0 = { ...@@ -533,6 +538,7 @@ static struct clk_regmap g12b_cpub_clk_premux0 = {
{ .hw = &g12a_fclk_div3.hw }, { .hw = &g12a_fclk_div3.hw },
}, },
.num_parents = 3, .num_parents = 3,
.flags = CLK_SET_RATE_PARENT,
}, },
}; };
...@@ -567,6 +573,7 @@ static struct clk_regmap g12b_cpub_clk_postmux0 = { ...@@ -567,6 +573,7 @@ static struct clk_regmap g12b_cpub_clk_postmux0 = {
.offset = HHI_SYS_CPUB_CLK_CNTL, .offset = HHI_SYS_CPUB_CLK_CNTL,
.mask = 0x1, .mask = 0x1,
.shift = 2, .shift = 2,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpub_clk_dyn0", .name = "cpub_clk_dyn0",
...@@ -644,6 +651,7 @@ static struct clk_regmap g12b_cpub_clk_dyn = { ...@@ -644,6 +651,7 @@ static struct clk_regmap g12b_cpub_clk_dyn = {
.offset = HHI_SYS_CPUB_CLK_CNTL, .offset = HHI_SYS_CPUB_CLK_CNTL,
.mask = 0x1, .mask = 0x1,
.shift = 10, .shift = 10,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpub_clk_dyn", .name = "cpub_clk_dyn",
...@@ -663,6 +671,7 @@ static struct clk_regmap g12b_cpub_clk = { ...@@ -663,6 +671,7 @@ static struct clk_regmap g12b_cpub_clk = {
.offset = HHI_SYS_CPUB_CLK_CNTL, .offset = HHI_SYS_CPUB_CLK_CNTL,
.mask = 0x1, .mask = 0x1,
.shift = 11, .shift = 11,
.flags = CLK_MUX_ROUND_CLOSEST,
}, },
.hw.init = &(struct clk_init_data){ .hw.init = &(struct clk_init_data){
.name = "cpub_clk", .name = "cpub_clk",
......
...@@ -935,6 +935,7 @@ static struct clk_regmap gxbb_sar_adc_clk_div = { ...@@ -935,6 +935,7 @@ static struct clk_regmap gxbb_sar_adc_clk_div = {
&gxbb_sar_adc_clk_sel.hw &gxbb_sar_adc_clk_sel.hw
}, },
.num_parents = 1, .num_parents = 1,
.flags = CLK_SET_RATE_PARENT,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment