public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] biosemu: include <asm/io.h> header
Date: Tue, 2 Apr 2013 10:56:58 +0200	[thread overview]
Message-ID: <20130402105658.6304114c@lilith> (raw)
In-Reply-To: <1364890454-5659-1-git-send-email-linus.walleij@linaro.org>

Hi Linus,

On Tue,  2 Apr 2013 10:14:14 +0200, Linus Walleij
<linus.walleij@linaro.org> wrote:

> This makes sure we have inline functions such as inb/outb that
> are used in these two files by including the arch-specific
> <asm/io.h> 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 <linus.walleij@linaro.org>
> ---
>  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 <asm/io.h>
>  #include <common.h>
>  #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 <asm/io.h>
>  #include <common.h>
>  #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.

  reply	other threads:[~2013-04-02  8:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02  8:14 [U-Boot] [PATCH] biosemu: include <asm/io.h> header Linus Walleij
2013-04-02  8:56 ` Albert ARIBAUD [this message]
2013-04-02 10:09   ` Linus Walleij
2013-04-02 10:32     ` Albert ARIBAUD
2013-04-03 16:02       ` Tom Rini
2013-04-03 17:07         ` Linus Walleij
2013-04-03 22:05           ` Tom Rini
2013-04-04  5:59             ` Linus Walleij
2013-04-04 20:14               ` Tom Rini
2013-04-03 15:30 ` [U-Boot] " Tom Rini

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=20130402105658.6304114c@lilith \
    --to=albert.u.boot@aribaud.net \
    --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