atkbdc_isa.c (58272) | atkbdc_isa.c (59783) |
---|---|
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 * $FreeBSD: head/sys/dev/atkbdc/atkbdc_isa.c 58272 2000-03-19 04:37:18Z yokota $ | 26 * $FreeBSD: head/sys/dev/atkbdc/atkbdc_isa.c 59783 2000-04-30 10:01:56Z bde $ |
27 */ 28 29#include "opt_kbd.h" 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/bus.h> --- 22 unchanged lines hidden (view full) --- 57 58/* kbdc */ 59devclass_t atkbdc_devclass; 60 61static int atkbdc_probe(device_t dev); 62static int atkbdc_attach(device_t dev); 63static int atkbdc_print_child(device_t bus, device_t dev); 64static int atkbdc_read_ivar(device_t bus, device_t dev, int index, | 27 */ 28 29#include "opt_kbd.h" 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/bus.h> --- 22 unchanged lines hidden (view full) --- 57 58/* kbdc */ 59devclass_t atkbdc_devclass; 60 61static int atkbdc_probe(device_t dev); 62static int atkbdc_attach(device_t dev); 63static int atkbdc_print_child(device_t bus, device_t dev); 64static int atkbdc_read_ivar(device_t bus, device_t dev, int index, |
65 u_long *val); | 65 uintptr_t *val); |
66static int atkbdc_write_ivar(device_t bus, device_t dev, int index, | 66static int atkbdc_write_ivar(device_t bus, device_t dev, int index, |
67 u_long val); | 67 uintptr_t val); |
68 69static device_method_t atkbdc_methods[] = { 70 DEVMETHOD(device_probe, atkbdc_probe), 71 DEVMETHOD(device_attach, atkbdc_attach), 72 DEVMETHOD(device_suspend, bus_generic_suspend), 73 DEVMETHOD(device_resume, bus_generic_resume), 74 75 DEVMETHOD(bus_print_child, atkbdc_print_child), --- 173 unchanged lines hidden (view full) --- 249 if (kbdcdev->irq != -1) 250 retval += printf(" irq %d", kbdcdev->irq); 251 retval += bus_print_child_footer(bus, dev); 252 253 return (retval); 254} 255 256static int | 68 69static device_method_t atkbdc_methods[] = { 70 DEVMETHOD(device_probe, atkbdc_probe), 71 DEVMETHOD(device_attach, atkbdc_attach), 72 DEVMETHOD(device_suspend, bus_generic_suspend), 73 DEVMETHOD(device_resume, bus_generic_resume), 74 75 DEVMETHOD(bus_print_child, atkbdc_print_child), --- 173 unchanged lines hidden (view full) --- 249 if (kbdcdev->irq != -1) 250 retval += printf(" irq %d", kbdcdev->irq); 251 retval += bus_print_child_footer(bus, dev); 252 253 return (retval); 254} 255 256static int |
257atkbdc_read_ivar(device_t bus, device_t dev, int index, u_long *val) | 257atkbdc_read_ivar(device_t bus, device_t dev, int index, uintptr_t *val) |
258{ 259 atkbdc_device_t *ivar; 260 261 ivar = (atkbdc_device_t *)device_get_ivars(dev); 262 switch (index) { 263 case KBDC_IVAR_IRQ: 264 *val = (u_long)ivar->irq; 265 break; --- 14 unchanged lines hidden (view full) --- 280 break; 281 default: 282 return ENOENT; 283 } 284 return 0; 285} 286 287static int | 258{ 259 atkbdc_device_t *ivar; 260 261 ivar = (atkbdc_device_t *)device_get_ivars(dev); 262 switch (index) { 263 case KBDC_IVAR_IRQ: 264 *val = (u_long)ivar->irq; 265 break; --- 14 unchanged lines hidden (view full) --- 280 break; 281 default: 282 return ENOENT; 283 } 284 return 0; 285} 286 287static int |
288atkbdc_write_ivar(device_t bus, device_t dev, int index, u_long val) | 288atkbdc_write_ivar(device_t bus, device_t dev, int index, uintptr_t val) |
289{ 290 atkbdc_device_t *ivar; 291 292 ivar = (atkbdc_device_t *)device_get_ivars(dev); 293 switch (index) { 294 case KBDC_IVAR_IRQ: 295 ivar->irq = (int)val; 296 break; --- 22 unchanged lines hidden --- | 289{ 290 atkbdc_device_t *ivar; 291 292 ivar = (atkbdc_device_t *)device_get_ivars(dev); 293 switch (index) { 294 case KBDC_IVAR_IRQ: 295 ivar->irq = (int)val; 296 break; --- 22 unchanged lines hidden --- |