public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: dm9000x: use standard I/O accessors
Date: Sun, 25 Apr 2010 21:51:06 -0700	[thread overview]
Message-ID: <4BD51BBA.2020807@gmail.com> (raw)
In-Reply-To: <1271276946-7318-1-git-send-email-vapier@gentoo.org>

Mike,

ApplOn 4/14/2010 1:29 PM, Mike Frysinger wrote:
> The current dm9000x driver accesses its memory mapped registers directly
> instead of using the standard I/O accessors.  This can cause problems on
> Blackfin systems as the accesses can get out of order.  So convert the
> direct volatile dereferences to use the normal in/out macros.
>
> Signed-off-by: Mike Frysinger<vapier@gentoo.org>
> ---
>   drivers/net/dm9000x.c |   12 ++++++------
>   1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
> index a7fef56..f121286 100644
> --- a/drivers/net/dm9000x.c
> +++ b/drivers/net/dm9000x.c
> @@ -117,12 +117,12 @@ static void DM9000_iow(int reg, u8 value);
>
>   /* DM9000 network board routine ---------------------------- */
>
> -#define DM9000_outb(d,r) ( *(volatile u8 *)r = d )
> -#define DM9000_outw(d,r) ( *(volatile u16 *)r = d )
> -#define DM9000_outl(d,r) ( *(volatile u32 *)r = d )
> -#define DM9000_inb(r) (*(volatile u8 *)r)
> -#define DM9000_inw(r) (*(volatile u16 *)r)
> -#define DM9000_inl(r) (*(volatile u32 *)r)
> +#define DM9000_outb(d,r) outb(d, r)
> +#define DM9000_outw(d,r) outw(d, r)
> +#define DM9000_outl(d,r) outl(d, r)
> +#define DM9000_inb(r) inb(r)
> +#define DM9000_inw(r) inw(r)
> +#define DM9000_inl(r) inl(r)
>
>   #ifdef CONFIG_DM9000_DEBUG
>   static void
>    
Applied to net repo.

thanks,
Ben

  reply	other threads:[~2010-04-26  4:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14 20:29 [U-Boot] [PATCH] net: dm9000x: use standard I/O accessors Mike Frysinger
2010-04-26  4:51 ` Ben Warren [this message]
2010-05-07 13:37   ` Thomas Weber
2010-05-07 14:08     ` Thomas Weber

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=4BD51BBA.2020807@gmail.com \
    --to=biggerbadderben@gmail.com \
    --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