Subject: Re: patches to scc.c for input DELAY()?
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Simon Burge <simonb@telstra.com.au>
List: port-pmax
Date: 10/18/1997 16:13:53
On Fri, 17 Oct 1997 16:02:25 -0700  Jonathan Stone wrote:

> Philip Tait reported problems with duplicated chars on the scc driver.
> Does anyone have patches to the pmax scc.c driver to put DELAY()
> macros in the input-side?
> 
> It'd be great to get these into the tree for 1.3, and it needs to be
> done ASAP.

After a quick look I'd thing the following should do, but I haven't
tested it...

*** /ftp/pub/NetBSD/NetBSD-current/src/sys/arch/pmax/tc/scc.c	Mon Jul 21 21:19:00 1997
--- scc.c	Sat Oct 18 16:07:23 1997
***************
*** 1193,1198 ****
--- 1193,1201 ----
  			chan = SCC_CHANNEL_B;
  		tp = sc->scc_tty[chan];
  		SCC_READ_DATA(regs, chan, cc);
+ #ifdef pmax	/* Alpha handles the 1.6 msec settle time in hardware */
+ 		DELAY(2);
+ #endif
  		if (rr2 == SCC_RR2_A_RECV_SPECIAL ||
  			rr2 == SCC_RR2_B_RECV_SPECIAL) {
  			SCC_READ_REG(regs, chan, SCC_RR1, rr1);

As I think I mentioned elsewhere (I think I pr'd it), the DELAY(2) is
too small for a R4000 - I can't remember if this is fixed (Jonathan, did
you bump cpuspeed for the r4k's?), but if it isn't it should be for 1.3.

BTW, it's about time sys/arch/pmax/dev/scc.c went.  It looks like
dev/sccreg.h is still used - whether or not is should move to
tc/sccreg.h is a different question.

Simon.