This source file includes following definitions.
- auxio_probe
1
2
3
4
5
6 #include <asm/oplib.h>
7 #include <asm/io.h>
8
9
10 unsigned char *auxio_register;
11
12 void
13 auxio_probe(void)
14 {
15 int node, auxio_nd;
16 struct linux_prom_registers auxregs[1];
17
18 node = prom_getchild(prom_root_node);
19 auxio_nd = prom_searchsiblings(node, "auxiliary-io");
20 if(!auxio_nd) {
21 node = prom_searchsiblings(node, "obio");
22 node = prom_getchild(node);
23 auxio_nd = prom_searchsiblings(node, "auxio");
24 if(!auxio_nd) {
25 prom_printf("Cannot find auxio node, cannot continue...\n");
26 prom_halt();
27 }
28 }
29 prom_getproperty(auxio_nd, "reg", (char *) auxregs, sizeof(auxregs));
30 prom_apply_obio_ranges(auxregs, 0x1);
31
32 auxio_register = (unsigned char *) sparc_alloc_io(auxregs[0].phys_addr, 0,
33 auxregs[0].reg_size,
34 "auxilliaryIO",
35 auxregs[0].which_io, 0x0);
36
37 if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 ||
38 sparc_cpu_model == sun4c)
39 auxio_register = (unsigned char *) ((int)auxio_register | 3);
40 }