aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2016-04-02 06:28:31 -0400
committerMaxime Ripard <maxime.ripard@free-electrons.com>2016-06-10 05:49:47 -0400
commit07ea0b4d9a0abde8d252738079a8a811c5132a94 (patch)
treee881d8aefaf87c8e7e7cc37652833841feb11a42
parent4de2d58bc973caa8988b44ddd11787e57051c843 (diff)
clk: sunxi: display: Add per-clock flags
The TCON channel 0 clock that is the parent clock of our pixel clock is expected to change its rate depending on the resolution we want to output in our display engine. However, since it's only a mux, the only way it can do that is by changing its parents rate. Allow to give flags in our display clocks description, and add the CLK_SET_RATE_PARENT flag for the TCON channel 0 flag. Fixes: a3b4956ee6d9 ("clk: sunxi: display: Add per-clock flags") Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r--drivers/clk/sunxi/clk-sun4i-display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/sunxi/clk-sun4i-display.c b/drivers/clk/sunxi/clk-sun4i-display.c
index 445a7498d6df..9780fac6d029 100644
--- a/drivers/clk/sunxi/clk-sun4i-display.c
+++ b/drivers/clk/sunxi/clk-sun4i-display.c
@@ -33,6 +33,8 @@ struct sun4i_a10_display_clk_data {
33 33
34 u8 width_div; 34 u8 width_div;
35 u8 width_mux; 35 u8 width_mux;
36
37 u32 flags;
36}; 38};
37 39
38struct reset_data { 40struct reset_data {
@@ -166,7 +168,7 @@ static void __init sun4i_a10_display_init(struct device_node *node,
166 data->has_div ? &div->hw : NULL, 168 data->has_div ? &div->hw : NULL,
167 data->has_div ? &clk_divider_ops : NULL, 169 data->has_div ? &clk_divider_ops : NULL,
168 &gate->hw, &clk_gate_ops, 170 &gate->hw, &clk_gate_ops,
169 0); 171 data->flags);
170 if (IS_ERR(clk)) { 172 if (IS_ERR(clk)) {
171 pr_err("%s: Couldn't register the clock\n", clk_name); 173 pr_err("%s: Couldn't register the clock\n", clk_name);
172 goto free_div; 174 goto free_div;
@@ -232,6 +234,7 @@ static const struct sun4i_a10_display_clk_data sun4i_a10_tcon_ch0_data __initcon
232 .offset_rst = 29, 234 .offset_rst = 29,
233 .offset_mux = 24, 235 .offset_mux = 24,
234 .width_mux = 2, 236 .width_mux = 2,
237 .flags = CLK_SET_RATE_PARENT,
235}; 238};
236 239
237static void __init sun4i_a10_tcon_ch0_setup(struct device_node *node) 240static void __init sun4i_a10_tcon_ch0_setup(struct device_node *node)