cy.c (12962) | cy.c (13630) |
---|---|
1/*- 2 * cyclades cyclom-y serial driver 3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993 4 * 5 * Copyright (c) 1993 Andrew Herbert. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * | 1/*- 2 * cyclades cyclom-y serial driver 3 * Andrew Herbert <andrew@werple.apana.org.au>, 17 August 1993 4 * 5 * Copyright (c) 1993 Andrew Herbert. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 26 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 27 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * |
30 * $Id: cy.c,v 1.28 1995/12/10 20:54:29 bde Exp $ | 30 * $Id: cy.c,v 1.29 1995/12/22 15:02:22 bde Exp $ |
31 */ 32 33#include "cy.h" 34/* 35 * TODO: 36 * Check that cy16's work. 37 * Implement BREAK. 38 * Fix overflows when closing line. --- 376 unchanged lines hidden (view full) --- 415static u_int cy_svrr_probes; 416static u_int cy_timeouts; 417#endif 418 419static int cy_nr_cd1400s[NCY]; 420#undef RxFifoThreshold 421static int volatile RxFifoThreshold = (CD1400_RX_FIFO_SIZE / 2); 422 | 31 */ 32 33#include "cy.h" 34/* 35 * TODO: 36 * Check that cy16's work. 37 * Implement BREAK. 38 * Fix overflows when closing line. --- 376 unchanged lines hidden (view full) --- 415static u_int cy_svrr_probes; 416static u_int cy_timeouts; 417#endif 418 419static int cy_nr_cd1400s[NCY]; 420#undef RxFifoThreshold 421static int volatile RxFifoThreshold = (CD1400_RX_FIFO_SIZE / 2); 422 |
423static char chardev[] = "0123456789abcdefghijklmnopqrstuvwxyz"; | |
424static struct kern_devconf kdc_sio[NCY] = { { 425 0, 0, 0, /* filled in by dev_attach */ 426 "cyc", 0, { MDDT_ISA, 0, "tty" }, 427 isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, 428 &kdc_isa0, /* parent */ 429 0, /* parentdata */ 430 DC_UNCONFIGURED, /* state */ 431 "Cyclades multiport board", --- 163 unchanged lines hidden (view full) --- 595 s = spltty(); 596 com_addr(unit) = com; 597 splx(s); 598 599 dev = makedev(CDEV_MAJOR, 0); 600 cdevsw_add(&dev, &sio_cdevsw, NULL); 601#ifdef DEVFS 602 /* path, name, devsw, minor, type, uid, gid, perm */ | 423static struct kern_devconf kdc_sio[NCY] = { { 424 0, 0, 0, /* filled in by dev_attach */ 425 "cyc", 0, { MDDT_ISA, 0, "tty" }, 426 isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, 427 &kdc_isa0, /* parent */ 428 0, /* parentdata */ 429 DC_UNCONFIGURED, /* state */ 430 "Cyclades multiport board", --- 163 unchanged lines hidden (view full) --- 594 s = spltty(); 595 com_addr(unit) = com; 596 splx(s); 597 598 dev = makedev(CDEV_MAJOR, 0); 599 cdevsw_add(&dev, &sio_cdevsw, NULL); 600#ifdef DEVFS 601 /* path, name, devsw, minor, type, uid, gid, perm */ |
603 sprintf(name, "ttyc%c", chardev[unit]); 604 com->devfs_token_ttyd = devfs_add_devsw("/", name, &sio_cdevsw, 605 unit, DV_CHR, 0, 0, 0600); 606 sprintf(name, "ttyic%c", chardev[unit]); 607 com->devfs_token_ttyi = devfs_add_devsw("/", name, &sio_cdevsw, 608 unit | CONTROL_INIT_STATE, DV_CHR, 0, 0, 0600); 609 sprintf(name, "ttylc%c", chardev[unit]); 610 com->devfs_token_ttyl = devfs_add_devsw("/", name, &sio_cdevsw, 611 unit | CONTROL_LOCK_STATE, DV_CHR, 0, 0, 0600); 612 sprintf(name, "cuac%c", chardev[unit]); 613 com->devfs_token_cuaa = devfs_add_devsw("/", name, &sio_cdevsw, 614 unit | CALLOUT_MASK, DV_CHR, 0, 0, 0660); 615 sprintf(name, "cuaic%c", chardev[unit]); 616 com->devfs_token_cuai = devfs_add_devsw("/", name, &sio_cdevsw, 617 unit | CALLOUT_MASK | CONTROL_INIT_STATE, DV_CHR, 0, 0, 0660); 618 sprintf(name, "cualc%c", chardev[unit]); 619 com->devfs_token_cual = devfs_add_devsw("/", name, &sio_cdevsw, 620 unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR, 0, 0, 0660); | 602 com->devfs_token_ttyd = devfs_add_devswf(&sio_cdevsw, 603 unit, DV_CHR, 0, 0, 0600, "ttyc%n", unit); 604 com->devfs_token_ttyi = devfs_add_devswf(&sio_cdevsw, 605 unit | CONTROL_INIT_STATE, DV_CHR, 0, 0, 0600, 606 "ttyic%n", unit); 607 com->devfs_token_ttyl = devfs_add_devswf(&sio_cdevsw, 608 unit | CONTROL_LOCK_STATE, DV_CHR, 0, 0, 0600, 609 "ttylc%n", unit); 610 com->devfs_token_cuaa = devfs_add_devswf(&sio_cdevsw, 611 unit | CALLOUT_MASK, DV_CHR, 0, 0, 0660, 612 "cuac%n", unit); 613 com->devfs_token_cuai = devfs_add_devswf(&sio_cdevsw, 614 unit | CALLOUT_MASK | CONTROL_INIT_STATE, DV_CHR, 0, 0, 0660, 615 "cuaic%n", unit); 616 com->devfs_token_cual = devfs_add_devswf(&sio_cdevsw, 617 unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR, 0, 0, 0660, 618 "cualc%n", unit); |
621#endif 622 } 623 } 624 kdc_sio[isdp->id_unit].kdc_state = DC_BUSY; /* XXX */ 625 626 /* ensure an edge for the next interrupt */ 627 cy_outb(cy_iobase, CY_CLEAR_INTR, 0); 628 --- 1920 unchanged lines hidden --- | 619#endif 620 } 621 } 622 kdc_sio[isdp->id_unit].kdc_state = DC_BUSY; /* XXX */ 623 624 /* ensure an edge for the next interrupt */ 625 cy_outb(cy_iobase, CY_CLEAR_INTR, 0); 626 --- 1920 unchanged lines hidden --- |