This source file includes following definitions.
- vga_isa_match
- vga_isa_attach
- vga_isa_cnattach
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 #include <sys/param.h>
32 #include <sys/systm.h>
33 #include <sys/kernel.h>
34 #include <sys/device.h>
35 #include <sys/malloc.h>
36
37 #include <dev/isa/isavar.h>
38
39 #include <dev/ic/mc6845reg.h>
40 #include <dev/ic/pcdisplayvar.h>
41 #include <dev/ic/vgareg.h>
42 #include <dev/ic/vgavar.h>
43 #include <dev/isa/vga_isavar.h>
44
45 #include <dev/wscons/wsconsio.h>
46 #include <dev/wscons/wsdisplayvar.h>
47
48 struct vga_isa_softc {
49 struct device sc_dev;
50 #if 0
51 struct vga_config *sc_vc;
52 #endif
53 };
54
55 int vga_isa_match(struct device *, void *, void *);
56 void vga_isa_attach(struct device *, struct device *, void *);
57
58 struct cfattach vga_isa_ca = {
59 sizeof(struct vga_isa_softc), vga_isa_match, vga_isa_attach,
60 };
61
62 int
63 vga_isa_match(parent, match, aux)
64 struct device *parent;
65 void *match;
66 void *aux;
67 {
68 struct isa_attach_args *ia = aux;
69
70
71 if ((ia->ia_iobase != IOBASEUNK && ia->ia_iobase != 0x3b0) ||
72
73 (ia->ia_maddr != MADDRUNK && ia->ia_maddr != 0xa0000) ||
74 (ia->ia_msize != 0 && ia->ia_msize != 0x20000) ||
75 ia->ia_irq != IRQUNK || ia->ia_drq != DRQUNK)
76 return (0);
77
78 if (!vga_is_console(ia->ia_iot, WSDISPLAY_TYPE_ISAVGA) &&
79 !vga_common_probe(ia->ia_iot, ia->ia_memt))
80 return (0);
81
82 ia->ia_iobase = 0x3b0;
83 ia->ia_iosize = 0x30;
84 ia->ia_maddr = 0xa0000;
85 ia->ia_msize = 0x20000;
86 return (2);
87 }
88
89 void
90 vga_isa_attach(parent, self, aux)
91 struct device *parent, *self;
92 void *aux;
93 {
94 struct isa_attach_args *ia = aux;
95 #if 0
96 struct vga_isa_softc *sc = (struct vga_isa_softc *)self;
97 #endif
98
99 printf("\n");
100
101 vga_common_attach(self, ia->ia_iot, ia->ia_memt,
102 WSDISPLAY_TYPE_ISAVGA);
103 }
104
105 int
106 vga_isa_cnattach(iot, memt)
107 bus_space_tag_t iot, memt;
108 {
109 return (vga_cnattach(iot, memt, WSDISPLAY_TYPE_ISAVGA, 1));
110 }