Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!uunet!elroy.jpl.nasa.gov!swrinde!news.dell.com!uudell!obiwan!bob
From: bob@obiwan.uucp (Bob Willcox)
Newsgroups: comp.os.386bsd.questions
Subject: Re: how to configure multiport cards using pk024
Message-ID: <C9zA9I.oF@obiwan.uucp>
Date: 11 Jul 93 02:15:04 GMT
References: <568@apdnews.idca.tds.philips.nl>
Organization: /etc/organization
Lines: 82
In article <568@apdnews.idca.tds.philips.nl> wilko@idca.tds.philips.nl (Wilko Bulte) writes:
>Patchkit 0.2.4. has introduced the possibility to use multiport serial
>boards. Very nice to have it, especially since my AST/4 is sitting idle
>on my EISA bus for months now ;-)
>
>Only: how do you configure an AST/4 in the kernel?
I have an AST/4 (actually, a clone) multiport card running on my system.
I had to hack the sioprobe() and sioattach() code in sio.c to get it to
properly detect the ports and then recognize the type of UARTs installed
(16550As). From a previous posting of mine:
------------------------------------------------------------------------
I have expierenced similar problems. The test in the sio.c driver (in
the sioattach() routine) that is causing it to *think* it is a 8250 is:
/* attempt to determine UART type */
scr = inb(iobase + com_scr);
outb(iobase + com_scr, 0xa5);
scr1 = inb(iobase + com_scr);
outb(iobase + com_scr, 0x5a);
scr2 = inb(iobase + com_scr);
outb(iobase + com_scr, scr);
if (scr1 != 0xa5 || scr2 != 0x5a) <--- this is it!
printf(" <8250>");
This test seems to be depending upon the absence of the com_scr
register in the 8250 (iobase+7). Unfortunately, the AST 4-port
card uses this last register of the last UART for interrupt status
(for the 4 UARTs) (I believe), hence the last port of the 4 fails
the test. I simply deleted this test in my copy of sio.c (I *know*
that I have no 8250's...mine are all 16550s).
Note: My Bocaboard (BB1008) failed the same way on *all* 8 of its
ports (the +7 address register is replicated for each port
according to the documentation).
I have also had some problems with another test in the if statement:
if ( inb(iobase + com_cfcr) != CFCR_8BITS
|| inb(iobase + com_ier) != IER_ETXRDY
|| inb(iobase + com_mcr) != MCR_IENABLE
|| !isa_irq_pending(dev) <--- this one fails!
|| (inb(iobase + com_iir) & IIR_IMASK) != IIR_TXRDY
|| isa_irq_pending(dev)
|| (inb(iobase + com_iir) & IIR_IMASK) != IIR_NOPEND)
result = 0;
in the sioprobe() routine for a couple of the ports on my 4-port
card (thats right, two worked and two failed :-( (This is *not* an
AST card, its a clone of some kind). Again, I simply removed that
particular test and everything seems to be okay. These are admittedly
pretty ugly hacks, but when you're in a pinch to the system back
up...
------------------------------------------------------------------------
>
>What I have in the config file is:
>
> sio0 -> COM1
> sio1 -> COM2
>
>(both are recognized and work just fine)
>
> sio2 @ 0x1a0 irq 2 flags 0x0501
> sio3 @ 0x1a8 irq 2 flags 0x0501
> sio4 @ 0x1b0 irq 2 flags 0x0501
> sio5 @ 0x1b8 irq 2 flags 0x0501
>
>Hmm, might be that I had to take irq 9 to get config happy, but essentially
>the above is what I used.
My configuration looks very similar to yours, though I am using irq 5
for the 4-port card.
--
Bob Willcox ...!{rutgers|ames}!cs.utexas.edu!uudell!obiwan!bob
Phone: 512 258-4224 (home)
512 838-3914 (work)