git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
sh
/
cchips
/
hd6446x
/
hd64461
/
io.c
diff --git
a/arch/sh/cchips/hd6446x/hd64461/io.c
b/arch/sh/cchips/hd6446x/hd64461/io.c
index
4c062d6
..
7909a1b
100644
(file)
--- a/
arch/sh/cchips/hd6446x/hd64461/io.c
+++ b/
arch/sh/cchips/hd6446x/hd64461/io.c
@@
-1,12
+1,10
@@
/*
/*
- * $Id: io.c,v 1.6 2004/03/16 00:07:50 lethal Exp $
* Copyright (C) 2000 YAEGASHI Takeshi
* Typical I/O routines for HD64461 system.
*/
* Copyright (C) 2000 YAEGASHI Takeshi
* Typical I/O routines for HD64461 system.
*/
-#include <linux/config.h>
#include <asm/io.h>
#include <asm/io.h>
-#include <asm/hd64461
/hd64461
.h>
+#include <asm/hd64461.h>
#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR)
#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR)
@@
-55,11
+53,6
@@
static __inline__ unsigned long PORT2ADDR(unsigned long port)
return 0xa0000000 + (port & 0x1fffffff);
}
return 0xa0000000 + (port & 0x1fffffff);
}
-static inline void delay(void)
-{
- ctrl_inw(0xa0000000);
-}
-
unsigned char hd64461_inb(unsigned long port)
{
return *(volatile unsigned char*)PORT2ADDR(port);
unsigned char hd64461_inb(unsigned long port)
{
return *(volatile unsigned char*)PORT2ADDR(port);
@@
-68,7
+61,7
@@
unsigned char hd64461_inb(unsigned long port)
unsigned char hd64461_inb_p(unsigned long port)
{
unsigned long v = *(volatile unsigned char*)PORT2ADDR(port);
unsigned char hd64461_inb_p(unsigned long port)
{
unsigned long v = *(volatile unsigned char*)PORT2ADDR(port);
- delay();
+
ctrl_
delay();
return v;
}
return v;
}
@@
-90,7
+83,7
@@
void hd64461_outb(unsigned char b, unsigned long port)
void hd64461_outb_p(unsigned char b, unsigned long port)
{
*(volatile unsigned char*)PORT2ADDR(port) = b;
void hd64461_outb_p(unsigned char b, unsigned long port)
{
*(volatile unsigned char*)PORT2ADDR(port) = b;
- delay();
+
ctrl_
delay();
}
void hd64461_outw(unsigned short b, unsigned long port)
}
void hd64461_outw(unsigned short b, unsigned long port)
@@
-145,13
+138,13
@@
void hd64461_outsl(unsigned long port, const void *buffer, unsigned long count)
while(count--) *addr=*buf++;
}
while(count--) *addr=*buf++;
}
-unsigned short hd64461_readw(
unsigned long
addr)
+unsigned short hd64461_readw(
void __iomem *
addr)
{
{
- return
*(volatile unsigned short*)(MEM_BASE+
addr);
+ return
ctrl_inw(MEM_BASE+(unsigned long __force)
addr);
}
}
-void hd64461_writew(unsigned short b,
unsigned long
addr)
+void hd64461_writew(unsigned short b,
void __iomem *
addr)
{
{
-
*(volatile unsigned short*)(MEM_BASE+addr) = b
;
+
ctrl_outw(b, MEM_BASE+(unsigned long __force)addr)
;
}
}