Skip to contentSkip to conversation

mx5: Correct a warning in clock.c

PATCH New Simon Glass 3 participants 7 messages Nov 5, 2011 – Nov 21, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mx5: Correct a warning in clock.c

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.

---
 arch/arm/cpu/armv7/mx5/clock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/cpu/armv7/mx5/clock.c +1 -1
index 0769a64..933ce05 100644
@@ -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;
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 mx5: Correct a warning in clock.c

Quoted 11 lines · Simon Glass

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.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
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
=====================================================================
#2 lore raw

PATCH 1/1 mx5: Correct a warning in clock.c

Quoted 14 lines · On Friday 18 November 2011 12:20:02 Stefano Babic wrote:
Quoted 9 lines · Simon Glass

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...

Quoted 8 lines

...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>

#3 lore raw

PATCH 1/1 mx5: Correct a warning in clock.c

Hi Mike,

Quoted 22 lines · Mike Frysinger
Quoted 21 lines · On Friday 18 November 2011 12:20:02 Stefano Babic wrote:
Quoted 9 lines · Simon Glass

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

Quoted 5 lines
Quoted 1 line

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

#4 lore raw

PATCH 1/1 mx5: Correct a warning in clock.c

Quoted 9 lines · On Sunday 20 November 2011 00:08:05 Simon Glass wrote:
Quoted 8 lines · Mike Frysinger
Quoted 7 lines · On Friday 18 November 2011 12:20:02 Stefano Babic wrote:
Quoted 5 lines · Simon Glass

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'

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

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.

Quoted 2 lines

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>

#5 lore raw

PATCH 1/1 mx5: Correct a warning in clock.c

Hi Mike,

Quoted 16 lines · Mike Frysinger
Quoted 9 lines · On Sunday 20 November 2011 00:08:05 Simon Glass wrote:
Quoted 8 lines · Mike Frysinger
Quoted 7 lines · On Friday 18 November 2011 12:20:02 Stefano Babic wrote:
Quoted 5 lines · Simon Glass

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'

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I do not see the issue you reported.

are you using PRIVATE LIBGCC ?

Yes, perhaps as a side-effect of the buildall script...

Quoted 9 lines

by design. ?some arm boards want big endian, some want little. ?using private allows using of just one gcc.

Quoted 2 lines

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

#6 lore raw

PATCH 1/1 mx5: Correct a warning in clock.c

Quoted 2 lines · Simon Glass

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.

Tested on mx51evk.

Best regards,
Stefano

Signature · 5 lines
=====================================================================
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
=====================================================================