History

Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fixes from Michael Turquette: "Fix a bug in the at91 clk driver, two compile time warnings in sunxi clk drivers, and one bug in a sunxi clk driver introduced in the 4.7 merge window" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: at91: fix clk_programmable_set_parent() clk: sunxi: remove unused variable clk: sunxi: display: Add per-clock flags clk: sunxi: tcon-ch1: Do not return a negative error in get_parent

Linus Torvalds committed 10 years ago

Commit 62cd69d2 parents a933f80 f96423f3 files · +5 −6Browse files

Unified · Split

3 files
  1. drivers/clk/at91/clk-programmable.c +1 −1
  2. drivers/clk/sunxi/clk-sun4i-display.c +4 −1
  3. drivers/clk/sunxi/clk-sun4i-tcon-ch1.c +0 −4
drivers/clk/at91/clk-programmable.c+1−1
@@ -99,7 +99,7 @@ static int clk_programmable_set_parent(struct clk_hw *hw, u8 index) · 98 unmodified lines
9999 struct clk_programmable *prog = to_clk_programmable(hw);
100100 const struct clk_programmable_layout *layout = prog->layout;
101101 unsigned int mask = layout->css_mask;
102− unsigned int pckr = 0;
102+ unsigned int pckr = index;
103103
104104 if (layout->have_slck_mck)
105105 mask |= AT91_PMC_CSSMCK_MCK;
drivers/clk/sunxi/clk-sun4i-display.c+4−1
@@ -33,6 +33,8 @@ struct sun4i_a10_display_clk_data { · 32 unmodified lines
3333
3434 u8 width_div;
3535 u8 width_mux;
36+
37+ u32 flags;
3638 };
3739
3840 struct reset_data {
@@ -166,7 +168,7 @@ static void __init sun4i_a10_display_init(struct device_node *node, · 127 unmodified lines
166168 data->has_div ? &div->hw : NULL,
167169 data->has_div ? &clk_divider_ops : NULL,
168170 &gate->hw, &clk_gate_ops,
169− 0);
171+ data->flags);
170172 if (IS_ERR(clk)) {
171173 pr_err("%s: Couldn't register the clock\n", clk_name);
172174 goto free_div;
@@ -232,6 +234,7 @@ static const struct sun4i_a10_display_clk_data sun4i_a10_tcon_ch0_data __initcon · 59 unmodified lines
232234 .offset_rst = 29,
233235 .offset_mux = 24,
234236 .width_mux = 2,
237+ .flags = CLK_SET_RATE_PARENT,
235238 };
236239
237240 static void __init sun4i_a10_tcon_ch0_setup(struct device_node *node)
drivers/clk/sunxi/clk-sun4i-tcon-ch1.c+0−4
@@ -79,15 +79,11 @@ static int tcon_ch1_is_enabled(struct clk_hw *hw) · 78 unmodified lines
7979 static u8 tcon_ch1_get_parent(struct clk_hw *hw)
8080 {
8181 struct tcon_ch1_clk *tclk = hw_to_tclk(hw);
82− int num_parents = clk_hw_get_num_parents(hw);
8382 u32 reg;
8483
8584 reg = readl(tclk->reg) >> TCON_CH1_SCLK2_MUX_SHIFT;
8685 reg &= reg >> TCON_CH1_SCLK2_MUX_MASK;
8786
88− if (reg >= num_parents)
89− return -EINVAL;
90−
9187 return reg;
9288 }
9389