Messages in this thread | | | Date | Wed, 19 Jan 2000 14:13:38 +0100 | From | Vojtech Pavlik <> | Subject | Re: [patch] Support for 3Com PCI modem + Generic PCI serials |
| |
On Wed, Jan 19, 2000 at 02:10:27PM +0100, Rogier Wolff wrote:
> if you'd start by guessing a 115200 base baud. That doesn't lead to > problems if you guess wrong. Users can always adjust that later. > > Next, how about probing for another uart at address +8, addres +16, > address+32 etcetc until address +256? If you find one at address +128, > you continue probing at address+256, address+384, until you find > "nothing". > > (I'm afraid that the BIOS knew what IOsize the card requested but that > this info isn't available in Linux right?)
It is available. You know where to stop.
> Next, you'd ideally set the uart to "loopback mode" (i.e. that > externally this is not visible!) and send say 5 chars at 50 baud. That > should take about 1 second. If it takes around 0.25 seconds, base_baud > was wrong by a factor of 4. Adjust base_baud, and do the measurement > again.
I'd do this at a little higher speed, not to waste so much time. ;)
> A problem arises if you measure a base_baud of about 15MHz. Then the > chip can be powered by a 14.31 MHz crystal, 15MHz or 16MHz.
You can get a very precise measurement with udelay() and/or PIT/TSC timing.
> If you measure a 115100 base_baud, then you can be confident that it > actually WAS 115200. But if you measure 14.78 MHz it is hard to round > that to either 15MHz or 14.31 which are both likely candidates. > > Now haven't we detected all serial ports, and even autodetected the > base_baud?
Yes, but we might also have crashed the machine. :(
-- Vojtech Pavlik SuSE Labs
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |