sh: hd64461 tidying.
Kristoffer Ericson [Tue, 17 Jul 2007 04:52:38 +0000 (13:52 +0900)]
Kill off the hd64461 io.c, as all of the hd64461 users are now
using the generic I/O routines.

[ hd64461/ moved to hd64461.c by Paul ]

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

arch/sh/Makefile
arch/sh/cchips/hd6446x/Makefile [new file with mode: 0644]
arch/sh/cchips/hd6446x/hd64461.c [moved from arch/sh/cchips/hd6446x/hd64461/setup.c with 98% similarity]
arch/sh/cchips/hd6446x/hd64461/Makefile [deleted file]
arch/sh/cchips/hd6446x/hd64461/io.c [deleted file]

index 77fecc6..0016609 100644 (file)
@@ -121,8 +121,7 @@ core-y      += $(addprefix arch/sh/boards/, \
 endif
 
 # Companion chips
-core-$(CONFIG_HD64461)         += arch/sh/cchips/hd6446x/hd64461/
-core-$(CONFIG_HD64465)         += arch/sh/cchips/hd6446x/hd64465/
+core-$(CONFIG_HD6446X_SERIES)  += arch/sh/cchips/hd6446x/
 core-$(CONFIG_VOYAGERGX)       += arch/sh/cchips/voyagergx/
 
 cpuincdir-$(CONFIG_CPU_SH2)    := cpu-sh2
diff --git a/arch/sh/cchips/hd6446x/Makefile b/arch/sh/cchips/hd6446x/Makefile
new file mode 100644 (file)
index 0000000..a106dd9
--- /dev/null
@@ -0,0 +1,2 @@
+obj-$(CONFIG_HD64461)  += hd64461.o
+obj-$(CONFIG_HD64465)  += hd64465/
similarity index 98%
rename from arch/sh/cchips/hd6446x/hd64461/setup.c
rename to arch/sh/cchips/hd6446x/hd64461.c
index 4d49b5c..97f6512 100644 (file)
@@ -1,5 +1,4 @@
 /*
- *     $Id: setup.c,v 1.5 2004/03/16 00:07:50 lethal Exp $
  *     Copyright (C) 2000 YAEGASHI Takeshi
  *     Hitachi HD64461 companion chip support
  */
diff --git a/arch/sh/cchips/hd6446x/hd64461/Makefile b/arch/sh/cchips/hd6446x/hd64461/Makefile
deleted file mode 100644 (file)
index bff4b92..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Makefile for the HD64461 
-#
-
-obj-y   := setup.o io.o
-
diff --git a/arch/sh/cchips/hd6446x/hd64461/io.c b/arch/sh/cchips/hd6446x/hd64461/io.c
deleted file mode 100644 (file)
index 7909a1b..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *     Copyright (C) 2000 YAEGASHI Takeshi
- *     Typical I/O routines for HD64461 system.
- */
-
-#include <asm/io.h>
-#include <asm/hd64461.h>
-
-#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR)
-
-static __inline__ unsigned long PORT2ADDR(unsigned long port)
-{
-       /* 16550A: HD64461 internal */
-       if (0x3f8<=port && port<=0x3ff)
-               return CONFIG_HD64461_IOBASE + 0x8000 + ((port-0x3f8)<<1);
-       if (0x2f8<=port && port<=0x2ff)
-               return CONFIG_HD64461_IOBASE + 0x7000 + ((port-0x2f8)<<1);
-
-#ifdef CONFIG_HD64461_ENABLER
-       /* NE2000: HD64461 PCMCIA channel 0 (I/O) */
-       if (0x300<=port && port<=0x31f)
-               return 0xba000000 + port;
-
-       /* ide0: HD64461 PCMCIA channel 1 (memory) */
-       /* On HP690, CF in slot 1 is configured as a memory card
-          device.  See CF+ and CompactFlash Specification for the
-          detail of CF's memory mapped addressing. */
-       if (0x1f0<=port && port<=0x1f7) return 0xb5000000 + port;
-       if (port == 0x3f6) return 0xb50001fe;
-       if (port == 0x3f7) return 0xb50001ff;
-
-       /* ide1 */
-       if (0x170<=port && port<=0x177) return 0xba000000 + port;
-       if (port == 0x376) return 0xba000376;
-       if (port == 0x377) return 0xba000377;
-#endif
-
-       /* ??? */
-       if (port < 0xf000) return 0xa0000000 + port;
-       /* PCMCIA channel 0, I/O (0xba000000) */
-       if (port < 0x10000) return 0xba000000 + port - 0xf000;
-
-       /* HD64461 internal devices (0xb0000000) */
-       if (port < 0x20000) return CONFIG_HD64461_IOBASE + port - 0x10000;
-
-       /* PCMCIA channel 0, I/O (0xba000000) */
-       if (port < 0x30000) return 0xba000000 + port - 0x20000;
-
-       /* PCMCIA channel 1, memory (0xb5000000) */
-       if (port < 0x40000) return 0xb5000000 + port - 0x30000;
-
-       /* Whole physical address space (0xa0000000) */
-       return 0xa0000000 + (port & 0x1fffffff);
-}
-
-unsigned char hd64461_inb(unsigned long port)
-{
-       return *(volatile unsigned char*)PORT2ADDR(port);
-}
-
-unsigned char hd64461_inb_p(unsigned long port)
-{
-       unsigned long v = *(volatile unsigned char*)PORT2ADDR(port);
-       ctrl_delay();
-       return v;
-}
-
-unsigned short hd64461_inw(unsigned long port)
-{
-       return *(volatile unsigned short*)PORT2ADDR(port);
-}
-
-unsigned int hd64461_inl(unsigned long port)
-{
-       return *(volatile unsigned long*)PORT2ADDR(port);
-}
-
-void hd64461_outb(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;
-       ctrl_delay();
-}
-
-void hd64461_outw(unsigned short b, unsigned long port)
-{
-       *(volatile unsigned short*)PORT2ADDR(port) = b;
-}
-
-void hd64461_outl(unsigned int b, unsigned long port)
-{
-        *(volatile unsigned long*)PORT2ADDR(port) = b;
-}
-
-void hd64461_insb(unsigned long port, void *buffer, unsigned long count)
-{
-       volatile unsigned char* addr=(volatile unsigned char*)PORT2ADDR(port);
-       unsigned char *buf=buffer;
-       while(count--) *buf++=*addr;
-}
-
-void hd64461_insw(unsigned long port, void *buffer, unsigned long count)
-{
-       volatile unsigned short* addr=(volatile unsigned short*)PORT2ADDR(port);
-       unsigned short *buf=buffer;
-       while(count--) *buf++=*addr;
-}
-
-void hd64461_insl(unsigned long port, void *buffer, unsigned long count)
-{
-       volatile unsigned long* addr=(volatile unsigned long*)PORT2ADDR(port);
-       unsigned long *buf=buffer;
-       while(count--) *buf++=*addr;
-}
-
-void hd64461_outsb(unsigned long port, const void *buffer, unsigned long count)
-{
-       volatile unsigned char* addr=(volatile unsigned char*)PORT2ADDR(port);
-       const unsigned char *buf=buffer;
-       while(count--) *addr=*buf++;
-}
-
-void hd64461_outsw(unsigned long port, const void *buffer, unsigned long count)
-{
-       volatile unsigned short* addr=(volatile unsigned short*)PORT2ADDR(port);
-       const unsigned short *buf=buffer;
-       while(count--) *addr=*buf++;
-}
-
-void hd64461_outsl(unsigned long port, const void *buffer, unsigned long count)
-{
-       volatile unsigned long* addr=(volatile unsigned long*)PORT2ADDR(port);
-       const unsigned long *buf=buffer;
-       while(count--) *addr=*buf++;
-}
-
-unsigned short hd64461_readw(void __iomem *addr)
-{
-       return ctrl_inw(MEM_BASE+(unsigned long __force)addr);
-}
-
-void hd64461_writew(unsigned short b, void __iomem *addr)
-{
-       ctrl_outw(b, MEM_BASE+(unsigned long __force)addr);
-}
-