Message ID | 5369EFA3.8070908@st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Maxime, On Wed, May 7, 2014 at 5:32 AM, Maxime Coquelin <maxime.coquelin@st.com> wrote: > You are right. Sorry for the regression. > > I thought I tested it, as I had some table-based dividers in my test setup. > After checking again, it appears that I didn't had the CLK_SET_RATE_PARENT > flag set on these clocks, so I didn't entered the for loop... > > Could the fix be to initialize "up" variable to INT_MAX in _round_up_table > (see below)? This works fine for me: Tested-by: Fabio Estevam <fabio.estevam@freescale.com> > I can send the patch if you are fine with it. > I have no hardware to test on this week, I only have compiled this patch, > not tested it. Please submit your patch, thanks.
Hi Fabio, On 05/07/2014 04:39 PM, Fabio Estevam wrote: > Hi Maxime, > > On Wed, May 7, 2014 at 5:32 AM, Maxime Coquelin <maxime.coquelin@st.com> wrote: > >> You are right. Sorry for the regression. >> >> I thought I tested it, as I had some table-based dividers in my test setup. >> After checking again, it appears that I didn't had the CLK_SET_RATE_PARENT >> flag set on these clocks, so I didn't entered the for loop... >> >> Could the fix be to initialize "up" variable to INT_MAX in _round_up_table >> (see below)? > > This works fine for me: > > Tested-by: Fabio Estevam <fabio.estevam@freescale.com> > >> I can send the patch if you are fine with it. >> I have no hardware to test on this week, I only have compiled this patch, >> not tested it. > > Please submit your patch, thanks. Thanks for testing it, patch sent. Regards, Maxime >
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index b3c8396..cf9114a 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -158,7 +158,7 @@ static bool _is_valid_div(struct clk_divider *divider, unsigned int div) static int _round_up_table(const struct clk_div_table *table, int div) { const struct clk_div_table *clkt; - int up = _get_table_maxdiv(table); + int up = INT_MAX; for (clkt = table; clkt->div; clkt++) {