sio.c (58477) | sio.c (58888) |
---|---|
1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1991 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/pc98/cbus/sio.c 58477 2000-03-23 08:55:45Z kato $ | 33 * $FreeBSD: head/sys/pc98/cbus/sio.c 58888 2000-04-01 11:27:31Z kato $ |
34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 35 * from: i386/isa sio.c,v 1.234 36 */ 37 38#include "opt_comconsole.h" 39#include "opt_compat.h" 40#include "opt_ddb.h" 41#include "opt_sio.h" 42#include "card.h" | 34 * from: @(#)com.c 7.5 (Berkeley) 5/16/91 35 * from: i386/isa sio.c,v 1.234 36 */ 37 38#include "opt_comconsole.h" 39#include "opt_compat.h" 40#include "opt_ddb.h" 41#include "opt_sio.h" 42#include "card.h" |
43#include "pci.h" |
|
43#include "sio.h" 44 45/* 46 * Serial driver, based on 386BSD-0.1 com driver. 47 * Mostly rewritten to use pseudo-DMA. 48 * Works for National Semiconductor NS8250-NS16550AF UARTs. 49 * COM driver, based on HP dca driver. 50 * --- 110 unchanged lines hidden (view full) --- 161#ifdef PC98 162#include <pc98/pc98/pc98.h> 163#include <pc98/pc98/pc98_machdep.h> 164#include <i386/isa/ic/i8251.h> 165#else 166#include <isa/isareg.h> 167#endif 168#include <isa/isavar.h> | 44#include "sio.h" 45 46/* 47 * Serial driver, based on 386BSD-0.1 com driver. 48 * Mostly rewritten to use pseudo-DMA. 49 * Works for National Semiconductor NS8250-NS16550AF UARTs. 50 * COM driver, based on HP dca driver. 51 * --- 110 unchanged lines hidden (view full) --- 162#ifdef PC98 163#include <pc98/pc98/pc98.h> 164#include <pc98/pc98/pc98_machdep.h> 165#include <i386/isa/ic/i8251.h> 166#else 167#include <isa/isareg.h> 168#endif 169#include <isa/isavar.h> |
170#if NPCI > 0 171#include <pci/pcireg.h> 172#include <pci/pcivar.h> 173#endif |
|
169#include <machine/lock.h> 170 171#include <machine/clock.h> 172#include <machine/ipl.h> 173#ifndef SMP 174#include <machine/lock.h> 175#endif 176#include <machine/resource.h> --- 222 unchanged lines hidden (view full) --- 399 u_char obuf1[256]; 400 u_char obuf2[256]; 401#endif 402}; 403 404#ifdef COM_ESP 405static int espattach __P((struct com_s *com, Port_t esp_port)); 406#endif | 174#include <machine/lock.h> 175 176#include <machine/clock.h> 177#include <machine/ipl.h> 178#ifndef SMP 179#include <machine/lock.h> 180#endif 181#include <machine/resource.h> --- 222 unchanged lines hidden (view full) --- 404 u_char obuf1[256]; 405 u_char obuf2[256]; 406#endif 407}; 408 409#ifdef COM_ESP 410static int espattach __P((struct com_s *com, Port_t esp_port)); 411#endif |
407static int sioattach __P((device_t dev)); | 412static int sioattach __P((device_t dev, int rid)); |
408static int sio_isa_attach __P((device_t dev)); 409 410static timeout_t siobusycheck; 411static timeout_t siodtrwakeup; 412static void comhardclose __P((struct com_s *com)); 413static void sioinput __P((struct com_s *com)); 414static void siointr1 __P((struct com_s *com)); 415static void siointr __P((void *arg)); 416static int commctl __P((struct com_s *com, int bits, int how)); 417static int comparam __P((struct tty *tp, struct termios *t)); 418static swihand_t siopoll; | 413static int sio_isa_attach __P((device_t dev)); 414 415static timeout_t siobusycheck; 416static timeout_t siodtrwakeup; 417static void comhardclose __P((struct com_s *com)); 418static void sioinput __P((struct com_s *com)); 419static void siointr1 __P((struct com_s *com)); 420static void siointr __P((void *arg)); 421static int commctl __P((struct com_s *com, int bits, int how)); 422static int comparam __P((struct tty *tp, struct termios *t)); 423static swihand_t siopoll; |
419static int sioprobe __P((device_t dev)); | 424static int sioprobe __P((device_t dev, int xrid)); |
420static int sio_isa_probe __P((device_t dev)); 421static void siosettimeout __P((void)); 422static int siosetwater __P((struct com_s *com, speed_t speed)); 423static void comstart __P((struct tty *tp)); 424static void comstop __P((struct tty *tp, int rw)); 425static timeout_t comwakeup; 426static void disc_optim __P((struct tty *tp, struct termios *t, 427 struct com_s *com)); 428 429#if NCARD > 0 430static int sio_pccard_attach __P((device_t dev)); 431static int sio_pccard_detach __P((device_t dev)); 432static int sio_pccard_probe __P((device_t dev)); 433#endif /* NCARD > 0 */ 434 | 425static int sio_isa_probe __P((device_t dev)); 426static void siosettimeout __P((void)); 427static int siosetwater __P((struct com_s *com, speed_t speed)); 428static void comstart __P((struct tty *tp)); 429static void comstop __P((struct tty *tp, int rw)); 430static timeout_t comwakeup; 431static void disc_optim __P((struct tty *tp, struct termios *t, 432 struct com_s *com)); 433 434#if NCARD > 0 435static int sio_pccard_attach __P((device_t dev)); 436static int sio_pccard_detach __P((device_t dev)); 437static int sio_pccard_probe __P((device_t dev)); 438#endif /* NCARD > 0 */ 439 |
440#if NPCI > 0 441static int sio_pci_attach __P((device_t dev)); 442static void sio_pci_kludge_unit __P((device_t dev)); 443static int sio_pci_probe __P((device_t dev)); 444#endif /* NPCI > 0 */ 445 |
|
435static char driver_name[] = "sio"; 436 437/* table and macro for fast conversion from a unit number to its com struct */ 438static devclass_t sio_devclass; 439#define com_addr(unit) ((struct com_s *) \ 440 devclass_get_softc(sio_devclass, unit)) 441 442static device_method_t sio_isa_methods[] = { --- 20 unchanged lines hidden (view full) --- 463 { 0, 0 } 464}; 465 466static driver_t sio_pccard_driver = { 467 driver_name, 468 sio_pccard_methods, 469 sizeof(struct com_s), 470}; | 446static char driver_name[] = "sio"; 447 448/* table and macro for fast conversion from a unit number to its com struct */ 449static devclass_t sio_devclass; 450#define com_addr(unit) ((struct com_s *) \ 451 devclass_get_softc(sio_devclass, unit)) 452 453static device_method_t sio_isa_methods[] = { --- 20 unchanged lines hidden (view full) --- 474 { 0, 0 } 475}; 476 477static driver_t sio_pccard_driver = { 478 driver_name, 479 sio_pccard_methods, 480 sizeof(struct com_s), 481}; |
471#endif (NCARD > 0) | 482#endif /* NCARD > 0 */ |
472 | 483 |
484#if NPCI > 0 485static device_method_t sio_pci_methods[] = { 486 /* Device interface */ 487 DEVMETHOD(device_probe, sio_pci_probe), 488 DEVMETHOD(device_attach, sio_pci_attach), 489 490 { 0, 0 } 491}; 492 493static driver_t sio_pci_driver = { 494 driver_name, 495 sio_pci_methods, 496 sizeof(struct com_s), 497}; 498#endif /* NPCI > 0 */ 499 |
|
473static d_open_t sioopen; 474static d_close_t sioclose; 475static d_read_t sioread; 476static d_write_t siowrite; 477static d_ioctl_t sioioctl; 478 479#define CDEV_MAJOR 28 480static struct cdevsw sio_cdevsw = { --- 407 unchanged lines hidden (view full) --- 888static int 889sio_pccard_probe(dev) 890 device_t dev; 891{ 892 /* Do not probe IRQ - pccard doesn't turn on the interrupt line */ 893 /* until bus_setup_intr */ 894 SET_FLAG(dev, COM_C_NOPROBE); 895 | 500static d_open_t sioopen; 501static d_close_t sioclose; 502static d_read_t sioread; 503static d_write_t siowrite; 504static d_ioctl_t sioioctl; 505 506#define CDEV_MAJOR 28 507static struct cdevsw sio_cdevsw = { --- 407 unchanged lines hidden (view full) --- 915static int 916sio_pccard_probe(dev) 917 device_t dev; 918{ 919 /* Do not probe IRQ - pccard doesn't turn on the interrupt line */ 920 /* until bus_setup_intr */ 921 SET_FLAG(dev, COM_C_NOPROBE); 922 |
896 return (sioprobe(dev)); | 923 return (sioprobe(dev, 0)); |
897} 898 899static int 900sio_pccard_attach(dev) 901 device_t dev; 902{ | 924} 925 926static int 927sio_pccard_attach(dev) 928 device_t dev; 929{ |
903 return (sioattach(dev)); | 930 return (sioattach(dev, 0)); |
904} 905 906/* 907 * sio_detach - unload the driver and clear the table. 908 * XXX TODO: 909 * This is usually called when the card is ejected, but 910 * can be caused by a modunload of a controller driver. 911 * The idea is to reset the driver's view of the device --- 32 unchanged lines hidden (view full) --- 944 if (com->ibuf != NULL) 945 free(com->ibuf, M_DEVBUF); 946 } 947 device_printf(dev, "unloaded\n"); 948 return (0); 949} 950#endif /* NCARD > 0 */ 951 | 931} 932 933/* 934 * sio_detach - unload the driver and clear the table. 935 * XXX TODO: 936 * This is usually called when the card is ejected, but 937 * can be caused by a modunload of a controller driver. 938 * The idea is to reset the driver's view of the device --- 32 unchanged lines hidden (view full) --- 971 if (com->ibuf != NULL) 972 free(com->ibuf, M_DEVBUF); 973 } 974 device_printf(dev, "unloaded\n"); 975 return (0); 976} 977#endif /* NCARD > 0 */ 978 |
979#if NPCI > 0 980struct pci_ids { 981 u_int32_t type; 982 const char *desc; 983 int rid; 984}; |
|
952 | 985 |
986static struct pci_ids pci_ids[] = { 987 { 0x100812b9, "3COM PCI FaxModem", 0x10 }, 988 { 0x048011c1, "ActionTec 56k FAX PCI Modem", 0x14 }, 989 { 0x00000000, NULL, 0 } 990}; 991 992static int 993sio_pci_attach(dev) 994 device_t dev; 995{ 996 u_int32_t type; 997 struct pci_ids *id; 998 999 type = pci_get_devid(dev); 1000 id = pci_ids; 1001 while (id->type && id->type != type) 1002 id++; 1003 if (id->desc == NULL) 1004 return (ENXIO); 1005 sio_pci_kludge_unit(dev); 1006 return (sioattach(dev, id->rid)); 1007} 1008 1009/* 1010 * Don't cut and paste this to other drivers. It is a horrible kludge 1011 * which will fail to work and also be unnecessary in future versions. 1012 */ 1013static void 1014sio_pci_kludge_unit(dev) 1015 device_t dev; 1016{ 1017 devclass_t dc; 1018 int err; 1019 int start; 1020 int unit; 1021 1022 unit = 0; 1023 start = 0; 1024 while (resource_int_value("sio", unit, "port", &start) == 0 && 1025 start > 0) 1026 unit++; 1027 if (device_get_unit(dev) < unit) { 1028 dc = device_get_devclass(dev); 1029 while (devclass_get_device(dc, unit)) 1030 unit++; 1031 device_printf(dev, "moving to sio%d\n", unit); 1032 err = device_set_unit(dev, unit); /* EVIL DO NOT COPY */ 1033 if (err) 1034 device_printf(dev, "error moving device %d\n", err); 1035 } 1036} 1037 1038static int 1039sio_pci_probe(dev) 1040 device_t dev; 1041{ 1042 u_int32_t type; 1043 struct pci_ids *id; 1044 1045 type = pci_get_devid(dev); 1046 id = pci_ids; 1047 while (id->type && id->type != type) 1048 id++; 1049 if (id->desc == NULL) 1050 return (ENXIO); 1051 device_set_desc(dev, id->desc); 1052 return (sioprobe(dev, id->rid)); 1053} 1054#endif /* NPCI > 0 */ 1055 |
|
953static struct isa_pnp_id sio_ids[] = { 954 {0x0005d041, "Standard PC COM port"}, /* PNP0500 */ 955 {0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */ 956 {0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */ 957 {0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */ 958 {0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */ 959 /* Devices that do not have a compatid */ 960 {0x7602a904, NULL}, /* AEI0276 - 56K v.90 Fax Modem (LKT) */ --- 39 unchanged lines hidden (view full) --- 1000 {0x06007256, NULL}, /* USR0006 - USR Sportster 33.6k */ 1001 {0x11007256, NULL}, /* USR0011 - USR ? */ 1002 {0x01017256, NULL}, /* USR0101 - USR ? */ 1003 {0x30207256, NULL}, /* USR2030 - U.S.Robotics Inc. Sportster 560 */ 1004 {0x50207256, NULL}, /* USR2050 - U.S.Robotics Inc. Sportster 33. */ 1005 {0x70207256, NULL}, /* USR2070 - U.S.Robotics Inc. Sportster 560 */ 1006 {0x30307256, NULL}, /* USR3030 - U.S. Robotics 56K FAX INT */ 1007 {0x31307256, NULL}, /* USR3031 - U.S. Robotics 56K FAX INT */ | 1056static struct isa_pnp_id sio_ids[] = { 1057 {0x0005d041, "Standard PC COM port"}, /* PNP0500 */ 1058 {0x0105d041, "16550A-compatible COM port"}, /* PNP0501 */ 1059 {0x0205d041, "Multiport serial device (non-intelligent 16550)"}, /* PNP0502 */ 1060 {0x1005d041, "Generic IRDA-compatible device"}, /* PNP0510 */ 1061 {0x1105d041, "Generic IRDA-compatible device"}, /* PNP0511 */ 1062 /* Devices that do not have a compatid */ 1063 {0x7602a904, NULL}, /* AEI0276 - 56K v.90 Fax Modem (LKT) */ --- 39 unchanged lines hidden (view full) --- 1103 {0x06007256, NULL}, /* USR0006 - USR Sportster 33.6k */ 1104 {0x11007256, NULL}, /* USR0011 - USR ? */ 1105 {0x01017256, NULL}, /* USR0101 - USR ? */ 1106 {0x30207256, NULL}, /* USR2030 - U.S.Robotics Inc. Sportster 560 */ 1107 {0x50207256, NULL}, /* USR2050 - U.S.Robotics Inc. Sportster 33. */ 1108 {0x70207256, NULL}, /* USR2070 - U.S.Robotics Inc. Sportster 560 */ 1109 {0x30307256, NULL}, /* USR3030 - U.S. Robotics 56K FAX INT */ 1110 {0x31307256, NULL}, /* USR3031 - U.S. Robotics 56K FAX INT */ |
1111 {0x50307256, NULL}, /* USR3050 - U.S. Robotics 56K FAX INT */ |
|
1008 {0x70307256, NULL}, /* USR3070 - U.S. Robotics 56K Voice INT */ 1009 {0x90307256, NULL}, /* USR3090 - USR ? */ 1010 {0x90917256, NULL}, /* USR9190 - USR 56k Voice INT */ 1011 {0x0300695c, NULL}, /* WCI0003 - Fax/Voice/Modem/Speakphone/Asvd */ 1012 {0x61f7896a, NULL}, /* ZTIF761 - Zoom ComStar 33.6 */ 1013#ifdef PC98 1014 {0x0100e4a5, "RSA-98III"}, 1015#endif --- 12 unchanged lines hidden (view full) --- 1028 /* Check isapnp ids */ 1029 if (ISA_PNP_PROBE(device_get_parent(dev), dev, sio_ids) == ENXIO) 1030 return (ENXIO); 1031#ifdef PC98 1032 logical_id = isa_get_logicalid(dev); 1033 if (logical_id == 0x0100e4a5) /* RSA-98III */ 1034 device_set_flags(dev, COM_IF_RSA98III << 24); 1035#endif | 1112 {0x70307256, NULL}, /* USR3070 - U.S. Robotics 56K Voice INT */ 1113 {0x90307256, NULL}, /* USR3090 - USR ? */ 1114 {0x90917256, NULL}, /* USR9190 - USR 56k Voice INT */ 1115 {0x0300695c, NULL}, /* WCI0003 - Fax/Voice/Modem/Speakphone/Asvd */ 1116 {0x61f7896a, NULL}, /* ZTIF761 - Zoom ComStar 33.6 */ 1117#ifdef PC98 1118 {0x0100e4a5, "RSA-98III"}, 1119#endif --- 12 unchanged lines hidden (view full) --- 1132 /* Check isapnp ids */ 1133 if (ISA_PNP_PROBE(device_get_parent(dev), dev, sio_ids) == ENXIO) 1134 return (ENXIO); 1135#ifdef PC98 1136 logical_id = isa_get_logicalid(dev); 1137 if (logical_id == 0x0100e4a5) /* RSA-98III */ 1138 device_set_flags(dev, COM_IF_RSA98III << 24); 1139#endif |
1036 return (sioprobe(dev)); | 1140 return (sioprobe(dev, 0)); |
1037} 1038 1039static int | 1141} 1142 1143static int |
1040sioprobe(dev) | 1144sioprobe(dev, xrid) |
1041 device_t dev; | 1145 device_t dev; |
1146 int xrid; |
|
1042{ 1043#if 0 1044 static bool_t already_init; 1045 device_t xdev; 1046#endif 1047 bool_t failures[10]; 1048 int fn; 1049 device_t idev; --- 9 unchanged lines hidden (view full) --- 1059#ifdef PC98 1060 int irqout=0; 1061 int tmp; 1062 int port_shift = 0; 1063 struct siodev iod; 1064 Port_t rsabase; 1065#endif 1066 | 1147{ 1148#if 0 1149 static bool_t already_init; 1150 device_t xdev; 1151#endif 1152 bool_t failures[10]; 1153 int fn; 1154 device_t idev; --- 9 unchanged lines hidden (view full) --- 1164#ifdef PC98 1165 int irqout=0; 1166 int tmp; 1167 int port_shift = 0; 1168 struct siodev iod; 1169 Port_t rsabase; 1170#endif 1171 |
1067 rid = 0; | 1172 rid = xrid; |
1068#ifdef PC98 1069 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 1070 0, ~0, 1, RF_ACTIVE); /* XXX */ 1071#else 1072 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 1073 0, ~0, IO_COMSIZE, RF_ACTIVE); 1074#endif 1075 if (!port) --- 526 unchanged lines hidden (view full) --- 1602 return (1); 1603} 1604#endif /* COM_ESP */ 1605 1606static int 1607sio_isa_attach(dev) 1608 device_t dev; 1609{ | 1173#ifdef PC98 1174 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 1175 0, ~0, 1, RF_ACTIVE); /* XXX */ 1176#else 1177 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 1178 0, ~0, IO_COMSIZE, RF_ACTIVE); 1179#endif 1180 if (!port) --- 526 unchanged lines hidden (view full) --- 1707 return (1); 1708} 1709#endif /* COM_ESP */ 1710 1711static int 1712sio_isa_attach(dev) 1713 device_t dev; 1714{ |
1610 return (sioattach(dev)); | 1715 return (sioattach(dev, 0)); |
1611} 1612 1613static int | 1716} 1717 1718static int |
1614sioattach(dev) | 1719sioattach(dev, xrid) |
1615 device_t dev; | 1720 device_t dev; |
1721 int xrid; |
|
1616{ 1617 struct com_s *com; 1618#ifdef COM_ESP 1619 Port_t *espp; 1620#endif 1621 Port_t iobase; 1622 int unit; 1623 u_int flags; 1624 int rid; 1625 struct resource *port; 1626 int ret; 1627#ifdef PC98 1628 int port_shift = 0; 1629 u_char *obuf; 1630 u_long obufsize; 1631#endif 1632 | 1722{ 1723 struct com_s *com; 1724#ifdef COM_ESP 1725 Port_t *espp; 1726#endif 1727 Port_t iobase; 1728 int unit; 1729 u_int flags; 1730 int rid; 1731 struct resource *port; 1732 int ret; 1733#ifdef PC98 1734 int port_shift = 0; 1735 u_char *obuf; 1736 u_long obufsize; 1737#endif 1738 |
1633 rid = 0; | 1739 rid = xrid; |
1634#ifdef PC98 1635 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 1636 0, ~0, 1, RF_ACTIVE); /* XXX */ 1637#else 1638 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 1639 0, ~0, IO_COMSIZE, RF_ACTIVE); 1640#endif 1641 if (!port) --- 2518 unchanged lines hidden (view full) --- 4160 outb(iobase + com_cfcr, cfcr); 4161 4162 code = dlbh << 8 | dlbl; 4163 4164 for (; table->sp_speed != -1; table++) 4165 if (table->sp_code == code) 4166 return (table->sp_speed); 4167 | 1740#ifdef PC98 1741 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 1742 0, ~0, 1, RF_ACTIVE); /* XXX */ 1743#else 1744 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 1745 0, ~0, IO_COMSIZE, RF_ACTIVE); 1746#endif 1747 if (!port) --- 2518 unchanged lines hidden (view full) --- 4266 outb(iobase + com_cfcr, cfcr); 4267 4268 code = dlbh << 8 | dlbl; 4269 4270 for (; table->sp_speed != -1; table++) 4271 if (table->sp_code == code) 4272 return (table->sp_speed); 4273 |
4168 return 0; /* didn't match anything sane */ | 4274 return (0); /* didn't match anything sane */ |
4169} 4170 4171static void 4172siocnopen(sp, iobase, speed) 4173 struct siocnstate *sp; 4174 Port_t iobase; 4175 int speed; 4176{ --- 204 unchanged lines hidden (view full) --- 4381 outb(siocniobase + com_dlbh, 4382 (u_int) COMBRD(comdefaultrate) >> 8); 4383 outb(siocniobase + com_cfcr, cfcr); 4384 4385 siocnopen(&sp, siocniobase, comdefaultrate); 4386 splx(s); 4387 4388 cn_tab = &sio_consdev; | 4275} 4276 4277static void 4278siocnopen(sp, iobase, speed) 4279 struct siocnstate *sp; 4280 Port_t iobase; 4281 int speed; 4282{ --- 204 unchanged lines hidden (view full) --- 4487 outb(siocniobase + com_dlbh, 4488 (u_int) COMBRD(comdefaultrate) >> 8); 4489 outb(siocniobase + com_cfcr, cfcr); 4490 4491 siocnopen(&sp, siocniobase, comdefaultrate); 4492 splx(s); 4493 4494 cn_tab = &sio_consdev; |
4389 return 0; | 4495 return (0); |
4390} 4391 4392int 4393siogdbattach(port, speed) 4394 int port; 4395 int speed; 4396{ 4397 int s; --- 20 unchanged lines hidden (view full) --- 4418 COMBRD(gdbdefaultrate) & 0xff); 4419 outb(siogdbiobase + com_dlbh, 4420 (u_int) COMBRD(gdbdefaultrate) >> 8); 4421 outb(siogdbiobase + com_cfcr, cfcr); 4422 4423 siocnopen(&sp, siogdbiobase, gdbdefaultrate); 4424 splx(s); 4425 | 4496} 4497 4498int 4499siogdbattach(port, speed) 4500 int port; 4501 int speed; 4502{ 4503 int s; --- 20 unchanged lines hidden (view full) --- 4524 COMBRD(gdbdefaultrate) & 0xff); 4525 outb(siogdbiobase + com_dlbh, 4526 (u_int) COMBRD(gdbdefaultrate) >> 8); 4527 outb(siogdbiobase + com_cfcr, cfcr); 4528 4529 siocnopen(&sp, siogdbiobase, gdbdefaultrate); 4530 splx(s); 4531 |
4426 return 0; | 4532 return (0); |
4427} 4428 4429#endif 4430 4431static void 4432siocninit(cp) 4433 struct consdev *cp; 4434{ --- 104 unchanged lines hidden (view full) --- 4539 splx(s); 4540} 4541#endif 4542 4543DRIVER_MODULE(sio, isa, sio_isa_driver, sio_devclass, 0, 0); 4544#if NCARD > 0 4545DRIVER_MODULE(sio, pccard, sio_pccard_driver, sio_devclass, 0, 0); 4546#endif | 4533} 4534 4535#endif 4536 4537static void 4538siocninit(cp) 4539 struct consdev *cp; 4540{ --- 104 unchanged lines hidden (view full) --- 4645 splx(s); 4646} 4647#endif 4648 4649DRIVER_MODULE(sio, isa, sio_isa_driver, sio_devclass, 0, 0); 4650#if NCARD > 0 4651DRIVER_MODULE(sio, pccard, sio_pccard_driver, sio_devclass, 0, 0); 4652#endif |
4653#if NPCI > 0 4654DRIVER_MODULE(sio, pci, sio_pci_driver, sio_devclass, 0, 0); 4655#endif |
|
4547 4548#ifdef PC98 4549/* 4550 * pc98 local function 4551 */ 4552 4553static void 4554com_tiocm_set(struct com_s *com, int msr) --- 609 unchanged lines hidden --- | 4656 4657#ifdef PC98 4658/* 4659 * pc98 local function 4660 */ 4661 4662static void 4663com_tiocm_set(struct com_s *com, int msr) --- 609 unchanged lines hidden --- |