Deleted Added
sdiff udiff text old ( 147271 ) new ( 158041 )
full compact
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/dev/atkbdc/atkbdc_isa.c 147271 2005-06-10 20:56:38Z marius $");
29
30#include "opt_kbd.h"
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/kernel.h>
35#include <sys/module.h>
36#include <sys/bus.h>

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

88atkbdc_isa_probe(device_t dev)
89{
90 struct resource *port0;
91 struct resource *port1;
92 u_long start;
93 u_long count;
94 int error;
95 int rid;
96
97 /* check PnP IDs */
98 if (ISA_PNP_PROBE(device_get_parent(dev), dev, atkbdc_ids) == ENXIO)
99 return ENXIO;
100
101 device_set_desc(dev, "Keyboard controller (i8042)");
102
103 /*

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

122 if (bus_get_resource(dev, SYS_RES_IOPORT, rid, NULL, NULL) != 0)
123 bus_set_resource(dev, SYS_RES_IOPORT, 1,
124 start + KBD_STATUS_PORT, 1);
125 port1 = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE);
126 if (port1 == NULL) {
127 bus_release_resource(dev, SYS_RES_IOPORT, 0, port0);
128 return ENXIO;
129 }
130 device_verbose(dev);
131
132 error = atkbdc_probe_unit(device_get_unit(dev), port0, port1);
133 if (error == 0)
134 bus_generic_probe(dev);
135
136 bus_release_resource(dev, SYS_RES_IOPORT, 0, port0);
137 bus_release_resource(dev, SYS_RES_IOPORT, 1, port1);

--- 98 unchanged lines hidden ---