All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] drivers/block/systemace: replaced in16/out16 with more common readw/writew macros
@ 2013-01-02 15:06 Alexey Brodkin
  2013-01-02 15:19 ` Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alexey Brodkin @ 2013-01-02 15:06 UTC (permalink / raw)
  To: u-boot

Most architectures don't have symbols "in16"/"out16" defined.
Only Microblaze/PowerPC/Spark architectures do have them defined.

At the same time there're much more common macros "readw"/"writew" for
16-bit data access defined in most of architectures (in
linux kernel header "io.h").

So use of "readw"/"writew" makes it possible to build this driver for
virtually any architecture.

Signed-off-by: Alexey Brodkin <alexey.brodkin@gmail.com>
---
 drivers/block/systemace.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c
index 88561a7..32c9169 100644
--- a/drivers/block/systemace.c
+++ b/drivers/block/systemace.c
@@ -67,7 +67,7 @@ static void ace_writew(u16 val, unsigned off)
 #endif
 	}
 	else
-		out16(base + off, val);
+		writew(val, base + off);
 }
 
 static u16 ace_readw(unsigned off)
@@ -80,7 +80,7 @@ static u16 ace_readw(unsigned off)
 #endif
 	}
 	else
-		return in16(base + off);
+		return readw(base + off);
 }
 
 static unsigned long systemace_read(int dev, unsigned long start,
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-04 10:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-02 15:06 [U-Boot] [PATCH] drivers/block/systemace: replaced in16/out16 with more common readw/writew macros Alexey Brodkin
2013-01-02 15:19 ` Michal Simek
2013-01-02 20:23 ` Wolfgang Denk
2013-01-03 11:35   ` Алексей Бродкин
2013-01-03 12:05 ` Wolfgang Denk
     [not found]   ` <CAML3pwX=dfC4vfRfg-Rft5Xuem7q4-7VjtmySvitzWzY3z8JBg@mail.gmail.com>
2013-01-03 12:37     ` Wolfgang Denk
2013-01-04  9:29       ` Алексей Бродкин
2013-01-04 10:22         ` Wolfgang Denk
2013-01-03 13:03   ` Michal Simek
2013-01-03 13:38     ` Wolfgang Denk
2013-01-03 13:53       ` Michal Simek
2013-01-03 14:37         ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.