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