From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap3: beagle: Fix build warning
Date: Wed, 07 Sep 2011 09:41:03 +0200 [thread overview]
Message-ID: <4E67200F.2080000@denx.de> (raw)
In-Reply-To: <4E670B27.5000208@aribaud.net>
On 09/07/2011 08:11 AM, Albert ARIBAUD wrote:
> (Cc:ing Dirk for the non-patch-related error)
>
Hi Albert,
> Note however that there is an error, independent from this patch, in
> building this board with ELDK42 and CS 2011q1 :
>
> Configuring for omap3_beagle board...
> beagle.c:532: warning: initialization from incompatible pointer type
> led.c: In function '__led_toggle':
> led.c:62: warning: implicit declaration of function 'omap_get_gpio_dataout'
> board/ti/beagle/libbeagle.o: In function `__led_toggle':
> /home/uboot/src/u-boot-arm/board/ti/beagle/led.c:62: undefined reference
> to `omap_get_gpio_dataout'
> arm-linux-ld: BFD (GNU Binutils) 2.17.90.20070806 assertion fail
> /opt/eldk/build/arm-2008-11-24/work/usr/src/denx/BUILD/crosstool-0.43/build/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi/binutils-2.17.90/bfd/elf32-arm.c:8886
> arm-linux-ld: BFD (GNU Binutils) 2.17.90.20070806 assertion fail
> /opt/eldk/build/arm-2008-11-24/work/usr/src/denx/BUILD/crosstool-0.43/build/gcc-4.2.2-glibc-20070515T2025-eldk/arm-linux-gnueabi/binutils-2.17.90/bfd/elf32-arm.c:9117
>
> (foillows a linker segmentation error)
>
> Anyone can reproduce and tell what the issue is?
I can reproduce it. IMHO this issue is introduced with the following commit:
commit b8bc8973a1830bb92e7a9bf3356dc209afb2f4e8
Author: Joel A Fernandes <agnel.joel@gmail.com>
Date: Thu Aug 11 23:16:53 2011 -0500
There is no omap_get_gpio_dataout() actually in u-boot, but it is called
to get the value of the LED:
state = omap_get_gpio_dataout(toggle_gpio);
Even if we had this function, it sounds odd to read the status of a LED
(or generally from a GPIO set to output), because we should already know
which value we have written before. Instead of reading from hardware
should we not save the state of the LED in a variable ?
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
=====================================================================
next prev parent reply other threads:[~2011-09-07 7:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-05 10:25 [U-Boot] [PATCH] omap3: beagle: Fix build warning Sanjeev Premi
2011-09-05 11:35 ` Albert ARIBAUD
2011-09-05 11:47 ` Premi, Sanjeev
2011-09-05 13:30 ` Heiko Schocher
2011-09-05 14:42 ` Premi, Sanjeev
2011-09-06 22:00 ` Jason Kridner
2011-09-07 6:11 ` Albert ARIBAUD
2011-09-07 7:41 ` Stefano Babic [this message]
2011-09-07 8:47 ` Premi, Sanjeev
2011-09-07 13:04 ` Albert ARIBAUD
2011-09-07 14:12 ` Paulraj, Sandeep
2011-09-07 21:40 ` Joel A Fernandes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E67200F.2080000@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox