* [U-Boot] [PATCH] video: ipu: Fix build with hard-float ARM toolchain
@ 2016-05-18 12:19 Guillaume GARDET
2016-05-19 1:09 ` Peng Fan
0 siblings, 1 reply; 4+ messages in thread
From: Guillaume GARDET @ 2016-05-18 12:19 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] video: ipu: Fix build with hard-float ARM toolchain
2016-05-18 12:19 [U-Boot] [PATCH] video: ipu: Fix build with hard-float ARM toolchain Guillaume GARDET
@ 2016-05-19 1:09 ` Peng Fan
2016-05-19 7:40 ` Guillaume Gardet
0 siblings, 1 reply; 4+ messages in thread
From: Peng Fan @ 2016-05-19 1:09 UTC (permalink / raw)
To: u-boot
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 <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;
This issue was already fixed,.
http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=c510f2e436008e55a50b063f2180cb1e63984224
Thanks,
Peng.
>
> return 0;
> }
>--
>1.8.4.5
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] video: ipu: Fix build with hard-float ARM toolchain
2016-05-19 1:09 ` Peng Fan
@ 2016-05-19 7:40 ` Guillaume Gardet
2016-05-19 10:27 ` Stefano Babic
0 siblings, 1 reply; 4+ messages in thread
From: Guillaume Gardet @ 2016-05-19 7:40 UTC (permalink / raw)
To: u-boot
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 <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;
> 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
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] video: ipu: Fix build with hard-float ARM toolchain
2016-05-19 7:40 ` Guillaume Gardet
@ 2016-05-19 10:27 ` Stefano Babic
0 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2016-05-19 10:27 UTC (permalink / raw)
To: u-boot
Hi Guillaume,
On 19/05/2016 09:40, Guillaume Gardet wrote:
>
>
> 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 <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;
>> 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?
No reason, it was simply missed :-(
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-19 10:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-18 12:19 [U-Boot] [PATCH] video: ipu: Fix build with hard-float ARM toolchain Guillaume GARDET
2016-05-19 1:09 ` Peng Fan
2016-05-19 7:40 ` Guillaume Gardet
2016-05-19 10:27 ` Stefano Babic
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.