1 /* SPDX-License-Identifier: GPL-2.0 */
4 * Copyright IBM Corp. 1999
5 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
7 * Derived from "include/asm-i386/io.h"
13 #include <linux/kernel.h>
15 #include <asm/pci_io.h>
17 #define xlate_dev_mem_ptr xlate_dev_mem_ptr
18 void *xlate_dev_mem_ptr(phys_addr_t phys
);
19 #define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
20 void unxlate_dev_mem_ptr(phys_addr_t phys
, void *addr
);
23 * Convert a virtual cached pointer to an uncached pointer
25 #define xlate_dev_kmem_ptr(p) p
27 #define IO_SPACE_LIMIT 0
29 void __iomem
*ioremap(unsigned long offset
, unsigned long size
);
30 void iounmap(volatile void __iomem
*addr
);
32 static inline void __iomem
*ioport_map(unsigned long port
, unsigned int nr
)
37 static inline void ioport_unmap(void __iomem
*p
)
44 * s390 needs a private implementation of pci_iomap since ioremap with its
45 * offset parameter isn't sufficient. That's because BAR spaces are not
46 * disjunctive on s390 so we need the bar parameter of pci_iomap to find
47 * the corresponding device and create the mapping cookie.
49 #define pci_iomap pci_iomap
50 #define pci_iomap_range pci_iomap_range
51 #define pci_iounmap pci_iounmap
52 #define pci_iomap_wc pci_iomap_wc
53 #define pci_iomap_wc_range pci_iomap_wc_range
55 #define memcpy_fromio(dst, src, count) zpci_memcpy_fromio(dst, src, count)
56 #define memcpy_toio(dst, src, count) zpci_memcpy_toio(dst, src, count)
57 #define memset_io(dst, val, count) zpci_memset_io(dst, val, count)
59 #define mmiowb() zpci_barrier()
61 #define __raw_readb zpci_read_u8
62 #define __raw_readw zpci_read_u16
63 #define __raw_readl zpci_read_u32
64 #define __raw_readq zpci_read_u64
65 #define __raw_writeb zpci_write_u8
66 #define __raw_writew zpci_write_u16
67 #define __raw_writel zpci_write_u32
68 #define __raw_writeq zpci_write_u64
70 #endif /* CONFIG_PCI */
72 #include <asm-generic/io.h>