GC the "quirk" code.
This commit is contained in:
parent
f96037f43b
commit
71e7860bbf
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: wdc_pcmcia.c,v 1.72 2004/08/10 02:56:42 mycroft Exp $ */
|
/* $NetBSD: wdc_pcmcia.c,v 1.73 2004/08/10 03:00:29 mycroft Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||||
@ -37,7 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.72 2004/08/10 02:56:42 mycroft Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.73 2004/08/10 03:00:29 mycroft Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/device.h>
|
#include <sys/device.h>
|
||||||
@ -86,23 +86,20 @@ CFATTACH_DECL(wdc_pcmcia, sizeof(struct wdc_pcmcia_softc),
|
|||||||
const struct wdc_pcmcia_product {
|
const struct wdc_pcmcia_product {
|
||||||
u_int32_t wpp_vendor; /* vendor ID */
|
u_int32_t wpp_vendor; /* vendor ID */
|
||||||
u_int32_t wpp_product; /* product ID */
|
u_int32_t wpp_product; /* product ID */
|
||||||
int wpp_quirk_flag; /* Quirk flags */
|
|
||||||
#define WDC_PCMCIA_NO_EXTRA_RESETS 0x02 /* Only reset ctrl once */
|
|
||||||
const char *wpp_cis_info[4]; /* XXX necessary? */
|
const char *wpp_cis_info[4]; /* XXX necessary? */
|
||||||
} wdc_pcmcia_products[] = {
|
} wdc_pcmcia_products[] = {
|
||||||
|
|
||||||
{ /* PCMCIA_VENDOR_DIGITAL XXX */ 0x0100,
|
{ /* PCMCIA_VENDOR_DIGITAL XXX */ 0x0100,
|
||||||
PCMCIA_PRODUCT_DIGITAL_MOBILE_MEDIA_CDROM,
|
PCMCIA_PRODUCT_DIGITAL_MOBILE_MEDIA_CDROM,
|
||||||
0, {NULL, "Digital Mobile Media CD-ROM", NULL, NULL} },
|
{NULL, "Digital Mobile Media CD-ROM", NULL, NULL} },
|
||||||
|
|
||||||
{ PCMCIA_VENDOR_IBM,
|
{ PCMCIA_VENDOR_IBM,
|
||||||
PCMCIA_PRODUCT_IBM_PORTABLE_CDROM,
|
PCMCIA_PRODUCT_IBM_PORTABLE_CDROM,
|
||||||
0, {NULL, "PCMCIA Portable CD-ROM Drive", NULL, NULL} },
|
{NULL, "PCMCIA Portable CD-ROM Drive", NULL, NULL} },
|
||||||
|
|
||||||
/* The TEAC IDE/Card II is used on the Sony Vaio */
|
/* The TEAC IDE/Card II is used on the Sony Vaio */
|
||||||
{ PCMCIA_VENDOR_TEAC,
|
{ PCMCIA_VENDOR_TEAC,
|
||||||
PCMCIA_PRODUCT_TEAC_IDECARDII,
|
PCMCIA_PRODUCT_TEAC_IDECARDII,
|
||||||
WDC_PCMCIA_NO_EXTRA_RESETS,
|
|
||||||
PCMCIA_CIS_TEAC_IDECARDII },
|
PCMCIA_CIS_TEAC_IDECARDII },
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -111,42 +108,41 @@ const struct wdc_pcmcia_product {
|
|||||||
*/
|
*/
|
||||||
{ PCMCIA_VENDOR_PANASONIC,
|
{ PCMCIA_VENDOR_PANASONIC,
|
||||||
PCMCIA_PRODUCT_PANASONIC_KXLC005,
|
PCMCIA_PRODUCT_PANASONIC_KXLC005,
|
||||||
0,
|
|
||||||
PCMCIA_CIS_PANASONIC_KXLC005 },
|
PCMCIA_CIS_PANASONIC_KXLC005 },
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* EXP IDE/ATAPI DVD Card use with some DVD players.
|
* EXP IDE/ATAPI DVD Card use with some DVD players.
|
||||||
* Does not have a vendor ID or product ID.
|
* Does not have a vendor ID or product ID.
|
||||||
*/
|
*/
|
||||||
{ -1, -1, 0,
|
{ -1, -1,
|
||||||
PCMCIA_CIS_EXP_EXPMULTIMEDIA },
|
PCMCIA_CIS_EXP_EXPMULTIMEDIA },
|
||||||
|
|
||||||
/* Mobile Dock 2, neither vendor ID nor product ID */
|
/* Mobile Dock 2, neither vendor ID nor product ID */
|
||||||
{ -1, -1, 0,
|
{ -1, -1,
|
||||||
{"SHUTTLE TECHNOLOGY LTD.", "PCCARD-IDE/ATAPI Adapter", NULL, NULL} },
|
{"SHUTTLE TECHNOLOGY LTD.", "PCCARD-IDE/ATAPI Adapter", NULL, NULL} },
|
||||||
|
|
||||||
/* Toshiba Portege 3110 CD, neither vendor ID nor product ID */
|
/* Toshiba Portege 3110 CD, neither vendor ID nor product ID */
|
||||||
{ -1, -1, 0,
|
{ -1, -1,
|
||||||
{"FREECOM", "PCCARD-IDE", NULL, NULL} },
|
{"FREECOM", "PCCARD-IDE", NULL, NULL} },
|
||||||
|
|
||||||
/* Random CD-ROM, (badged AMACOM), neither vendor ID nor product ID */
|
/* Random CD-ROM, (badged AMACOM), neither vendor ID nor product ID */
|
||||||
{ -1, -1, 0,
|
{ -1, -1,
|
||||||
{"PCMCIA", "CD-ROM", NULL, NULL} },
|
{"PCMCIA", "CD-ROM", NULL, NULL} },
|
||||||
|
|
||||||
/* IO DATA CBIDE2, with neither vendor ID nor product ID */
|
/* IO DATA CBIDE2, with neither vendor ID nor product ID */
|
||||||
{ -1, -1, 0,
|
{ -1, -1,
|
||||||
PCMCIA_CIS_IODATA_CBIDE2 },
|
PCMCIA_CIS_IODATA_CBIDE2 },
|
||||||
|
|
||||||
/* TOSHIBA PA2673U(IODATA_CBIDE2 OEM), */
|
/* TOSHIBA PA2673U(IODATA_CBIDE2 OEM), */
|
||||||
/* with neither vendor ID nor product ID */
|
/* with neither vendor ID nor product ID */
|
||||||
{ -1, -1, 0,
|
{ -1, -1,
|
||||||
PCMCIA_CIS_TOSHIBA_CBIDE2 },
|
PCMCIA_CIS_TOSHIBA_CBIDE2 },
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Novac PCMCIA-IDE Card for HD530P IDE Box,
|
* Novac PCMCIA-IDE Card for HD530P IDE Box,
|
||||||
* with neither vendor ID nor product ID
|
* with neither vendor ID nor product ID
|
||||||
*/
|
*/
|
||||||
{ -1, -1, 0,
|
{ -1, -1,
|
||||||
{"PCMCIA", "PnPIDE", NULL, NULL} },
|
{"PCMCIA", "PnPIDE", NULL, NULL} },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -239,7 +235,7 @@ wdc_pcmcia_attach(parent, self, aux)
|
|||||||
struct pcmcia_config_entry *cfe;
|
struct pcmcia_config_entry *cfe;
|
||||||
const struct wdc_pcmcia_product *wpp;
|
const struct wdc_pcmcia_product *wpp;
|
||||||
bus_size_t offset;
|
bus_size_t offset;
|
||||||
int quirks, i;
|
int i;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
aprint_normal("\n");
|
aprint_normal("\n");
|
||||||
@ -301,10 +297,6 @@ wdc_pcmcia_attach(parent, self, aux)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wpp = wdc_pcmcia_lookup(pa);
|
wpp = wdc_pcmcia_lookup(pa);
|
||||||
if (wpp != NULL)
|
|
||||||
quirks = wpp->wpp_quirk_flag;
|
|
||||||
else
|
|
||||||
quirks = 0;
|
|
||||||
|
|
||||||
for (i = 0; i < WDC_PCMCIA_REG_NPORTS; i++) {
|
for (i = 0; i < WDC_PCMCIA_REG_NPORTS; i++) {
|
||||||
if (bus_space_subregion(sc->wdc_channel.cmd_iot,
|
if (bus_space_subregion(sc->wdc_channel.cmd_iot,
|
||||||
@ -326,10 +318,6 @@ wdc_pcmcia_attach(parent, self, aux)
|
|||||||
sc->wdc_channel.ch_channel = 0;
|
sc->wdc_channel.ch_channel = 0;
|
||||||
sc->wdc_channel.ch_wdc = &sc->sc_wdcdev;
|
sc->wdc_channel.ch_wdc = &sc->sc_wdcdev;
|
||||||
sc->wdc_channel.ch_queue = &sc->wdc_chqueue;
|
sc->wdc_channel.ch_queue = &sc->wdc_chqueue;
|
||||||
#if 0
|
|
||||||
if (quirks & WDC_PCMCIA_NO_EXTRA_RESETS)
|
|
||||||
sc->sc_wdcdev.cap |= WDC_CAPABILITY_NO_EXTRA_RESETS;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We can enable and disable the controller. */
|
/* We can enable and disable the controller. */
|
||||||
sc->sc_wdcdev.sc_atapi_adapter._generic.adapt_enable =
|
sc->sc_wdcdev.sc_atapi_adapter._generic.adapt_enable =
|
||||||
|
Loading…
Reference in New Issue
Block a user