clk: meson: add mpll pre-divider
mpll clocks parent can actually be divided by 1 or 2. So far, this divider has always been set to 1, so the calculation was correct. Now that we know it exists, model the tree correctly. If we ever get a platform where the divider is different, we won't get into trouble Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
committed by
Neil Armstrong
parent
093c3fac46
commit
513b67ac39
@ -545,6 +545,20 @@ static struct clk_fixed_factor gxbb_fclk_div7 = {
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap gxbb_mpll_prediv = {
|
||||
.data = &(struct clk_regmap_div_data){
|
||||
.offset = HHI_MPLL_CNTL5,
|
||||
.shift = 12,
|
||||
.width = 1,
|
||||
},
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mpll_prediv",
|
||||
.ops = &clk_regmap_divider_ro_ops,
|
||||
.parent_names = (const char *[]){ "fixed_pll" },
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
|
||||
static struct clk_regmap gxbb_mpll0_div = {
|
||||
.data = &(struct meson_clk_mpll_data){
|
||||
.sdm = {
|
||||
@ -572,7 +586,7 @@ static struct clk_regmap gxbb_mpll0_div = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mpll0_div",
|
||||
.ops = &meson_clk_mpll_ops,
|
||||
.parent_names = (const char *[]){ "fixed_pll" },
|
||||
.parent_names = (const char *[]){ "mpll_prediv" },
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
@ -613,7 +627,7 @@ static struct clk_regmap gxbb_mpll1_div = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mpll1_div",
|
||||
.ops = &meson_clk_mpll_ops,
|
||||
.parent_names = (const char *[]){ "fixed_pll" },
|
||||
.parent_names = (const char *[]){ "mpll_prediv" },
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
@ -654,7 +668,7 @@ static struct clk_regmap gxbb_mpll2_div = {
|
||||
.hw.init = &(struct clk_init_data){
|
||||
.name = "mpll2_div",
|
||||
.ops = &meson_clk_mpll_ops,
|
||||
.parent_names = (const char *[]){ "fixed_pll" },
|
||||
.parent_names = (const char *[]){ "mpll_prediv" },
|
||||
.num_parents = 1,
|
||||
},
|
||||
};
|
||||
@ -1703,6 +1717,7 @@ static struct clk_hw_onecell_data gxbb_hw_onecell_data = {
|
||||
[CLKID_MPLL0_DIV] = &gxbb_mpll0_div.hw,
|
||||
[CLKID_MPLL1_DIV] = &gxbb_mpll1_div.hw,
|
||||
[CLKID_MPLL2_DIV] = &gxbb_mpll2_div.hw,
|
||||
[CLKID_MPLL_PREDIV] = &gxbb_mpll_prediv.hw,
|
||||
[NR_CLKS] = NULL,
|
||||
},
|
||||
.num = NR_CLKS,
|
||||
@ -1853,6 +1868,7 @@ static struct clk_hw_onecell_data gxl_hw_onecell_data = {
|
||||
[CLKID_MPLL0_DIV] = &gxbb_mpll0_div.hw,
|
||||
[CLKID_MPLL1_DIV] = &gxbb_mpll1_div.hw,
|
||||
[CLKID_MPLL2_DIV] = &gxbb_mpll2_div.hw,
|
||||
[CLKID_MPLL_PREDIV] = &gxbb_mpll_prediv.hw,
|
||||
[NR_CLKS] = NULL,
|
||||
},
|
||||
.num = NR_CLKS,
|
||||
@ -2005,6 +2021,7 @@ static struct clk_regmap *const gx_clk_regmaps[] = {
|
||||
&gxbb_cts_amclk_div,
|
||||
&gxbb_fixed_pll,
|
||||
&gxbb_sys_pll,
|
||||
&gxbb_mpll_prediv,
|
||||
};
|
||||
|
||||
struct clkc_data {
|
||||
|
Reference in New Issue
Block a user