From 140c1729a221dc6eacfcbf2a073dbf00fad13e43 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 7 Dec 2006 15:35:43 +0100 Subject: [MIPS] Iomap implementation. This implementation has support for the concept of one separate ioport address space by PCI domain. A pointer to the virtual address where the port space of a domain has been mapped has been added to struct pci_controller and systems should be fixed to fill in this value. For single domain systems this will be the same value as passed to set_io_port_base(). Signed-off-by: Ralf Baechle --- include/asm-mips/io.h | 29 +---------------------------- include/asm-mips/pci.h | 1 + 2 files changed, 2 insertions(+), 28 deletions(-) (limited to 'include/asm-mips') diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index b6a2eb816628..92ec2618560c 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -517,34 +518,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int memcpy((void __force *) dst, src, count); } -/* - * Memory Mapped I/O - */ -#define ioread8(addr) readb(addr) -#define ioread16(addr) readw(addr) -#define ioread32(addr) readl(addr) - -#define iowrite8(b,addr) writeb(b,addr) -#define iowrite16(w,addr) writew(w,addr) -#define iowrite32(l,addr) writel(l,addr) - -#define ioread8_rep(a,b,c) readsb(a,b,c) -#define ioread16_rep(a,b,c) readsw(a,b,c) -#define ioread32_rep(a,b,c) readsl(a,b,c) - -#define iowrite8_rep(a,b,c) writesb(a,b,c) -#define iowrite16_rep(a,b,c) writesw(a,b,c) -#define iowrite32_rep(a,b,c) writesl(a,b,c) - -/* Create a virtual mapping cookie for an IO port range */ -extern void __iomem *ioport_map(unsigned long port, unsigned int nr); -extern void ioport_unmap(void __iomem *); - -/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ -struct pci_dev; -extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); -extern void pci_iounmap(struct pci_dev *dev, void __iomem *); - /* * ISA space is 'always mapped' on currently supported MIPS systems, no need * to explicitly ioremap() it. The fact that the ISA IO space is mapped diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index 7f0f120ca07c..3eea3ba0fca5 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h @@ -32,6 +32,7 @@ struct pci_controller { unsigned long mem_offset; struct resource *io_resource; unsigned long io_offset; + unsigned long io_map_base; unsigned int index; /* For compatibility with current (as of July 2003) pciutils -- cgit v1.2.2