forked from pool/u-boot
475ab01269
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/397969 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/u-boot?expand=0&rev=75
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
From fabd591c6ba9c5ee5357d10c3284bf21ea585931 Mon Sep 17 00:00:00 2001
|
|
From: Guillaume GARDET <guillaume.gardet@free.fr>
|
|
Date: Wed, 18 May 2016 14:12:43 +0200
|
|
Subject: [PATCH] video: ipu: Fix build with hard-float ARM toolchain
|
|
|
|
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 <guillaume.gardet@free.fr>
|
|
Cc: Peng Fan <van.freenix@gmail.com>
|
|
Cc: Sandor Yu <sandor.yu@nxp.com>
|
|
Cc: Anatolij Gustschin <agust@denx.de>
|
|
Cc: Stefano Babic <sbabic@denx.de>
|
|
Cc: Fabio Estevam <fabio.estevam@nxp.com>
|
|
Cc: Tom Rini <trini@konsulko.com>
|
|
|
|
---
|
|
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;
|
|
|
|
return 0;
|
|
}
|
|
--
|
|
1.8.4.5
|
|
|