Hi Ulrich, Thank you for the patch. On Friday 07 November 2014 16:51:07 Ulrich Hecht wrote: > Support for setting the parent at initialization time based on the current > hardware configuration in DIV6 clocks with selectable parents as found in > the r8a73a4, r8a7740, sh73a0, and other SoCs. > > Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@xxxxxxxxx> > --- > drivers/clk/shmobile/clk-div6.c | 113 ++++++++++++++++++++++++++++++++----- > 1 file changed, 101 insertions(+), 12 deletions(-) > > diff --git a/drivers/clk/shmobile/clk-div6.c > b/drivers/clk/shmobile/clk-div6.c index f065f69..639241e 100644 > --- a/drivers/clk/shmobile/clk-div6.c > +++ b/drivers/clk/shmobile/clk-div6.c [snip] > +static int cpg_div6_clock_set_parent(struct clk_hw *hw, u8 index) > +{ > + struct div6_clock *clock = to_div6_clock(hw); > + u8 hw_index; > + u32 mask; > + > + if (index >= __clk_get_num_parents(hw->clk)) > + return -EINVAL; Should this check be moved to the CCF core ? > + mask = ~((BIT(clock->src_width) - 1) << clock->src_shift); > + hw_index = clock->parents[index]; > + > + clk_writel((clk_readl(clock->reg) & mask) | > + (hw_index << clock->src_shift), clock->reg); > > return 0; > } [snip] -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html