From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Tue, 2 Apr 2013 10:56:58 +0200 Subject: [U-Boot] [PATCH] biosemu: include header In-Reply-To: <1364890454-5659-1-git-send-email-linus.walleij@linaro.org> References: <1364890454-5659-1-git-send-email-linus.walleij@linaro.org> Message-ID: <20130402105658.6304114c@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Linus, On Tue, 2 Apr 2013 10:14:14 +0200, Linus Walleij wrote: > This makes sure we have inline functions such as inb/outb that > are used in these two files by including the arch-specific > header. However the ARM version does not provide the > accessors unless the config symbol __io is also defined so add > that in front of the include. > > After this the bios emulator will compile on ARM systems. > > Signed-off-by: Linus Walleij > --- > drivers/bios_emulator/besys.c | 2 ++ > drivers/bios_emulator/bios.c | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/drivers/bios_emulator/besys.c b/drivers/bios_emulator/besys.c > index 84724b7..ad88a53 100644 > --- a/drivers/bios_emulator/besys.c > +++ b/drivers/bios_emulator/besys.c > @@ -47,6 +47,8 @@ > * > ****************************************************************************/ > > +#define __io > +#include > #include > #include "biosemui.h" > > diff --git a/drivers/bios_emulator/bios.c b/drivers/bios_emulator/bios.c > index 7cf4879..bcc192f 100644 > --- a/drivers/bios_emulator/bios.c > +++ b/drivers/bios_emulator/bios.c > @@ -41,6 +41,8 @@ > * > ****************************************************************************/ > > +#define __io > +#include > #include > #include "biosemui.h" NAK -- no ARM target needs bios emulation, so basing the #define on ARM requirements is incorrect. Actually, ARM targets build drivers/bios_emulator/libatibiosemu.o as the result of an overlook in ./Makefile where this object is compiled unconditionally. A git grep CONFIG_BIOSEMU seems to indicate only a handful of PowerPC targets need bios emulation; I suggest doing a V2 of this patch where the object is built only for PowerPC, and the #define is removed. Amicalement, -- Albert.