[U-Boot] [PATCH] arm:io.h: define __io() macro if not defined erlier

Wolfgang Denk wd at denx.de
Fri May 21 23:07:04 CEST 2010


Dear =?UTF-8?q?Andreas=20Bie=C3=9Fmann?=,

In message <1274259427-29386-1-git-send-email-biessmann at corscience.de> you wrote:
> This patch adds __io() macro to enable {in|out}[bwl] macros in
> arch/arm/asm/io.h
> 
> Commit a45dde2293c816138e53c26eca6fd0322583f9a6 uses {in|out}[bwl]
> macros in
> DM9000x and breaks compilation for arm devices.
> 
> Signed-off-by: Andreas Bießmann <biessmann at corscience.de>
> ---
>  arch/arm/include/asm/io.h |    7 +++++++
>   1 files changed, 7 insertions(+), 0 deletions(-)

Hm... with this patch applied I see a lot of other warnings:

Configuring for netstar board...
In file included from timer.c:41:
/work/wd/tmp-arm/include2/asm/io.h:209:1: warning: "outb" redefined
In file included from timer.c:40:
/home/wd/git/u-boot/work/include/configs/omap1510.h:784:1: warning: this is the location of the previous definition
In file included from timer.c:41:
/work/wd/tmp-arm/include2/asm/io.h:210:1: warning: "outw" redefined
In file included from timer.c:40:
/home/wd/git/u-boot/work/include/configs/omap1510.h:785:1: warning: this is the location of the previous definition
In file included from timer.c:41:
/work/wd/tmp-arm/include2/asm/io.h:211:1: warning: "outl" redefined
In file included from timer.c:40:
/home/wd/git/u-boot/work/include/configs/omap1510.h:786:1: warning: this is the location of the previous definition
In file included from timer.c:41:
/work/wd/tmp-arm/include2/asm/io.h:213:1: warning: "inb" redefined
In file included from timer.c:40:
/home/wd/git/u-boot/work/include/configs/omap1510.h:788:1: warning: this is the location of the previous definition
In file included from timer.c:41:
/work/wd/tmp-arm/include2/asm/io.h:214:1: warning: "inw" redefined
In file included from timer.c:40:
/home/wd/git/u-boot/work/include/configs/omap1510.h:789:1: warning: this is the location of the previous definition
In file included from timer.c:41:
/work/wd/tmp-arm/include2/asm/io.h:215:1: warning: "inl" redefined
In file included from timer.c:40:
/home/wd/git/u-boot/work/include/configs/omap1510.h:790:1: warning: this is the location of the previous definition
In file included from display_options.c:27:
/work/wd/tmp-arm/include2/asm/io.h:209:1: warning: "outb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from display_options.c:24:
/home/wd/git/u-boot/work/include/configs/omap1510.h:784:1: warning: this is the location of the previous definition
In file included from display_options.c:27:
/work/wd/tmp-arm/include2/asm/io.h:210:1: warning: "outw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from display_options.c:24:
/home/wd/git/u-boot/work/include/configs/omap1510.h:785:1: warning: this is the location of the previous definition
In file included from display_options.c:27:
/work/wd/tmp-arm/include2/asm/io.h:211:1: warning: "outl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from display_options.c:24:
/home/wd/git/u-boot/work/include/configs/omap1510.h:786:1: warning: this is the location of the previous definition
In file included from display_options.c:27:
/work/wd/tmp-arm/include2/asm/io.h:213:1: warning: "inb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from display_options.c:24:
/home/wd/git/u-boot/work/include/configs/omap1510.h:788:1: warning: this is the location of the previous definition
In file included from display_options.c:27:
/work/wd/tmp-arm/include2/asm/io.h:214:1: warning: "inw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from display_options.c:24:
/home/wd/git/u-boot/work/include/configs/omap1510.h:789:1: warning: this is the location of the previous definition
In file included from display_options.c:27:
/work/wd/tmp-arm/include2/asm/io.h:215:1: warning: "inl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from display_options.c:24:
/home/wd/git/u-boot/work/include/configs/omap1510.h:790:1: warning: this is the location of the previous definition
In file included from cfi_flash.c:39:
/work/wd/tmp-arm/include2/asm/io.h:209:1: warning: "outb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from cfi_flash.c:37:
/home/wd/git/u-boot/work/include/configs/omap1510.h:784:1: warning: this is the location of the previous definition
In file included from cfi_flash.c:39:
/work/wd/tmp-arm/include2/asm/io.h:210:1: warning: "outw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from cfi_flash.c:37:
/home/wd/git/u-boot/work/include/configs/omap1510.h:785:1: warning: this is the location of the previous definition
In file included from cfi_flash.c:39:
/work/wd/tmp-arm/include2/asm/io.h:211:1: warning: "outl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from cfi_flash.c:37:
/home/wd/git/u-boot/work/include/configs/omap1510.h:786:1: warning: this is the location of the previous definition
In file included from cfi_flash.c:39:
/work/wd/tmp-arm/include2/asm/io.h:213:1: warning: "inb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from cfi_flash.c:37:
/home/wd/git/u-boot/work/include/configs/omap1510.h:788:1: warning: this is the location of the previous definition
In file included from cfi_flash.c:39:
/work/wd/tmp-arm/include2/asm/io.h:214:1: warning: "inw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from cfi_flash.c:37:
/home/wd/git/u-boot/work/include/configs/omap1510.h:789:1: warning: this is the location of the previous definition
In file included from cfi_flash.c:39:
/work/wd/tmp-arm/include2/asm/io.h:215:1: warning: "inl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from cfi_flash.c:37:
/home/wd/git/u-boot/work/include/configs/omap1510.h:790:1: warning: this is the location of the previous definition
In file included from nand_base.c:75:
/work/wd/tmp-arm/include2/asm/io.h:209:1: warning: "outb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from nand_base.c:59:
/home/wd/git/u-boot/work/include/configs/omap1510.h:784:1: warning: this is the location of the previous definition
In file included from nand_base.c:75:
/work/wd/tmp-arm/include2/asm/io.h:210:1: warning: "outw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from nand_base.c:59:
/home/wd/git/u-boot/work/include/configs/omap1510.h:785:1: warning: this is the location of the previous definition
In file included from nand_base.c:75:
/work/wd/tmp-arm/include2/asm/io.h:211:1: warning: "outl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from nand_base.c:59:
/home/wd/git/u-boot/work/include/configs/omap1510.h:786:1: warning: this is the location of the previous definition
In file included from nand_base.c:75:
/work/wd/tmp-arm/include2/asm/io.h:213:1: warning: "inb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from nand_base.c:59:
/home/wd/git/u-boot/work/include/configs/omap1510.h:788:1: warning: this is the location of the previous definition
In file included from nand_base.c:75:
/work/wd/tmp-arm/include2/asm/io.h:214:1: warning: "inw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from nand_base.c:59:
/home/wd/git/u-boot/work/include/configs/omap1510.h:789:1: warning: this is the location of the previous definition
In file included from nand_base.c:75:
/work/wd/tmp-arm/include2/asm/io.h:215:1: warning: "inl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from nand_base.c:59:
/home/wd/git/u-boot/work/include/configs/omap1510.h:790:1: warning: this is the location of the previous definition
In file included from jedec_flash.c:34:
/work/wd/tmp-arm/include2/asm/io.h:209:1: warning: "outb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from jedec_flash.c:32:
/home/wd/git/u-boot/work/include/configs/omap1510.h:784:1: warning: this is the location of the previous definition
In file included from jedec_flash.c:34:
/work/wd/tmp-arm/include2/asm/io.h:210:1: warning: "outw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from jedec_flash.c:32:
/home/wd/git/u-boot/work/include/configs/omap1510.h:785:1: warning: this is the location of the previous definition
In file included from jedec_flash.c:34:
/work/wd/tmp-arm/include2/asm/io.h:211:1: warning: "outl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from jedec_flash.c:32:
/home/wd/git/u-boot/work/include/configs/omap1510.h:786:1: warning: this is the location of the previous definition
In file included from jedec_flash.c:34:
/work/wd/tmp-arm/include2/asm/io.h:213:1: warning: "inb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from jedec_flash.c:32:
/home/wd/git/u-boot/work/include/configs/omap1510.h:788:1: warning: this is the location of the previous definition
In file included from jedec_flash.c:34:
/work/wd/tmp-arm/include2/asm/io.h:214:1: warning: "inw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from jedec_flash.c:32:
/home/wd/git/u-boot/work/include/configs/omap1510.h:789:1: warning: this is the location of the previous definition
In file included from jedec_flash.c:34:
/work/wd/tmp-arm/include2/asm/io.h:215:1: warning: "inl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from jedec_flash.c:32:
/home/wd/git/u-boot/work/include/configs/omap1510.h:790:1: warning: this is the location of the previous definition
In file included from ns16550.c:11:
/work/wd/tmp-arm/include2/asm/io.h:209:1: warning: "outb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from ns16550.c:7:
/home/wd/git/u-boot/work/include/configs/omap1510.h:784:1: warning: this is the location of the previous definition
In file included from ns16550.c:11:
/work/wd/tmp-arm/include2/asm/io.h:210:1: warning: "outw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from ns16550.c:7:
/home/wd/git/u-boot/work/include/configs/omap1510.h:785:1: warning: this is the location of the previous definition
In file included from ns16550.c:11:
/work/wd/tmp-arm/include2/asm/io.h:211:1: warning: "outl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from ns16550.c:7:
/home/wd/git/u-boot/work/include/configs/omap1510.h:786:1: warning: this is the location of the previous definition
In file included from ns16550.c:11:
/work/wd/tmp-arm/include2/asm/io.h:213:1: warning: "inb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from ns16550.c:7:
/home/wd/git/u-boot/work/include/configs/omap1510.h:788:1: warning: this is the location of the previous definition
In file included from ns16550.c:11:
/work/wd/tmp-arm/include2/asm/io.h:214:1: warning: "inw" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from ns16550.c:7:
/home/wd/git/u-boot/work/include/configs/omap1510.h:789:1: warning: this is the location of the previous definition
In file included from ns16550.c:11:
/work/wd/tmp-arm/include2/asm/io.h:215:1: warning: "inl" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from ns16550.c:7:
/home/wd/git/u-boot/work/include/configs/omap1510.h:790:1: warning: this is the location of the previous definition
In file included from cmd_pcmcia.c:60:
/work/wd/tmp-arm/include2/asm/io.h:209:1: warning: "outb" redefined
In file included from /home/wd/git/u-boot/work/include/configs/netstar.h:28,
                 from /work/wd/tmp-arm/include/config.h:4,
                 from /home/wd/git/u-boot/work/include/common.h:37,
                 from cmd_pcmcia.c:56:
/home/wd/git/u-boot/work/include/configs/omap1510.h:784:1: warning: this is the location of the previous definition
..
etc. etc.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It is practically impossible to teach good programming style to  stu-
dents that have had prior exposure to BASIC: as potential programmers
they are mentally mutilated beyond hope of regeneration.   - Dijkstra


More information about the U-Boot mailing list