public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <biessmann@corscience.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm:io.h: define __io() macro if not defined erlier
Date: Wed, 26 May 2010 11:49:21 +0200	[thread overview]
Message-ID: <4BFCEEA1.3080202@corscience.de> (raw)
In-Reply-To: <20100525112907.0E0A9E22AD1@gemini.denx.de>

Dear Wolfgang,

Am 25.05.2010 13:29, schrieb Wolfgang Denk:
> In message <4BFB8708.4010408@corscience.de> you wrote:

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

Well ... this statement was a bit precipitate. Just defining __io() to
get {in|out}[bwl] macros in asm/io.h for arch arm is dangerous cause the
enabled macros do conversion from/to little endian. This is ok for
some/most current arm devices but may be wrong for older ones (eg.
omap1510).

> Sounds like a plan to me.

I can not test the generated code on omap1510 therefore my current
suggestion is to modify commit a45dde2293c816138e53c26eca6fd0322583f9a6
to something like attached at end of this message. Each devices asm/io.h
using dm9000x defines __raw_{read|write}[bwl] and therefore it would be
an easy task (easier than rewriting arm asm/io.h).

Ben and Mike, can you please give a statement to this suggestion?

regards

Andreas Bie?mann

---
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index f121286..84f67b1 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) 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)
+#define DM9000_outb(d,r) __raw_writeb(d, r)
+#define DM9000_outw(d,r) __raw_writew(d, r)
+#define DM9000_outl(d,r) __raw_writel(d, r)
+#define DM9000_inb(r) __raw_readb(r)
+#define DM9000_inw(r) __raw_readw(r)
+#define DM9000_inl(r) __raw_readl(r)

 #ifdef CONFIG_DM9000_DEBUG
 static void

  reply	other threads:[~2010-05-26  9:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19  8:57 [U-Boot] [PATCH] arm:io.h: define __io() macro if not defined erlier Andreas Bießmann
2010-05-19 14:34 ` Thomas Weber
2010-05-21 21:07 ` Wolfgang Denk
2010-05-25  8:15   ` Andreas Bießmann
2010-05-25 11:29     ` Wolfgang Denk
2010-05-26  9:49       ` Andreas Bießmann [this message]
2010-05-26 17:50         ` Mike Frysinger
2010-05-26 20:19           ` Wolfgang Denk

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=4BFCEEA1.3080202@corscience.de \
    --to=biessmann@corscience.de \
    --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