Subject: Re: ByteRunner TC-800 multiport serial board
To: Jukka Marin <firstname.lastname@example.org>
From: Chris G. Demetriou <email@example.com>
Date: 05/18/1998 13:17:12
> The baud-rate multipliers are per-port settable using _jumpers_, nothing
> can be changed in software. It would be difficult to probe the jumper
> settings in the driver (I guess it would be possible to transmit a character
> and see how log it takes to do it, but this would be annoying because then
> the driver would transmit "garbage" data at boot time).
Right. That's why I said the multiplier would make sense to set via
driver flags, i.e. a 'flags' declaration for the driver in the config
Sounds like it makes sense to do it per-port.
> > So, regardless of whether the card has 4 or 8 uarts, it always eats 8
> > UARTs worth (64 bytes) of I/O space?
> I'm not sure. I haven't got any technical docs for the card. The status
> register may be address decoded separately, so it might be possible to use
> the addresses between the last UART and the status register. Dunno.
> > Does it give you a good way of telling how many UARTs it actually has?
> AFAIK, no. The board has 4 or 8 UARTs and the status register (which
> just contains a bit mask of UART interrupt outputs), that seems to be
That seems pretty consistent with what the other multi-port boards do.
> > Really, you should config_found() only the UARTs that you know are
> > there (or, at least, the UARTs that are "supposed to be" there, but
> > there may be no easy way to do the right thing (other than a driver
> > flag, and if it always eats 64 bytes of I/O space that's probably a
> > waste of time).
> I don't think the I/O space costs that much - isn't it the interrupts
> that ppl always run out of, anyway?
Well, sure, but that wasn't what I was getting at. Note that the
following is very much a "how things should be done" comment, and
isn't necessarily reflected by all existing drivers. 8-)
When something calls config_found(), that's supposed to mean "I know
this device is here, really I do." For some multiport boards, where
there are a known number of chips and changing that requires a chip
puller or soldering iron, config_found() is the right thing to do.
In a case where you _know_ you have a variable number of ports, you
probably shouldn't be config_found()ing things that you're not sure
that you have. One way to be "sure" that you have something, for
instance, is to write a cheap, sleazy probe routine which just makes
sure that something is in that space, and assumes that if there's
something there that it belongs to the board. (not an unreasonable