Commit 07ea0b4d authored by Maxime Ripard's avatar Maxime Ripard

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: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent 4de2d58b
...@@ -33,6 +33,8 @@ struct sun4i_a10_display_clk_data { ...@@ -33,6 +33,8 @@ struct sun4i_a10_display_clk_data {
u8 width_div; u8 width_div;
u8 width_mux; u8 width_mux;
u32 flags;
}; };
struct reset_data { struct reset_data {
...@@ -166,7 +168,7 @@ static void __init sun4i_a10_display_init(struct device_node *node, ...@@ -166,7 +168,7 @@ static void __init sun4i_a10_display_init(struct device_node *node,
data->has_div ? &div->hw : NULL, data->has_div ? &div->hw : NULL,
data->has_div ? &clk_divider_ops : NULL, data->has_div ? &clk_divider_ops : NULL,
&gate->hw, &clk_gate_ops, &gate->hw, &clk_gate_ops,
0); data->flags);
if (IS_ERR(clk)) { if (IS_ERR(clk)) {
pr_err("%s: Couldn't register the clock\n", clk_name); pr_err("%s: Couldn't register the clock\n", clk_name);
goto free_div; goto free_div;
...@@ -232,6 +234,7 @@ static const struct sun4i_a10_display_clk_data sun4i_a10_tcon_ch0_data __initcon ...@@ -232,6 +234,7 @@ static const struct sun4i_a10_display_clk_data sun4i_a10_tcon_ch0_data __initcon
.offset_rst = 29, .offset_rst = 29,
.offset_mux = 24, .offset_mux = 24,
.width_mux = 2, .width_mux = 2,
.flags = CLK_SET_RATE_PARENT,
}; };
static void __init sun4i_a10_tcon_ch0_setup(struct device_node *node) static void __init sun4i_a10_tcon_ch0_setup(struct device_node *node)
......
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