Deleted Added
full compact
atkbdc_isa.c (48341) atkbdc_isa.c (49195)
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

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

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
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 *
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

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

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
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 * $Id: atkbdc_isa.c,v 1.8 1999/05/30 11:12:27 dfr Exp $
26 * $Id: atkbdc_isa.c,v 1.9 1999/06/29 17:35:09 yokota Exp $
27 */
28
29#include "atkbdc.h"
30#include "opt_kbd.h"
31
32#if NATKBDC > 0
33
34#include <sys/param.h>

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

54 int irq; /* ISA IRQ mask */
55} atkbdc_device_t;
56
57/* kbdc */
58devclass_t atkbdc_devclass;
59
60static int atkbdc_probe(device_t dev);
61static int atkbdc_attach(device_t dev);
27 */
28
29#include "atkbdc.h"
30#include "opt_kbd.h"
31
32#if NATKBDC > 0
33
34#include <sys/param.h>

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

54 int irq; /* ISA IRQ mask */
55} atkbdc_device_t;
56
57/* kbdc */
58devclass_t atkbdc_devclass;
59
60static int atkbdc_probe(device_t dev);
61static int atkbdc_attach(device_t dev);
62static void atkbdc_print_child(device_t bus, device_t dev);
62static int atkbdc_print_child(device_t bus, device_t dev);
63static int atkbdc_read_ivar(device_t bus, device_t dev, int index,
64 u_long *val);
65static int atkbdc_write_ivar(device_t bus, device_t dev, int index,
66 u_long val);
67
68static device_method_t atkbdc_methods[] = {
69 DEVMETHOD(device_probe, atkbdc_probe),
70 DEVMETHOD(device_attach, atkbdc_attach),

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

196 resource_query_unit(i));
197 }
198
199 bus_generic_attach(dev);
200
201 return 0;
202}
203
63static int atkbdc_read_ivar(device_t bus, device_t dev, int index,
64 u_long *val);
65static int atkbdc_write_ivar(device_t bus, device_t dev, int index,
66 u_long val);
67
68static device_method_t atkbdc_methods[] = {
69 DEVMETHOD(device_probe, atkbdc_probe),
70 DEVMETHOD(device_attach, atkbdc_attach),

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

196 resource_query_unit(i));
197 }
198
199 bus_generic_attach(dev);
200
201 return 0;
202}
203
204static void
204static int
205atkbdc_print_child(device_t bus, device_t dev)
206{
207 atkbdc_device_t *kbdcdev;
205atkbdc_print_child(device_t bus, device_t dev)
206{
207 atkbdc_device_t *kbdcdev;
208 int retval = 0;
208
209 kbdcdev = (atkbdc_device_t *)device_get_ivars(dev);
210
209
210 kbdcdev = (atkbdc_device_t *)device_get_ivars(dev);
211
212 retval += bus_print_child_header(bus, dev);
211 if (kbdcdev->flags != 0)
213 if (kbdcdev->flags != 0)
212 printf(" flags 0x%x", kbdcdev->flags);
214 retval += printf(" flags 0x%x", kbdcdev->flags);
213 if (kbdcdev->irq != -1)
215 if (kbdcdev->irq != -1)
214 printf(" irq %d", kbdcdev->irq);
216 retval += printf(" irq %d", kbdcdev->irq);
217 retval += bus_print_child_footer(bus, dev);
215
218
216 printf(" on %s%d", device_get_name(bus), device_get_unit(bus));
219 return (retval);
217}
218
219static int
220atkbdc_read_ivar(device_t bus, device_t dev, int index, u_long *val)
221{
222 atkbdc_device_t *ivar;
223
224 ivar = (atkbdc_device_t *)device_get_ivars(dev);

--- 41 unchanged lines hidden ---
220}
221
222static int
223atkbdc_read_ivar(device_t bus, device_t dev, int index, u_long *val)
224{
225 atkbdc_device_t *ivar;
226
227 ivar = (atkbdc_device_t *)device_get_ivars(dev);

--- 41 unchanged lines hidden ---