diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-06-26 23:47:50 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-26 23:47:50 -0400 |
commit | 1f1bd5fc326a46d8c49132260f661b7cc954846f (patch) | |
tree | b564551c3f47ebdff46a348e7ca80bf02b79df4a /drivers/net/epic100.c | |
parent | a2b524b2ec6caa0499aea56a58fdb67a6d10db90 (diff) |
[netdrvr] Remove long-unused bits from Becker template drivers
Symbols such as PCI_USES_IO, PCI_ADDR0, etc. originated from Donald
Becker's net driver template, but have been long unused. Remove.
In a few drivers, this allows the further eliminate of the pci_flags (or
just plain flags) member in the template driver probe structure.
Most of this logic is simply open-coded in most drivers, since it never
changes.
Made a few other cleanups while I was in there, too:
* constify, __devinitdata several PCI ID tables
* replace table terminating entries such as "{0,}," and "{NULL},"
with a more-clean "{ }".
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/epic100.c')
-rw-r--r-- | drivers/net/epic100.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index 724d7dc35fa3..ee34a16eb4e2 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c | |||
@@ -191,23 +191,10 @@ IVc. Errata | |||
191 | */ | 191 | */ |
192 | 192 | ||
193 | 193 | ||
194 | enum pci_id_flags_bits { | ||
195 | /* Set PCI command register bits before calling probe1(). */ | ||
196 | PCI_USES_IO=1, PCI_USES_MEM=2, PCI_USES_MASTER=4, | ||
197 | /* Read and map the single following PCI BAR. */ | ||
198 | PCI_ADDR0=0<<4, PCI_ADDR1=1<<4, PCI_ADDR2=2<<4, PCI_ADDR3=3<<4, | ||
199 | PCI_ADDR_64BITS=0x100, PCI_NO_ACPI_WAKE=0x200, PCI_NO_MIN_LATENCY=0x400, | ||
200 | }; | ||
201 | |||
202 | enum chip_capability_flags { MII_PWRDWN=1, TYPE2_INTR=2, NO_MII=4 }; | 194 | enum chip_capability_flags { MII_PWRDWN=1, TYPE2_INTR=2, NO_MII=4 }; |
203 | 195 | ||
204 | #define EPIC_TOTAL_SIZE 0x100 | 196 | #define EPIC_TOTAL_SIZE 0x100 |
205 | #define USE_IO_OPS 1 | 197 | #define USE_IO_OPS 1 |
206 | #ifdef USE_IO_OPS | ||
207 | #define EPIC_IOTYPE PCI_USES_MASTER|PCI_USES_IO|PCI_ADDR0 | ||
208 | #else | ||
209 | #define EPIC_IOTYPE PCI_USES_MASTER|PCI_USES_MEM|PCI_ADDR1 | ||
210 | #endif | ||
211 | 198 | ||
212 | typedef enum { | 199 | typedef enum { |
213 | SMSC_83C170_0, | 200 | SMSC_83C170_0, |
@@ -218,7 +205,6 @@ typedef enum { | |||
218 | 205 | ||
219 | struct epic_chip_info { | 206 | struct epic_chip_info { |
220 | const char *name; | 207 | const char *name; |
221 | enum pci_id_flags_bits pci_flags; | ||
222 | int io_size; /* Needed for I/O region check or ioremap(). */ | 208 | int io_size; /* Needed for I/O region check or ioremap(). */ |
223 | int drv_flags; /* Driver use, intended as capability flags. */ | 209 | int drv_flags; /* Driver use, intended as capability flags. */ |
224 | }; | 210 | }; |
@@ -227,11 +213,11 @@ struct epic_chip_info { | |||
227 | /* indexed by chip_t */ | 213 | /* indexed by chip_t */ |
228 | static const struct epic_chip_info pci_id_tbl[] = { | 214 | static const struct epic_chip_info pci_id_tbl[] = { |
229 | { "SMSC EPIC/100 83c170", | 215 | { "SMSC EPIC/100 83c170", |
230 | EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN }, | 216 | EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN }, |
231 | { "SMSC EPIC/100 83c170", | 217 | { "SMSC EPIC/100 83c170", |
232 | EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR }, | 218 | EPIC_TOTAL_SIZE, TYPE2_INTR }, |
233 | { "SMSC EPIC/C 83c175", | 219 | { "SMSC EPIC/C 83c175", |
234 | EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | MII_PWRDWN }, | 220 | EPIC_TOTAL_SIZE, TYPE2_INTR | MII_PWRDWN }, |
235 | }; | 221 | }; |
236 | 222 | ||
237 | 223 | ||