Deleted Added
full compact
uart_bus_isa.c (139749) uart_bus_isa.c (182159)
1/*-
1/*-
2 * Copyright (c) 2001 M. Warner Losh. All rights reserved.
2 * Copyright (c) 2008 TAKAHASHI Yoshihiro
3 * Copyright (c) 2008 Marcel Moolenaar
4 * Copyright (c) 2001 M. Warner Losh
5 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the

--- 7 unchanged lines hidden (view full) ---

18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include <sys/cdefs.h>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the

--- 7 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
26__FBSDID("$FreeBSD: head/sys/dev/uart/uart_bus_isa.c 139749 2005-01-06 01:43:34Z imp $");
29__FBSDID("$FreeBSD: head/sys/dev/uart/uart_bus_isa.c 182159 2008-08-25 14:45:24Z nyan $");
27
28#include <sys/param.h>
29#include <sys/systm.h>
30#include <sys/bus.h>
31#include <sys/conf.h>
32#include <sys/kernel.h>
33#include <sys/module.h>
34#include <machine/bus.h>

--- 101 unchanged lines hidden (view full) ---

136 {0x70307256, NULL}, /* USR3070 - U.S. Robotics 56K Voice INT */
137 {0x90307256, NULL}, /* USR3090 - USR ? */
138 {0x70917256, NULL}, /* USR9170 - U.S. Robotics 56K FAX INT */
139 {0x90917256, NULL}, /* USR9190 - USR 56k Voice INT */
140 {0x04f0235c, NULL}, /* WACF004 - Wacom Tablet PC Screen*/
141 {0x0300695c, NULL}, /* WCI0003 - Fax/Voice/Modem/Speakphone/Asvd */
142 {0x01a0896a, NULL}, /* ZTIA001 - Zoom Internal V90 Faxmodem */
143 {0x61f7896a, NULL}, /* ZTIF761 - Zoom ComStar 33.6 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/bus.h>
34#include <sys/conf.h>
35#include <sys/kernel.h>
36#include <sys/module.h>
37#include <machine/bus.h>

--- 101 unchanged lines hidden (view full) ---

139 {0x70307256, NULL}, /* USR3070 - U.S. Robotics 56K Voice INT */
140 {0x90307256, NULL}, /* USR3090 - USR ? */
141 {0x70917256, NULL}, /* USR9170 - U.S. Robotics 56K FAX INT */
142 {0x90917256, NULL}, /* USR9190 - USR 56k Voice INT */
143 {0x04f0235c, NULL}, /* WACF004 - Wacom Tablet PC Screen*/
144 {0x0300695c, NULL}, /* WCI0003 - Fax/Voice/Modem/Speakphone/Asvd */
145 {0x01a0896a, NULL}, /* ZTIA001 - Zoom Internal V90 Faxmodem */
146 {0x61f7896a, NULL}, /* ZTIF761 - Zoom ComStar 33.6 */
147 /* The following are found in PC98 hardware. */
148 {0x4180a3b8, NULL}, /* NEC8041 - PC-9821CB-B04 */
149 {0x0181a3b8, NULL}, /* NEC8101 - PC-9821CB2-B04 */
150 {0x5181a3b8, NULL}, /* NEC8151 - Internal FAX/Modem for Cx3, Cb3 */
151 {0x9181a3b8, NULL}, /* NEC8191 - PC-9801-120 */
152 {0xe181a3b8, NULL}, /* NEC81E1 - Internal FAX/Modem */
153 {0x1182a3b8, NULL}, /* NEC8211 - PC-9801-123 */
154 {0x3182a3b8, NULL}, /* NEC8231 - Internal FAX/Modem (Voice) */
155 {0x4182a3b8, NULL}, /* NEC8241 - PC-9821NR-B05 */
156 {0x5182a3b8, NULL}, /* NEC8251 - Internel FAX/Modem */
157 {0x7182a3b8, NULL}, /* NEC8271 - PC-9801-125 */
158 {0x11802fbf, NULL}, /* OYO8011 - Internal FAX/Modem (Ring) */
144 {0}
145};
146
147static int
148uart_isa_probe(device_t dev)
149{
150 struct uart_softc *sc;
151 device_t parent;
152
153 parent = device_get_parent(dev);
154 sc = device_get_softc(dev);
155
159 {0}
160};
161
162static int
163uart_isa_probe(device_t dev)
164{
165 struct uart_softc *sc;
166 device_t parent;
167
168 parent = device_get_parent(dev);
169 sc = device_get_softc(dev);
170
171 /* Check PnP IDs */
172 if (ISA_PNP_PROBE(parent, dev, isa_ns8250_ids) == ENXIO)
173 return (ENXIO);
174
156 /* Probe PnP _and_ non-PnP ns8250 here. */
175 /* Probe PnP _and_ non-PnP ns8250 here. */
157 if (ISA_PNP_PROBE(parent, dev, isa_ns8250_ids) != ENXIO) {
176#ifdef PC98
177 if (isa_get_logicalid(dev))
158 sc->sc_class = &uart_ns8250_class;
178 sc->sc_class = &uart_ns8250_class;
159 return (uart_bus_probe(dev, 0, 0, 0, 0));
160 }
161
162 /* Add checks for non-ns8250 IDs here. */
163 return (ENXIO);
179 else
180 sc->sc_class = uart_pc98_getdev(bus_get_resource_start(dev,
181 SYS_RES_IOPORT, 0));
182#else
183 sc->sc_class = &uart_ns8250_class;
184#endif
185 return (uart_bus_probe(dev, 0, 0, 0, 0));
164}
165
166DRIVER_MODULE(uart, isa, uart_isa_driver, uart_devclass, 0, 0);
186}
187
188DRIVER_MODULE(uart, isa, uart_isa_driver, uart_devclass, 0, 0);