diff options
author | smart <smart@cvs.openbsd.org> | 2001-08-20 04:41:40 +0000 |
---|---|---|
committer | smart <smart@cvs.openbsd.org> | 2001-08-20 04:41:40 +0000 |
commit | 7910f09fd6fad4008fe999de0d01ad855b2a386b (patch) | |
tree | a3462c05fb4bec6b268b856031520b8e7b820bff /sys/dev/isa/cy_isa.c | |
parent | d9bf3f8295bf4b2983561258d7e4e682174b9b27 (diff) |
Allow driver to recognize Cyclades 4Y and 8Y cards.
Not finished yet, but cleaned up and moved around code for
better organization. Inspired by NetBSD and other PCI drivers.
From my dmesg:
cy1 at pci0 dev 10 function 0 "Cyclades Cyclom-8Y" rev 0x01
Diffstat (limited to 'sys/dev/isa/cy_isa.c')
-rw-r--r-- | sys/dev/isa/cy_isa.c | 55 |
1 files changed, 17 insertions, 38 deletions
diff --git a/sys/dev/isa/cy_isa.c b/sys/dev/isa/cy_isa.c index 926fb9d996d..363e883215a 100644 --- a/sys/dev/isa/cy_isa.c +++ b/sys/dev/isa/cy_isa.c @@ -1,64 +1,35 @@ -/* $OpenBSD: cy_isa.c,v 1.5 2001/08/19 19:58:56 smart Exp $ */ +/* $OpenBSD: cy_isa.c,v 1.6 2001/08/20 04:41:39 smart Exp $ */ /* - * cy.c + * cy_isa.c * * Driver for Cyclades Cyclom-8/16/32 multiport serial cards * (currently not tested with Cyclom-32 cards) * * Timo Rossi, 1996 - * - * Supports both ISA and PCI Cyclom cards - * - * Uses CD1400 automatic CTS flow control, and - * if CY_HW_RTS is defined, uses CD1400 automatic input flow control. - * This requires a special cable that exchanges the RTS and DTR lines. - * - * Lots of debug output can be enabled by defining CY_DEBUG - * Some debugging counters (number of receive/transmit interrupts etc.) - * can be enabled by defining CY_DEBUG1 - * - * This version uses the bus_mem/io_??() stuff - * - * NOT TESTED !!! - * */ -#include <sys/types.h> #include <sys/param.h> -#include <sys/ioctl.h> -#include <sys/syslog.h> -#include <sys/fcntl.h> -#include <sys/tty.h> -#include <sys/proc.h> -#include <sys/conf.h> -#include <sys/user.h> -#include <sys/select.h> -#include <sys/device.h> -#include <sys/malloc.h> #include <sys/systm.h> +#include <sys/device.h> + #include <machine/bus.h> + #include <dev/isa/isavar.h> #include <dev/isa/isareg.h> #include <dev/ic/cd1400reg.h> #include <dev/ic/cyreg.h> -int cy_probe_isa __P((struct device *, void *, void *)); -int cy_probe_common __P((int card, bus_space_tag_t, - bus_space_handle_t, int bustype)); - -void cyattach __P((struct device *, struct device *, void *)); +static int cy_isa_probe __P((struct device *, void *, void *)); +void cy_isa_attach __P((struct device *, struct device *, void *)); struct cfattach cy_isa_ca = { - sizeof(struct cy_softc), cy_probe_isa, cyattach + sizeof(struct cy_softc), cy_isa_probe, cy_isa_attach }; -/* - * ISA probe - */ int -cy_probe_isa(parent, match, aux) +cy_isa_probe(parent, match, aux) struct device *parent; void *match, *aux; { @@ -85,3 +56,11 @@ cy_probe_isa(parent, match, aux) ia->ia_msize = 0x2000; return (1); } + +void +cy_isa_attach(parent, self, aux) + struct device *parent, *self; + void *aux; +{ + cy_attach(parent, self, aux); +} |