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