Subject: Re: Console, zs driver
To: Gordon W. Ross <gwr@mc.com>
From: Adam Glass <glass@sun-lamp.cs.berkeley.edu>
List: port-sun3
Date: 02/18/1994 10:31:24
> OK, so findzs() is in sparc/autoconf.c and what id does is find
> the mapping provided by the Open Boot PROM (which sun3 lacks).
> 
> Is the keyboard zs chip (obio space) already mapped when the
> zs driver gets its match/attach calls?
> 
> Itching to try a sun3 zs driver...
> Gordon

OBIO space is unmapped when autoconfig begins...

In theory, xxmatch() (probe in older nomenclature) should test to see
if the device is present, and xxattach() should configure the device,
etc.

For a driver that uses the OBIO space, the xxmatch() routine should
use obio_probe() which will temporarily map in that space so you can
peek and poke at registers.  While the trap infrastructure for
obio_probe() exists, I don't think its ever been tested, nor can I
remember if obio_probe() was actually ever written.  For now, make the
match routine always return true.

In the attach routine, to get an piece of the obio space mapped, use
obio_alloc() routine.  For example code see
sys/arch/sun3/dev/if_le_subr.c.

The autoconfig stuff needs some work , particularly to eliminate
common code, check for obio collisions, make obio_probe() work right,
etc.  However, none of this is show-stopping, just annoying.

warning: the sparc zs driver is not exactly my idea of good serial
driver.  Other changes will be required to not use software interrupts
(temporarily).  There are also some more long term structural changes
that i'd like to make, but first lets get it working......

later,
Adam Glass


------------------------------------------------------------------------------