3 * Copyright IBM Corp. 1999
4 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
6 * Derived from "include/asm-i386/io.h"
12 #include <linux/kernel.h>
14 #include <asm/pci_io.h>
16 #define xlate_dev_mem_ptr xlate_dev_mem_ptr
17 void *xlate_dev_mem_ptr(phys_addr_t phys);
18 #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
19 void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
22 * Convert a virtual cached pointer to an uncached pointer
24 #define xlate_dev_kmem_ptr(p) p
26 #define IO_SPACE_LIMIT 0
30 #define ioremap_nocache(addr, size) ioremap(addr, size)
31 #define ioremap_wc ioremap_nocache
33 static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
35 return (void __iomem *) offset;
38 static inline void iounmap(volatile void __iomem *addr)
43 * s390 needs a private implementation of pci_iomap since ioremap with its
44 * offset parameter isn't sufficient. That's because BAR spaces are not
45 * disjunctive on s390 so we need the bar parameter of pci_iomap to find
46 * the corresponding device and create the mapping cookie.
48 #define pci_iomap pci_iomap
49 #define pci_iounmap pci_iounmap
51 #define memcpy_fromio(dst, src, count) zpci_memcpy_fromio(dst, src, count)
52 #define memcpy_toio(dst, src, count) zpci_memcpy_toio(dst, src, count)
53 #define memset_io(dst, val, count) zpci_memset_io(dst, val, count)
55 #define __raw_readb zpci_read_u8
56 #define __raw_readw zpci_read_u16
57 #define __raw_readl zpci_read_u32
58 #define __raw_readq zpci_read_u64
59 #define __raw_writeb zpci_write_u8
60 #define __raw_writew zpci_write_u16
61 #define __raw_writel zpci_write_u32
62 #define __raw_writeq zpci_write_u64
64 #endif /* CONFIG_PCI */
66 #include <asm-generic/io.h>