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

Andreas Bießmann biessmann at corscience.de
Tue May 25 10:15:04 CEST 2010


Dear Wolfgang,

Am 21.05.2010 23:07, schrieb Wolfgang Denk:
> 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:

[snip lot of redefine warnings]

Warnings appeared due to too little testing on my side ... sorry for
that. Is there an easy way to build all e.g. arm-related
boards/configuration-sets in a test run?

We should discuss where to fix this issue.

It is a fact that commit a45dde2293c816138e53c26eca6fd0322583f9a6 breaks
compilation of arm boards using dm9000x driver.

Another fact is that mostly all arch/asm/io.h defines {in|out}[bxl]
macros except for arm (and sparc, they name them __arch_{put|get}[bwl]).
Arm defines them conditionally only if the macro __io(p) is defined.
By some reason omap1510 defines his own {in|out}[bxl]. My first argument
for removing this is that this boards definition is the only one
defining his own {in|out}[bxl] -> '# grep -nr outb\( include/configs/'
The second one is that kind of the definition is so common to put it in
generic arch/asm/io.h.

The other way around we could define the {in|out}[bxl] macros everywhere
is needed in board specific configuration files. Namely there are at least:

---8<---
grep -nr CONFIG_DRIVER_DM9000 include/configs/
include/configs/pm9261.h:248:#define CONFIG_DRIVER_DM9000			1
include/configs/davinci_dm355evm.h:55:#define CONFIG_DRIVER_DM9000		1
include/configs/scb9328.h:259:#define CONFIG_DRIVER_DM9000		1
include/configs/trizepsiv.h:292:#define CONFIG_DRIVER_DM9000		1
include/configs/devkit8000.h:75:#define	CONFIG_DRIVER_DM9000		1
include/configs/M5253DEMO.h:92:#define CONFIG_DRIVER_DM9000
include/configs/M5253DEMO.h:93:#ifdef CONFIG_DRIVER_DM9000
include/configs/davinci_dm355leopard.h:54:#define CONFIG_DRIVER_DM9000		1
include/configs/at91sam9261ek.h:146:#define CONFIG_DRIVER_DM9000		1
include/configs/ip04.h:75:#define CONFIG_DRIVER_DM9000	1
--->8---

(most of them are proven to be arm related)

The only argument doing this is ... we need a working DM9000 driver ;)

Any other comments?

I'm willing to build another patch but like to have this discussed before.

I think the easiest way to solve this is to create another patch
including exactely the changes sent before plus removing {in|out}[bxl]
macros in omap1510.h.

regards

Andreas Bießmann


More information about the U-Boot mailing list