From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guillaume Gardet Date: Thu, 19 May 2016 09:40:33 +0200 Subject: [U-Boot] [PATCH] video: ipu: Fix build with hard-float ARM toolchain In-Reply-To: <20160519010937.GA5356@linux-7smt.suse> References: <1463573983-18597-1-git-send-email-guillaume.gardet@free.fr> <20160519010937.GA5356@linux-7smt.suse> Message-ID: <573D6DF1.7070708@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 19/05/2016 03:09, Peng Fan a ?crit : > Hi Guillaume, > > On Wed, May 18, 2016 at 02:19:43PM +0200, Guillaume GARDET wrote: >> Build with hard-float ARM toolchain was broken by commit 3cb4f25c: >> 'video: ipu: avoid overflow issue'. >> To fix it, we use do_div function. >> >> Build tested for mx6qsabrelite_defconfig. >> >> Signed-off-by: Guillaume GARDET >> Cc: Peng Fan >> Cc: Sandor Yu >> Cc: Anatolij Gustschin >> Cc: Stefano Babic >> Cc: Fabio Estevam >> Cc: Tom Rini >> >> --- >> drivers/video/ipu_common.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c >> index 36d4b23..e319c82 100644 >> --- a/drivers/video/ipu_common.c >> +++ b/drivers/video/ipu_common.c >> @@ -352,7 +352,8 @@ static int ipu_pixel_clk_set_rate(struct clk *clk, unsigned long rate) >> */ >> __raw_writel((div / 16) << 16, DI_BS_CLKGEN1(clk->id)); >> >> - clk->rate = (u64)(clk->parent->rate * 16) / div; >> + do_div(parent_rate, div); >> + clk->rate = parent_rate; > This issue was already fixed,. > http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=c510f2e436008e55a50b063f2180cb1e63984224 Ok. Sorry, I did not checked u-boot-imx git repo. Do you know why it was not included in the v2016.05 release? Guillaume > > Thanks, > Peng. > >> return 0; >> } >> -- >> 1.8.4.5 >>