* [U-Boot] [PATCH] mx5: Correct a warning in clock.c
@ 2011-11-05 14:25 Simon Glass
2011-11-18 17:20 ` Stefano Babic
0 siblings, 1 reply; 7+ messages in thread
From: Simon Glass @ 2011-11-05 14:25 UTC (permalink / raw)
To: u-boot
This corects the warning below, obtained with my gcc 4.6 compiler.
arch/arm/cpu/armv7/mx5/libmx5.o: In function `decode_pll':
arch/arm/cpu/armv7/mx5/clock.c:94: undefined reference to `__aeabi_uldivmod'
I am not able to test this on MX5x hardware, but it does improve the
MAKEALL output for me. You may already have a similar patch, but I cannot
see it on the list.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/arm/cpu/armv7/mx5/clock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx5/clock.c b/arch/arm/cpu/armv7/mx5/clock.c
index 0769a64..933ce05 100644
--- a/arch/arm/cpu/armv7/mx5/clock.c
+++ b/arch/arm/cpu/armv7/mx5/clock.c
@@ -91,7 +91,7 @@ static uint32_t decode_pll(struct mxc_pll_reg *pll, uint32_t infreq)
if (ctrl & MXC_DPLLC_CTL_DPDCK0_2_EN)
refclk *= 2;
- refclk /= pdf + 1;
+ do_div(refclk, pdf + 1);
temp = refclk * mfn_abs;
do_div(temp, mfd + 1);
ret = refclk * mfi;
--
1.7.3.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] mx5: Correct a warning in clock.c
2011-11-05 14:25 [U-Boot] [PATCH] mx5: Correct a warning in clock.c Simon Glass
@ 2011-11-18 17:20 ` Stefano Babic
2011-11-18 19:53 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: Stefano Babic @ 2011-11-18 17:20 UTC (permalink / raw)
To: u-boot
On 11/05/2011 03:25 PM, Simon Glass wrote:
> This corects the warning below, obtained with my gcc 4.6 compiler.
>
> arch/arm/cpu/armv7/mx5/libmx5.o: In function `decode_pll':
> arch/arm/cpu/armv7/mx5/clock.c:94: undefined reference to `__aeabi_uldivmod'
>
> I am not able to test this on MX5x hardware, but it does improve the
> MAKEALL output for me. You may already have a similar patch, but I cannot
> see it on the list.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
Sorry to check this late, but...
...I have built with gcc 4.6.1, no warning at all:
Configuring for mx53loco - Board: mx53loco, Options:
IMX_CONFIG=board/freescale/mx53loco/imximage.cfg
text data bss dec hex filename
191025 3976 218384 413385 64ec9 ./u-boot
The same for all other MX5 boards - I do not see the issue you reported.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] mx5: Correct a warning in clock.c
2011-11-18 17:20 ` Stefano Babic
@ 2011-11-18 19:53 ` Mike Frysinger
2011-11-20 5:08 ` Simon Glass
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2011-11-18 19:53 UTC (permalink / raw)
To: u-boot
On Friday 18 November 2011 12:20:02 Stefano Babic wrote:
> On 11/05/2011 03:25 PM, Simon Glass wrote:
> > This corects the warning below, obtained with my gcc 4.6 compiler.
> >
> > arch/arm/cpu/armv7/mx5/libmx5.o: In function `decode_pll':
> > arch/arm/cpu/armv7/mx5/clock.c:94: undefined reference to
> > `__aeabi_uldivmod'
> >
> > I am not able to test this on MX5x hardware, but it does improve the
> > MAKEALL output for me. You may already have a similar patch, but I cannot
> > see it on the list.
>
> Sorry to check this late, but...
>
>
> ...I have built with gcc 4.6.1, no warning at all:
>
> Configuring for mx53loco - Board: mx53loco, Options:
> IMX_CONFIG=board/freescale/mx53loco/imximage.cfg
> text data bss dec hex filename
> 191025 3976 218384 413385 64ec9 ./u-boot
>
> The same for all other MX5 boards - I do not see the issue you reported.
are you using PRIVATE LIBGCC ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111118/c1475f4b/attachment.pgp>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] mx5: Correct a warning in clock.c
2011-11-18 19:53 ` Mike Frysinger
@ 2011-11-20 5:08 ` Simon Glass
2011-11-20 5:31 ` Mike Frysinger
0 siblings, 1 reply; 7+ messages in thread
From: Simon Glass @ 2011-11-20 5:08 UTC (permalink / raw)
To: u-boot
Hi Mike,
On Fri, Nov 18, 2011 at 11:53 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Friday 18 November 2011 12:20:02 Stefano Babic wrote:
>> On 11/05/2011 03:25 PM, Simon Glass wrote:
>> > This corects the warning below, obtained with my gcc 4.6 compiler.
>> >
>> > arch/arm/cpu/armv7/mx5/libmx5.o: In function `decode_pll':
>> > arch/arm/cpu/armv7/mx5/clock.c:94: undefined reference to
>> > `__aeabi_uldivmod'
>> >
>> > I am not able to test this on MX5x hardware, but it does improve the
>> > MAKEALL output for me. You may already have a similar patch, but I cannot
>> > see it on the list.
>>
>> Sorry to check this late, but...
>>
>>
>> ...I have built with gcc 4.6.1, no warning at all:
>>
>> Configuring for mx53loco - Board: mx53loco, Options:
>> IMX_CONFIG=board/freescale/mx53loco/imximage.cfg
>> ? ?text ? ? ? ? ?data ? ? bss ? ? dec ? ? hex filename
>> ?191025 ? ? ? ? ?3976 ?218384 ?413385 ? 64ec9 ./u-boot
>>
>> The same for all other MX5 boards - I do not see the issue you reported.
>
> are you using PRIVATE LIBGCC ?
> -mike
>
Yes, perhaps as a side-effect of the buildall script...
Since a recent ARM patch to support widen divide was rejected, I
assume that we should use do_div() in these cases?
armv7a-cros-linux-gnueabi-gcc -v && make clobber && make
mx53smd_config && make -s -j10 USE_PRIVATE_LIBGCC=y
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/gcc-bin/4.6.0/armv7a-cros-linux-gnueabi-gcc.real
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv7a-cros-linux-gnueabi/4.6.x-google/lto-wrapper
Target: armv7a-cros-linux-gnueabi
Configured with:
/var/tmp/portage/cross-armv7a-cros-linux-gnueabi/gcc-4.6.0-r7/work/gcc-4.6.0/configure
--disable-multilib --prefix=/usr
--with-slibdir=/usr/lib/gcc/armv7a-cros-linux-gnueabi/4.6.0/gcc/armv7a-cros-linux-gnueabi/4.6.x-google
--libdir=/usr/lib/gcc/armv7a-cros-linux-gnueabi/4.6.0
--bindir=/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/gcc-bin/4.6.0
--includedir=/usr/lib/gcc/armv7a-cros-linux-gnueabi/4.6.0/include
--datadir=/usr/share/gcc-data/armv7a-cros-linux-gnueabi/4.6.0
--mandir=/usr/share/gcc-data/armv7a-cros-linux-gnueabi/4.6.0/man
--infodir=/usr/share/gcc-data/armv7a-cros-linux-gnueabi/4.6.0/info
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc/armv7a-cros-linux-gnueabi/4.6.0/include/g++-v4.6.0
--host=x86_64-pc-linux-gnu --target=armv7a-cros-linux-gnueabi
--build=x86_64-pc-linux-gnu --enable-languages=c,c++ --with-mode=thumb
--with-sysroot=/usr/armv7a-cros-linux-gnueabi --disable-libmudflap
--disable-libssp --enable-libgomp --enable-__cxa_atexit
--enable-checking=release --disable-libquadmath --with-arch=armv7-a
--disable-esp --with-bugurl=http://code.google.com/p/chromium-os/issues/entry
--with-pkgversion=gcc-4.6.0_cos_gg_180104 --enable-linker-build-id
Thread model: posix
gcc version 4.6.x-google 20110718 (prerelease) (gcc-4.6.0_cos_gg_180104)
awk '(NF && $1 !~ /^#/) { print $1 ": " $1 "_config; $(MAKE)" }'
boards.cfg > .boards.depend
Configuring for mx53smd - Board: mx53smd, Options:
IMX_CONFIG=board/freescale/mx53smd/imximage.cfg
Generating include/generated/asm-offsets.h
/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/binutils-bin/2.21/ld.bfd.real:
cannot find -lgcc
make: *** [u-boot] Error 1
Regards,
Simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] mx5: Correct a warning in clock.c
2011-11-20 5:08 ` Simon Glass
@ 2011-11-20 5:31 ` Mike Frysinger
2011-11-20 5:43 ` Simon Glass
0 siblings, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2011-11-20 5:31 UTC (permalink / raw)
To: u-boot
On Sunday 20 November 2011 00:08:05 Simon Glass wrote:
> On Fri, Nov 18, 2011 at 11:53 AM, Mike Frysinger wrote:
> > On Friday 18 November 2011 12:20:02 Stefano Babic wrote:
> >> On 11/05/2011 03:25 PM, Simon Glass wrote:
> >> > This corects the warning below, obtained with my gcc 4.6 compiler.
> >> >
> >> > arch/arm/cpu/armv7/mx5/libmx5.o: In function `decode_pll':
> >> > arch/arm/cpu/armv7/mx5/clock.c:94: undefined reference to
> >> > `__aeabi_uldivmod'
> >>
> >> I do not see the issue you reported.
> >
> > are you using PRIVATE LIBGCC ?
>
> Yes, perhaps as a side-effect of the buildall script...
by design. some arm boards want big endian, some want little. using private
allows using of just one gcc.
> Since a recent ARM patch to support widen divide was rejected, I
> assume that we should use do_div() in these cases?
yes, as it involves a 64bit in the division.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111120/8993ed44/attachment.pgp>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] mx5: Correct a warning in clock.c
2011-11-20 5:31 ` Mike Frysinger
@ 2011-11-20 5:43 ` Simon Glass
2011-11-21 11:04 ` Stefano Babic
0 siblings, 1 reply; 7+ messages in thread
From: Simon Glass @ 2011-11-20 5:43 UTC (permalink / raw)
To: u-boot
Hi Mike,
On Sat, Nov 19, 2011 at 9:31 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Sunday 20 November 2011 00:08:05 Simon Glass wrote:
>> On Fri, Nov 18, 2011 at 11:53 AM, Mike Frysinger wrote:
>> > On Friday 18 November 2011 12:20:02 Stefano Babic wrote:
>> >> On 11/05/2011 03:25 PM, Simon Glass wrote:
>> >> > This corects the warning below, obtained with my gcc 4.6 compiler.
>> >> >
>> >> > arch/arm/cpu/armv7/mx5/libmx5.o: In function `decode_pll':
>> >> > arch/arm/cpu/armv7/mx5/clock.c:94: undefined reference to
>> >> > `__aeabi_uldivmod'
>> >>
>> >> I do not see the issue you reported.
>> >
>> > are you using PRIVATE LIBGCC ?
>>
>> Yes, perhaps as a side-effect of the buildall script...
>
> by design. ?some arm boards want big endian, some want little. ?using private
> allows using of just one gcc.
>
>> Since a recent ARM patch to support widen divide was rejected, I
>> assume that we should use do_div() in these cases?
>
> yes, as it involves a 64bit in the division.
> -mike
>
OK, I have no problem with it, but this problem may not show up for
people using vanilla MAKEALL, hence Stefano's email.
Regards,
Simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH] mx5: Correct a warning in clock.c
2011-11-20 5:43 ` Simon Glass
@ 2011-11-21 11:04 ` Stefano Babic
0 siblings, 0 replies; 7+ messages in thread
From: Stefano Babic @ 2011-11-21 11:04 UTC (permalink / raw)
To: u-boot
On 20/11/2011 06:43, Simon Glass wrote:
> OK, I have no problem with it, but this problem may not show up for
> people using vanilla MAKEALL, hence Stefano's email.
Right - I was asking myself why I could not see the warning, now it is
clear to me.
Acked-by: Stefano Babic <sbabic@denx.de>
Tested on mx51evk.
Tested-By: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-21 11:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-05 14:25 [U-Boot] [PATCH] mx5: Correct a warning in clock.c Simon Glass
2011-11-18 17:20 ` Stefano Babic
2011-11-18 19:53 ` Mike Frysinger
2011-11-20 5:08 ` Simon Glass
2011-11-20 5:31 ` Mike Frysinger
2011-11-20 5:43 ` Simon Glass
2011-11-21 11:04 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox