aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/cchips/hd6446x/hd64461/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/cchips/hd6446x/hd64461/io.c')
-rw-r--r--arch/sh/cchips/hd6446x/hd64461/io.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/arch/sh/cchips/hd6446x/hd64461/io.c b/arch/sh/cchips/hd6446x/hd64461/io.c
index 4c062d6b7a9737..7a16c0e0d09629 100644
--- a/arch/sh/cchips/hd6446x/hd64461/io.c
+++ b/arch/sh/cchips/hd6446x/hd64461/io.c
@@ -1,12 +1,12 @@
/*
- * $Id: io.c,v 1.6 2004/03/16 00:07:50 lethal Exp $
+ * $Id: io.c,v 1.8 2006/02/05 21:55:29 lethal Exp $
* Copyright (C) 2000 YAEGASHI Takeshi
* Typical I/O routines for HD64461 system.
*/
#include <linux/config.h>
#include <asm/io.h>
-#include <asm/hd64461/hd64461.h>
+#include <asm/hd64461.h>
#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR)
@@ -55,11 +55,6 @@ static __inline__ unsigned long PORT2ADDR(unsigned long port)
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);
@@ -68,7 +63,7 @@ unsigned char hd64461_inb(unsigned long port)
unsigned char hd64461_inb_p(unsigned long port)
{
unsigned long v = *(volatile unsigned char*)PORT2ADDR(port);
- delay();
+ ctrl_delay();
return v;
}
@@ -90,7 +85,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;
- delay();
+ ctrl_delay();
}
void hd64461_outw(unsigned short b, unsigned long port)
@@ -145,13 +140,13 @@ void hd64461_outsl(unsigned long port, const void *buffer, unsigned long count)
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);
}