Ultimately we want the ColdFire IO access support to be consisent no matter
whether it is configured with MMU enabled or disabled. To acheive that we
need to get all the ColdFire IO access support code together in one place,
in this case io_no.h. The last big piece not in io_no.h is the PCI bus
support functions.

Define the IO mapping addresses required to use the asm-generic IO
access functions. They can provide everything we need - no need for us
to duplicate or have local in/out or read/write access functions.
Note that this support is not active yet, since we haven't done the
full switch over to using the asm-generic functions yet. And also note
that we do not yet remove the old PCI functions from io_mm.h yet.

Consolodating all this IO access support in a single place will make
it easier in the future to enable PCI bus support for non-MMU enabled
ColdFire (which we currently cannot do).

Signed-off-by: Greg Ungerer <g...@linux-m68k.org>
 arch/m68k/include/asm/io_no.h | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h
index c97c281..a3d23e8 100644
--- a/arch/m68k/include/asm/io_no.h
+++ b/arch/m68k/include/asm/io_no.h
@@ -18,6 +18,35 @@
 #define __raw_writew(b, addr) (void)((*(volatile unsigned short *) (addr)) = 
 #define __raw_writel(b, addr) (void)((*(volatile unsigned int *) (addr)) = (b))
+#if defined(CONFIG_PCI) && defined(CONFIG_COLDFIRE)
+ * Support for PCI bus access uses the asm-generic access functions.
+ * We need to supply the base address and masks for the normal memory
+ * and IO address space mappings.
+ */
+#include <asm/byteorder.h>
+#include <asm/coldfire.h>
+#include <asm/mcfsim.h>
+#define PCI_MEM_PA     0xf0000000              /* Host physical address */
+#define PCI_MEM_BA     0xf0000000              /* Bus physical address */
+#define PCI_MEM_SIZE   0x08000000              /* 128 MB */
+#define PCI_MEM_MASK   (PCI_MEM_SIZE - 1)
+#define PCI_IO_PA      0xf8000000              /* Host physical address */
+#define PCI_IO_BA      0x00000000              /* Bus physical address */
+#define PCI_IO_SIZE    0x00010000              /* 64k */
+#define PCI_IO_MASK    (PCI_IO_SIZE - 1)
+#define PIO_OFFSET     0
+#define PIO_MASK       0xffff
+#define PIO_RESERVED   0x10000
+#define PCI_IOBASE     ((void __iomem *) PCI_IO_PA)
 #define readb __raw_readb
 #define readw __raw_readw
 #define readl __raw_readl
@@ -25,6 +54,8 @@
 #define writew __raw_writew
 #define writel __raw_writel
 #include <asm/kmap.h>
 #include <asm/virtconvert.h>
 #include <asm-generic/io.h>

To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to