This source file includes following definitions.
- inb_local
- outb_local
- inb
- inw
- outb
- outw
- outl
- readb
- readw
- readl
- writeb
- writew
- writel
- mapioaddr
1 #ifndef __SPARC_IO_H
2 #define __SPARC_IO_H
3
4 #include <linux/kernel.h>
5
6 #include <asm/page.h>
7 #include <asm/system.h>
8
9
10
11
12
13
14
15
16 extern inline unsigned long inb_local(unsigned long addr)
17 {
18 return 0;
19 }
20
21 extern inline void outb_local(unsigned char b, unsigned long addr)
22 {
23 return;
24 }
25
26 extern inline unsigned long inb(unsigned long addr)
27 {
28 return 0;
29 }
30
31 extern inline unsigned long inw(unsigned long addr)
32 {
33 return 0;
34 }
35
36 extern inline unsigned long inl(unsigned long addr)
37 {
38 return 0;
39 }
40
41 extern inline void outb(unsigned char b, unsigned long addr)
42 {
43 return;
44 }
45
46 extern inline void outw(unsigned short b, unsigned long addr)
47 {
48 return;
49 }
50
51 extern inline void outl(unsigned int b, unsigned long addr)
52 {
53 return;
54 }
55
56
57
58
59 extern inline unsigned long readb(unsigned long addr)
60 {
61 return 0;
62 }
63
64 extern inline unsigned long readw(unsigned long addr)
65 {
66 return 0;
67 }
68
69 extern inline unsigned long readl(unsigned long addr)
70 {
71 return 0;
72 }
73
74 extern inline void writeb(unsigned short b, unsigned long addr)
75 {
76 return;
77 }
78
79 extern inline void writew(unsigned short b, unsigned long addr)
80 {
81 return;
82 }
83
84 extern inline void writel(unsigned int b, unsigned long addr)
85 {
86 return;
87 }
88
89 #define inb_p inb
90 #define outb_p outb
91
92 extern void sun4c_mapioaddr(unsigned long, unsigned long, int bus_type, int rdonly);
93 extern void srmmu_mapioaddr(unsigned long, unsigned long, int bus_type, int rdonly);
94
95 extern inline void mapioaddr(unsigned long physaddr, unsigned long virt_addr,
96 int bus, int rdonly)
97 {
98 switch(sparc_cpu_model) {
99 case sun4c:
100 sun4c_mapioaddr(physaddr, virt_addr, bus, rdonly);
101 break;
102 case sun4m:
103 case sun4d:
104 case sun4e:
105 srmmu_mapioaddr(physaddr, virt_addr, bus, rdonly);
106 break;
107 default:
108 printk("mapioaddr: Trying to map IO space for unsupported machine.\n");
109 printk("mapioaddr: sparc_cpu_model = %d\n", sparc_cpu_model);
110 printk("mapioaddr: Halting...\n");
111 halt();
112 };
113 return;
114 }
115
116 extern void *sparc_alloc_io (void *, void *, int, char *, int, int);
117 extern void *sparc_dvma_malloc (int, char *);
118
119 #endif