| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: npx_isa.c,v 1.20 2009/04/02 00:09:32 dyoung Exp $ */ | | 1 | /* $NetBSD: npx_isa.c,v 1.21 2009/05/04 12:38:51 cegger Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1991 The Regents of the University of California. | | 4 | * Copyright (c) 1991 The Regents of the University of California. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -57,51 +57,51 @@ | | | @@ -57,51 +57,51 @@ |
57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
64 | * SUCH DAMAGE. | | 64 | * SUCH DAMAGE. |
65 | * | | 65 | * |
66 | * @(#)npx.c 7.2 (Berkeley) 5/12/91 | | 66 | * @(#)npx.c 7.2 (Berkeley) 5/12/91 |
67 | */ | | 67 | */ |
68 | | | 68 | |
69 | #include <sys/cdefs.h> | | 69 | #include <sys/cdefs.h> |
70 | __KERNEL_RCSID(0, "$NetBSD: npx_isa.c,v 1.20 2009/04/02 00:09:32 dyoung Exp $"); | | 70 | __KERNEL_RCSID(0, "$NetBSD: npx_isa.c,v 1.21 2009/05/04 12:38:51 cegger Exp $"); |
71 | | | 71 | |
72 | #include <sys/param.h> | | 72 | #include <sys/param.h> |
73 | #include <sys/systm.h> | | 73 | #include <sys/systm.h> |
74 | #include <sys/device.h> | | 74 | #include <sys/device.h> |
75 | | | 75 | |
76 | #include <machine/bus.h> | | 76 | #include <machine/bus.h> |
77 | #include <machine/cpufunc.h> | | 77 | #include <machine/cpufunc.h> |
78 | #include <machine/intr.h> | | 78 | #include <machine/intr.h> |
79 | #include <machine/specialreg.h> | | 79 | #include <machine/specialreg.h> |
80 | | | 80 | |
81 | #include <dev/isa/isareg.h> | | 81 | #include <dev/isa/isareg.h> |
82 | #include <dev/isa/isavar.h> | | 82 | #include <dev/isa/isavar.h> |
83 | | | 83 | |
84 | #include <i386/isa/npxvar.h> | | 84 | #include <i386/isa/npxvar.h> |
85 | | | 85 | |
86 | int npx_isa_probe(device_t, struct cfdata *, void *); | | 86 | int npx_isa_probe(device_t, cfdata_t, void *); |
87 | void npx_isa_attach(device_t, device_t, void *); | | 87 | void npx_isa_attach(device_t, device_t, void *); |
88 | | | 88 | |
89 | CFATTACH_DECL3_NEW(npx_isa, sizeof(struct npx_softc), | | 89 | CFATTACH_DECL3_NEW(npx_isa, sizeof(struct npx_softc), |
90 | npx_isa_probe, npx_isa_attach, npxdetach, NULL, NULL, NULL, | | 90 | npx_isa_probe, npx_isa_attach, npxdetach, NULL, NULL, NULL, |
91 | DVF_DETACH_SHUTDOWN); | | 91 | DVF_DETACH_SHUTDOWN); |
92 | | | 92 | |
93 | int | | 93 | int |
94 | npx_isa_probe(device_t parent, struct cfdata *match, void *aux) | | 94 | npx_isa_probe(device_t parent, cfdata_t match, void *aux) |
95 | { | | 95 | { |
96 | struct isa_attach_args *ia = aux; | | 96 | struct isa_attach_args *ia = aux; |
97 | bus_space_handle_t ioh; | | 97 | bus_space_handle_t ioh; |
98 | enum npx_type result; | | 98 | enum npx_type result; |
99 | | | 99 | |
100 | if (ia->ia_nio < 1) | | 100 | if (ia->ia_nio < 1) |
101 | return (0); | | 101 | return (0); |
102 | if (ia->ia_nirq < 1) | | 102 | if (ia->ia_nirq < 1) |
103 | return (0); | | 103 | return (0); |
104 | | | 104 | |
105 | if (ISA_DIRECT_CONFIG(ia)) | | 105 | if (ISA_DIRECT_CONFIG(ia)) |
106 | return (0); | | 106 | return (0); |
107 | | | 107 | |