diff options
author | phk <phk@FreeBSD.org> | 1998-12-27 12:35:48 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-12-27 12:35:48 +0000 |
commit | ee35d5712415b9b7379f3c26183a6fb6387a66db (patch) | |
tree | 57645092fc3c1cc7d08097649e41aa33beafc000 /sys | |
parent | e35d117052b23b44b2b245af40a9600e65a813e5 (diff) | |
download | FreeBSD-src-ee35d5712415b9b7379f3c26183a6fb6387a66db.zip FreeBSD-src-ee35d5712415b9b7379f3c26183a6fb6387a66db.tar.gz |
Pre 3.0 branch cleanup casualty #1: DSI_SOFT_MODEM support.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/conf/NOTES | 3 | ||||
-rw-r--r-- | sys/i386/conf/LINT | 3 | ||||
-rw-r--r-- | sys/i386/conf/NOTES | 3 | ||||
-rw-r--r-- | sys/i386/isa/sio.c | 159 |
4 files changed, 4 insertions, 164 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES index b71dfad..cfd3b4c 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.510 1998/12/21 18:04:20 joerg Exp $ +# $Id: LINT,v 1.511 1998/12/22 20:44:13 luigi Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -1095,7 +1095,6 @@ options CONSPEED=9600 #default speed for serial console (default 9600) # Options for sio: options COM_ESP #code for Hayes ESP options COM_MULTIPORT #code for some cards with shared IRQs -options DSI_SOFT_MODEM #code for DSI Softmodems options "EXTRA_SIO=2" #number of extra sio ports to allocate # Other flags for sio that aren't documented in the man page. diff --git a/sys/i386/conf/LINT b/sys/i386/conf/LINT index b71dfad..cfd3b4c 100644 --- a/sys/i386/conf/LINT +++ b/sys/i386/conf/LINT @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.510 1998/12/21 18:04:20 joerg Exp $ +# $Id: LINT,v 1.511 1998/12/22 20:44:13 luigi Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -1095,7 +1095,6 @@ options CONSPEED=9600 #default speed for serial console (default 9600) # Options for sio: options COM_ESP #code for Hayes ESP options COM_MULTIPORT #code for some cards with shared IRQs -options DSI_SOFT_MODEM #code for DSI Softmodems options "EXTRA_SIO=2" #number of extra sio ports to allocate # Other flags for sio that aren't documented in the man page. diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index b71dfad..cfd3b4c 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -2,7 +2,7 @@ # LINT -- config file for checking all the sources, tries to pull in # as much of the source tree as it can. # -# $Id: LINT,v 1.510 1998/12/21 18:04:20 joerg Exp $ +# $Id: LINT,v 1.511 1998/12/22 20:44:13 luigi Exp $ # # NB: You probably don't want to try running a kernel built from this # file. Instead, you should start from GENERIC, and add options from @@ -1095,7 +1095,6 @@ options CONSPEED=9600 #default speed for serial console (default 9600) # Options for sio: options COM_ESP #code for Hayes ESP options COM_MULTIPORT #code for some cards with shared IRQs -options DSI_SOFT_MODEM #code for DSI Softmodems options "EXTRA_SIO=2" #number of extra sio ports to allocate # Other flags for sio that aren't documented in the man page. diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 0d7f0a5..0b08a86 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.218 1998/11/22 10:47:42 bde Exp $ + * $Id: sio.c,v 1.219 1998/12/07 21:58:22 archie Exp $ */ #include "opt_comconsole.h" @@ -322,9 +322,6 @@ static timeout_t comwakeup; static void disc_optim __P((struct tty *tp, struct termios *t, struct com_s *com)); -#ifdef DSI_SOFT_MODEM -static int LoadSoftModem __P((int unit,int base_io, u_long size, u_char *ptr)); -#endif /* DSI_SOFT_MODEM */ static char driver_name[] = "sio"; @@ -951,12 +948,6 @@ sioattach(isdp) /* attempt to determine UART type */ printf("sio%d: type", unit); -#ifdef DSI_SOFT_MODEM - if((inb(iobase+7) ^ inb(iobase+7)) & 0x80) { - printf(" Digicom Systems, Inc. SoftModem"); - goto determined_type; - } -#endif /* DSI_SOFT_MODEM */ #ifdef COM_MULTIPORT if (!COM_ISMULTIPORT(isdp) && !COM_IIR_TXRDYBUG(isdp)) @@ -1744,34 +1735,6 @@ sioioctl(dev, cmd, data, flag, p) case TIOCGWINSZ: bzero(data, sizeof(struct winsize)); return (0); -#ifdef DSI_SOFT_MODEM - /* - * Download micro-code to Digicom modem. - */ - case TIOCDSIMICROCODE: - { - u_long l; - u_char *p,*pi; - - pi = (u_char*)(*(caddr_t*)data); - error = copyin(pi,&l,sizeof l); - if(error) - {return error;}; - pi += sizeof l; - - p = malloc(l,M_TEMP,M_NOWAIT); - if(!p) - {return ENOBUFS;} - error = copyin(pi,p,l); - if(error) - {free(p,M_TEMP); return error;}; - if(error = LoadSoftModem( - MINOR_TO_UNIT(mynor),iobase,l,p)) - {free(p,M_TEMP); return error;} - free(p,M_TEMP); - return(0); - } -#endif /* DSI_SOFT_MODEM */ default: return (ENOTTY); } @@ -2774,126 +2737,6 @@ siocnputc(dev, c) splx(s); } -#ifdef DSI_SOFT_MODEM -/* - * The magic code to download microcode to a "Connection 14.4+Fax" - * modem from Digicom Systems Inc. Very magic. - */ - -#define DSI_ERROR(str) { ptr = str; goto error; } -static int -LoadSoftModem(int unit, int base_io, u_long size, u_char *ptr) -{ - int int_c,int_k; - int data_0188, data_0187; - - /* - * First see if it is a DSI SoftModem - */ - if(!((inb(base_io+7) ^ inb(base_io+7)) & 0x80)) - return ENODEV; - - data_0188 = inb(base_io+4); - data_0187 = inb(base_io+3); - outb(base_io+3,0x80); - outb(base_io+4,0x0C); - outb(base_io+0,0x31); - outb(base_io+1,0x8C); - outb(base_io+7,0x10); - outb(base_io+7,0x19); - - if(0x18 != (inb(base_io+7) & 0x1A)) - DSI_ERROR("dsp bus not granted"); - - if(0x01 != (inb(base_io+7) & 0x01)) { - outb(base_io+7,0x18); - outb(base_io+7,0x19); - if(0x01 != (inb(base_io+7) & 0x01)) - DSI_ERROR("program mem not granted"); - } - - int_c = 0; - - while(1) { - if(int_c >= 7 || size <= 0x1800) - break; - - for(int_k = 0 ; int_k < 0x800; int_k++) { - outb(base_io+0,*ptr++); - outb(base_io+1,*ptr++); - outb(base_io+2,*ptr++); - } - - size -= 0x1800; - int_c++; - } - - if(size > 0x1800) { - outb(base_io+7,0x18); - outb(base_io+7,0x19); - if(0x00 != (inb(base_io+7) & 0x01)) - DSI_ERROR("program data not granted"); - - for(int_k = 0 ; int_k < 0x800; int_k++) { - outb(base_io+1,*ptr++); - outb(base_io+2,0); - outb(base_io+1,*ptr++); - outb(base_io+2,*ptr++); - } - - size -= 0x1800; - - while(size > 0x1800) { - for(int_k = 0 ; int_k < 0xC00; int_k++) { - outb(base_io+1,*ptr++); - outb(base_io+2,*ptr++); - } - size -= 0x1800; - } - - if(size < 0x1800) { - for(int_k=0;int_k<size/2;int_k++) { - outb(base_io+1,*ptr++); - outb(base_io+2,*ptr++); - } - } - - } else if (size > 0) { - if(int_c == 7) { - outb(base_io+7,0x18); - outb(base_io+7,0x19); - if(0x00 != (inb(base_io+7) & 0x01)) - DSI_ERROR("program data not granted"); - for(int_k = 0 ; int_k < size/3; int_k++) { - outb(base_io+1,*ptr++); - outb(base_io+2,0); - outb(base_io+1,*ptr++); - outb(base_io+2,*ptr++); - } - } else { - for(int_k = 0 ; int_k < size/3; int_k++) { - outb(base_io+0,*ptr++); - outb(base_io+1,*ptr++); - outb(base_io+2,*ptr++); - } - } - } - outb(base_io+7,0x11); - outb(base_io+7,3); - - outb(base_io+4,data_0188 & 0xfb); - - outb(base_io+3,data_0187); - - return 0; -error: - printf("sio%d: DSI SoftModem microcode load failed: <%s>\n",unit,ptr); - outb(base_io+7,0x00); \ - outb(base_io+3,data_0187); \ - outb(base_io+4,data_0188); \ - return EIO; -} -#endif /* DSI_SOFT_MODEM */ /* * support PnP cards if we are using 'em |