1#ifndef __GENERIC_IO_H
2#define __GENERIC_IO_H
3
4#include <linux/linkage.h>
5#include <asm/byteorder.h>
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28extern unsigned int ioread8(void __iomem *);
29extern unsigned int ioread16(void __iomem *);
30extern unsigned int ioread16be(void __iomem *);
31extern unsigned int ioread32(void __iomem *);
32extern unsigned int ioread32be(void __iomem *);
33
34extern void iowrite8(u8, void __iomem *);
35extern void iowrite16(u16, void __iomem *);
36extern void iowrite16be(u16, void __iomem *);
37extern void iowrite32(u32, void __iomem *);
38extern void iowrite32be(u32, void __iomem *);
39
40
41
42
43
44
45
46
47
48
49
50
51extern void ioread8_rep(void __iomem *port, void *buf, unsigned long count);
52extern void ioread16_rep(void __iomem *port, void *buf, unsigned long count);
53extern void ioread32_rep(void __iomem *port, void *buf, unsigned long count);
54
55extern void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count);
56extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count);
57extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count);
58
59#ifdef CONFIG_HAS_IOPORT
60
61extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
62extern void ioport_unmap(void __iomem *);
63#endif
64
65#ifndef ARCH_HAS_IOREMAP_WC
66#define ioremap_wc ioremap_nocache
67#endif
68
69#ifdef CONFIG_PCI
70
71struct pci_dev;
72extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
73#elif defined(CONFIG_GENERIC_IOMAP)
74struct pci_dev;
75static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
76{ }
77#endif
78
79#include <asm-generic/pci_iomap.h>
80
81#endif
82