diff options
author | imp <imp@FreeBSD.org> | 2005-09-21 22:45:14 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-09-21 22:45:14 +0000 |
commit | 448de1549161a7fd3c729ead16c807749ba5eab1 (patch) | |
tree | cefa8be374b0705d28d42549130f8588aab16875 /sys/dev | |
parent | d5f4d6d5c5d61f917598932ad212de69b861bd55 (diff) | |
download | FreeBSD-src-448de1549161a7fd3c729ead16c807749ba5eab1.zip FreeBSD-src-448de1549161a7fd3c729ead16c807749ba5eab1.tar.gz |
Remove OLDCARD shims
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ral/if_ral_pccard.c | 27 | ||||
-rw-r--r-- | sys/dev/stg/tmc18c30_pccard.c | 37 | ||||
-rw-r--r-- | sys/dev/uart/uart_bus_pccard.c | 25 |
3 files changed, 22 insertions, 67 deletions
diff --git a/sys/dev/ral/if_ral_pccard.c b/sys/dev/ral/if_ral_pccard.c index 4758b1a..a1c59fa 100644 --- a/sys/dev/ral/if_ral_pccard.c +++ b/sys/dev/ral/if_ral_pccard.c @@ -22,6 +22,7 @@ __FBSDID("$FreeBSD$"); /* * CardBus front-end for the Ralink RT2500 driver. + * XXX this is actually a PC Card front end. Maybe? */ #include <sys/param.h> @@ -68,22 +69,16 @@ static const struct pccard_product ral_pccard_products[] = { { NULL } }; -static int ral_pccard_match(device_t); static int ral_pccard_probe(device_t); static int ral_pccard_attach(device_t); static device_method_t ral_pccard_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, pccard_compat_probe), - DEVMETHOD(device_attach, pccard_compat_attach), + DEVMETHOD(device_probe, ral_pccard_probe), + DEVMETHOD(device_attach, ral_pccard_attach), DEVMETHOD(device_detach, ral_detach), DEVMETHOD(device_shutdown, ral_shutdown), - /* Card interface */ - DEVMETHOD(card_compat_match, ral_pccard_match), - DEVMETHOD(card_compat_probe, ral_pccard_probe), - DEVMETHOD(card_compat_attach, ral_pccard_attach), - { 0, 0 } }; @@ -96,7 +91,7 @@ static driver_t ral_pccard_driver = { DRIVER_MODULE(ral, pccard, ral_pccard_driver, ral_devclass, 0, 0); static int -ral_pccard_match(device_t dev) +ral_pccard_probe(device_t dev) { const struct pccard_product *pp; @@ -110,20 +105,6 @@ ral_pccard_match(device_t dev) } static int -ral_pccard_probe(device_t dev) -{ - int error; - - error = ral_alloc(dev, 0); - if (error != 0) - return error; - - ral_free(dev); - - return 0; -} - -static int ral_pccard_attach(device_t dev) { int error; diff --git a/sys/dev/stg/tmc18c30_pccard.c b/sys/dev/stg/tmc18c30_pccard.c index d0c732f..5e1be11 100644 --- a/sys/dev/stg/tmc18c30_pccard.c +++ b/sys/dev/stg/tmc18c30_pccard.c @@ -74,10 +74,10 @@ static const struct pccard_product stg_products[] = { }; /* - * Additional code for FreeBSD new-bus PCCard frontend + * Additional code for FreeBSD new-bus PC Card frontend */ - -static int stg_pccard_match(device_t dev) +static int +stg_pccard_probe(device_t dev) { const struct pccard_product *pp; @@ -91,7 +91,7 @@ static int stg_pccard_match(device_t dev) } static int -stg_pccard_probe(DEVPORT_PDEVICE dev) +stg_pccard_attach(device_t dev) { struct stg_softc *sc = device_get_softc(dev); int error; @@ -107,25 +107,6 @@ stg_pccard_probe(DEVPORT_PDEVICE dev) stg_release_resource(dev); return(ENXIO); } - - stg_release_resource(dev); - - return(0); -} - -static int -stg_pccard_attach(DEVPORT_PDEVICE dev) -{ - struct stg_softc *sc = device_get_softc(dev); - int error; - - sc->port_rid = 0; - sc->irq_rid = 0; - error = stg_alloc_resource(dev); - if (error) { - return(error); - } - error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY, stg_intr, (void *)sc, &sc->stg_intrhand); if (error) { @@ -143,15 +124,9 @@ stg_pccard_attach(DEVPORT_PDEVICE dev) static device_method_t stg_pccard_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, pccard_compat_probe), - DEVMETHOD(device_attach, pccard_compat_attach), + DEVMETHOD(device_probe, stg_pccard_probe), + DEVMETHOD(device_attach, stg_pccard_attach), DEVMETHOD(device_detach, stg_detach), - - /* Card interface */ - DEVMETHOD(card_compat_match, stg_pccard_match), - DEVMETHOD(card_compat_probe, stg_pccard_probe), - DEVMETHOD(card_compat_attach, stg_pccard_attach), - { 0, 0 } }; diff --git a/sys/dev/uart/uart_bus_pccard.c b/sys/dev/uart/uart_bus_pccard.c index a1ca4c2..ef6ae3e 100644 --- a/sys/dev/uart/uart_bus_pccard.c +++ b/sys/dev/uart/uart_bus_pccard.c @@ -43,20 +43,15 @@ __FBSDID("$FreeBSD$"); #include "pccarddevs.h" -static int uart_pccard_match(device_t self); static int uart_pccard_probe(device_t dev); +static int uart_pccard_attach(device_t dev); static device_method_t uart_pccard_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, pccard_compat_probe), - DEVMETHOD(device_attach, pccard_compat_attach), + DEVMETHOD(device_probe, uart_pccard_probe), + DEVMETHOD(device_attach, uart_pccard_attach), DEVMETHOD(device_detach, uart_bus_detach), - /* Card interface */ - DEVMETHOD(card_compat_match, uart_pccard_match), - DEVMETHOD(card_compat_probe, uart_pccard_probe), - DEVMETHOD(card_compat_attach, uart_bus_attach), - { 0, 0 } }; @@ -67,7 +62,7 @@ static driver_t uart_pccard_driver = { }; static int -uart_pccard_match(device_t dev) +uart_pccard_probe(device_t dev) { int error = 0; u_int32_t fcn = PCCARD_FUNCTION_UNSPEC; @@ -83,20 +78,24 @@ uart_pccard_match(device_t dev) if (fcn == PCCARD_FUNCTION_SERIAL) return (-100); - return(ENXIO); + return (ENXIO); } static int -uart_pccard_probe(dev) - device_t dev; +uart_pccard_attach(device_t dev) { struct uart_softc *sc; + int err; + sc = device_get_softc(dev); sc->sc_class = &uart_ns8250_class; /* Do not probe IRQ - pccard doesn't turn on the interrupt line */ /* until bus_setup_intr but how can I do so?*/ - return (uart_bus_probe(dev, 0, 0, 0, 0)); + err = uart_bus_probe(dev, 0, 0, 0, 0); + if (err) + return (err); + return (uart_bus_attach(dev)); } DRIVER_MODULE(uart, pccard, uart_pccard_driver, uart_devclass, 0, 0); |