Date: Tue, 04 May 1999 14:17:28 -0400 (EDT) From: "Mark J. Taylor" <mtaylor@cybernet.com> To: freebsd-hackers@freebsd.org Subject: sio patch to make 65650 work Message-ID: <XFMail.990504141728.mtaylor@cybernet.com>
next in thread | raw e-mail | index | archive | help
Here's a quick patch to sio.c, relative to 3.1-RELEASE, to make the 65654 serial chip work. It is a high-speed serial port, and bit 7 of the MCR is a "divide by 4" indicator. In divide by four mode, its rates go down from 115200 kbps, like "normal" serial chips. This patch basically keeps bit 7 "as-is", and does NOT support the higer rates. It is only meant as an interim patch to at least get these boards *working*. I've tested it on an 8-port board with this chipset on it. It does not break the "regular" serial chipset support. (I put a serial mouse on a few of the ports, and it worked under X11.) Perhaps someone can review this and maybe commit it? Or is it too much of a "hack"? This is the -hackers list, right. ;) *** sio.c Mon Jan 25 23:04:01 1999 --- sio.c Tue May 4 12:24:36 1999 *************** *** 743,746 **** --- 743,747 ---- failures[1] = inb(iobase + com_ier) - IER_ETXRDY; failures[2] = inb(iobase + com_mcr) - mcr_image; + if (failures[2] == 0x80) { mcr_image |= 0x80; failures[2] = 0; } DELAY(10000); /* Some internal modems need this time */ irqmap[1] = isa_irq_pending(); *************** *** 2327,2331 **** return (bits); } ! mcr = 0; if (bits & TIOCM_DTR) mcr |= MCR_DTR; --- 2328,2332 ---- return (bits); } ! mcr = ((how != DMBIC) && (com->mcr_image & 0x80)) ? 0x80 : 0; if (bits & TIOCM_DTR) mcr |= MCR_DTR; *************** *** 2586,2590 **** * an interrupt by floating the IRQ line. */ ! outb(iobase + com_mcr, (sp->mcr & MCR_IENABLE) | MCR_DTR | MCR_RTS); } --- 2587,2591 ---- * an interrupt by floating the IRQ line. */ ! outb(iobase + com_mcr, (sp->mcr & MCR_IENABLE) | MCR_DTR | MCR_RTS | (sp->mcr & 0x80) ? 0x80 : 0); } --- Mark J. Taylor Networking Research Cybernet Systems mtaylor@cybernet.com 727 Airport Blvd. PHONE (734) 668-2567 Ann Arbor, MI 48108 FAX (734) 668-8780 http://www.cybernet.com/ http://www.netmax.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990504141728.mtaylor>