Subject: Re: probing parallel and serial ports
To: Martin Husemann <martin@duskware.de>
From: David Ferlier <krp@pobox.com>
List: tech-kern
Date: 12/10/2002 00:37:15
On Tue, Dec 10, 2002 at 12:22:19AM +0100, Martin Husemann wrote:
> On Tue, Dec 10, 2002 at 12:05:53AM +0100, David Ferlier wrote:
> 
> > I just need to know if there are better ways to probe parallel and serial ports
> > than just do reads on /dev/tty0* (i can't do memory reads at 0x2f8 and 0x3f8 
> > ports right ?)
> 
> There is no good way to do so. The program should rely on a config file to
> provide this information. Serial and parallel device names vary greatly among
> the various hardware platforms NetBSD runs on - though the program will
> probably work on all of them, if it's not doing something stupid like assume
> there is a single (or one at all) "IO space" and you can access ports in "IO
> space at 0x2f8" to reach a standard PC com chip. Or byteorder is always
> little endian...
> 
> 
> Martin
> 

Ok, i am going to fix the values with macros.

I think these routines shouldn't exist, but there should be tests of the arch
with ifdefs, and inside the tests definitions of the devices paths with their
associated ports adresses.

Thanks Martin.


-- 

Run NetBSD    - www.NetBSD.org
David Ferlier - krp@pobox.com