Don't copy iobase and iosize members from pcmciabus_attach_args to the pcmcia_softc because they're not used in any meaningful way.diff -r1.93 -r1.94 src/sys/dev/pcmcia/pcmcia.c
(dyoung)
--- src/sys/dev/pcmcia/pcmcia.c 2009/05/12 14:42:19 1.93
+++ src/sys/dev/pcmcia/pcmcia.c 2011/07/26 22:24:36 1.94
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pcmcia.c,v 1.93 2009/05/12 14:42:19 cegger Exp $ */ | 1 | /* $NetBSD: pcmcia.c,v 1.94 2011/07/26 22:24:36 dyoung Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2004 Charles M. Hannum. All rights reserved. | 4 | * Copyright (c) 2004 Charles M. Hannum. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. All advertising materials mentioning features or use of this software | 14 | * 3. All advertising materials mentioning features or use of this software | |
@@ -38,27 +38,27 @@ | @@ -38,27 +38,27 @@ | |||
38 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 38 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
39 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 39 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
40 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 40 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
41 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 41 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
42 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 42 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
43 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 43 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
44 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 44 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
45 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 45 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
46 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 46 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
47 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 47 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
48 | */ | 48 | */ | |
49 | 49 | |||
50 | #include <sys/cdefs.h> | 50 | #include <sys/cdefs.h> | |
51 | __KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.93 2009/05/12 14:42:19 cegger Exp $"); | 51 | __KERNEL_RCSID(0, "$NetBSD: pcmcia.c,v 1.94 2011/07/26 22:24:36 dyoung Exp $"); | |
52 | 52 | |||
53 | #include "opt_pcmciaverbose.h" | 53 | #include "opt_pcmciaverbose.h" | |
54 | 54 | |||
55 | #include <sys/param.h> | 55 | #include <sys/param.h> | |
56 | #include <sys/systm.h> | 56 | #include <sys/systm.h> | |
57 | #include <sys/device.h> | 57 | #include <sys/device.h> | |
58 | 58 | |||
59 | #include <net/if.h> | 59 | #include <net/if.h> | |
60 | 60 | |||
61 | #include <dev/pcmcia/pcmciareg.h> | 61 | #include <dev/pcmcia/pcmciareg.h> | |
62 | #include <dev/pcmcia/pcmciachip.h> | 62 | #include <dev/pcmcia/pcmciachip.h> | |
63 | #include <dev/pcmcia/pcmciavar.h> | 63 | #include <dev/pcmcia/pcmciavar.h> | |
64 | #ifdef IT8368E_LEGACY_MODE /* XXX -uch */ | 64 | #ifdef IT8368E_LEGACY_MODE /* XXX -uch */ | |
@@ -123,28 +123,26 @@ pcmcia_match(device_t parent, cfdata_t m | @@ -123,28 +123,26 @@ pcmcia_match(device_t parent, cfdata_t m | |||
123 | 123 | |||
124 | void | 124 | void | |
125 | pcmcia_attach(device_t parent, device_t self, void *aux) | 125 | pcmcia_attach(device_t parent, device_t self, void *aux) | |
126 | { | 126 | { | |
127 | struct pcmciabus_attach_args *paa = aux; | 127 | struct pcmciabus_attach_args *paa = aux; | |
128 | struct pcmcia_softc *sc = device_private(self); | 128 | struct pcmcia_softc *sc = device_private(self); | |
129 | 129 | |||
130 | aprint_naive("\n"); | 130 | aprint_naive("\n"); | |
131 | aprint_normal("\n"); | 131 | aprint_normal("\n"); | |
132 | 132 | |||
133 | sc->dev = self; | 133 | sc->dev = self; | |
134 | sc->pct = paa->pct; | 134 | sc->pct = paa->pct; | |
135 | sc->pch = paa->pch; | 135 | sc->pch = paa->pch; | |
136 | sc->iobase = paa->iobase; | |||
137 | sc->iosize = paa->iosize; | |||
138 | 136 | |||
139 | sc->ih = NULL; | 137 | sc->ih = NULL; | |
140 | 138 | |||
141 | if (!pmf_device_register(self, NULL, NULL)) | 139 | if (!pmf_device_register(self, NULL, NULL)) | |
142 | aprint_error_dev(self, "couldn't establish power handler\n"); | 140 | aprint_error_dev(self, "couldn't establish power handler\n"); | |
143 | } | 141 | } | |
144 | 142 | |||
145 | int | 143 | int | |
146 | pcmcia_detach(device_t self, int flags) | 144 | pcmcia_detach(device_t self, int flags) | |
147 | { | 145 | { | |
148 | int rc; | 146 | int rc; | |
149 | 147 | |||
150 | if ((rc = config_detach_children(self, flags)) != 0) | 148 | if ((rc = config_detach_children(self, flags)) != 0) |
--- src/sys/dev/pcmcia/pcmciachip.h 2009/05/12 14:42:19 1.16
+++ src/sys/dev/pcmcia/pcmciachip.h 2011/07/26 22:24:36 1.17
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pcmciachip.h,v 1.16 2009/05/12 14:42:19 cegger Exp $ */ | 1 | /* $NetBSD: pcmciachip.h,v 1.17 2011/07/26 22:24:36 dyoung Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1997 Marc Horowitz. All rights reserved. | 4 | * Copyright (c) 1997 Marc Horowitz. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. All advertising materials mentioning features or use of this software | 14 | * 3. All advertising materials mentioning features or use of this software | |
@@ -133,24 +133,22 @@ struct pcmcia_chip_functions { | @@ -133,24 +133,22 @@ struct pcmcia_chip_functions { | |||
133 | 133 | |||
134 | /* Socket functions. */ | 134 | /* Socket functions. */ | |
135 | #define pcmcia_chip_socket_enable(tag, handle) \ | 135 | #define pcmcia_chip_socket_enable(tag, handle) \ | |
136 | ((*(tag)->socket_enable)((handle))) | 136 | ((*(tag)->socket_enable)((handle))) | |
137 | #define pcmcia_chip_socket_disable(tag, handle) \ | 137 | #define pcmcia_chip_socket_disable(tag, handle) \ | |
138 | ((*(tag)->socket_disable)((handle))) | 138 | ((*(tag)->socket_disable)((handle))) | |
139 | #define pcmcia_chip_socket_settype(tag, handle, type) \ | 139 | #define pcmcia_chip_socket_settype(tag, handle, type) \ | |
140 | ((*(tag)->socket_settype)((handle), (type))) | 140 | ((*(tag)->socket_settype)((handle), (type))) | |
141 | 141 | |||
142 | struct pcmciabus_attach_args { | 142 | struct pcmciabus_attach_args { | |
143 | const char *paa_busname; /* Bus name */ | 143 | const char *paa_busname; /* Bus name */ | |
144 | pcmcia_chipset_tag_t pct; | 144 | pcmcia_chipset_tag_t pct; | |
145 | pcmcia_chipset_handle_t pch; | 145 | pcmcia_chipset_handle_t pch; | |
146 | bus_addr_t iobase; /* start i/o space allocation here */ | |||
147 | bus_size_t iosize; /* size of the i/o space range */ | |||
148 | }; | 146 | }; | |
149 | 147 | |||
150 | /* interfaces for the chipset to call pcmcia */ | 148 | /* interfaces for the chipset to call pcmcia */ | |
151 | 149 | |||
152 | int pcmcia_card_attach(device_t); | 150 | int pcmcia_card_attach(device_t); | |
153 | void pcmcia_card_detach(device_t, int); | 151 | void pcmcia_card_detach(device_t, int); | |
154 | void pcmcia_card_deactivate(device_t); | 152 | void pcmcia_card_deactivate(device_t); | |
155 | 153 | |||
156 | #endif /* _PCMCIA_PCMCIACHIP_H_ */ | 154 | #endif /* _PCMCIA_PCMCIACHIP_H_ */ |
--- src/sys/dev/pcmcia/pcmciavar.h 2009/05/12 14:42:19 1.34
+++ src/sys/dev/pcmcia/pcmciavar.h 2011/07/26 22:24:36 1.35
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pcmciavar.h,v 1.34 2009/05/12 14:42:19 cegger Exp $ */ | 1 | /* $NetBSD: pcmciavar.h,v 1.35 2011/07/26 22:24:36 dyoung Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1997 Marc Horowitz. All rights reserved. | 4 | * Copyright (c) 1997 Marc Horowitz. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * 3. All advertising materials mentioning features or use of this software | 14 | * 3. All advertising materials mentioning features or use of this software | |
@@ -187,34 +187,26 @@ struct pcmcia_card { | @@ -187,34 +187,26 @@ struct pcmcia_card { | |||
187 | 187 | |||
188 | struct pcmcia_softc { | 188 | struct pcmcia_softc { | |
189 | device_t dev; | 189 | device_t dev; | |
190 | 190 | |||
191 | /* this stuff is for the socket */ | 191 | /* this stuff is for the socket */ | |
192 | pcmcia_chipset_tag_t pct; | 192 | pcmcia_chipset_tag_t pct; | |
193 | pcmcia_chipset_handle_t pch; | 193 | pcmcia_chipset_handle_t pch; | |
194 | 194 | |||
195 | /* this stuff is for the card */ | 195 | /* this stuff is for the card */ | |
196 | struct pcmcia_card card; | 196 | struct pcmcia_card card; | |
197 | void *ih; | 197 | void *ih; | |
198 | int sc_enabled_count; /* how many functions are | 198 | int sc_enabled_count; /* how many functions are | |
199 | enabled */ | 199 | enabled */ | |
200 | ||||
201 | /* | |||
202 | * These are passed down from the PCMCIA chip, and exist only | |||
203 | * so that cards with Very Special address allocation needs | |||
204 | * know what range they should be dealing with. | |||
205 | */ | |||
206 | bus_addr_t iobase; /* start i/o space allocation here */ | |||
207 | bus_size_t iosize; /* size of the i/o space range */ | |||
208 | }; | 200 | }; | |
209 | 201 | |||
210 | struct pcmcia_cis_quirk { | 202 | struct pcmcia_cis_quirk { | |
211 | int32_t manufacturer; | 203 | int32_t manufacturer; | |
212 | int32_t product; | 204 | int32_t product; | |
213 | const char *cis1_info[4]; | 205 | const char *cis1_info[4]; | |
214 | const struct pcmcia_function *pf; | 206 | const struct pcmcia_function *pf; | |
215 | const struct pcmcia_config_entry *cfe; | 207 | const struct pcmcia_config_entry *cfe; | |
216 | }; | 208 | }; | |
217 | 209 | |||
218 | struct pcmcia_attach_args { | 210 | struct pcmcia_attach_args { | |
219 | int32_t manufacturer; | 211 | int32_t manufacturer; | |
220 | int32_t product; | 212 | int32_t product; |