linux-mips-fnet
[Top] [All Lists]

Re: serial console corruption

To: linux-mips@fnet.fr
Subject: Re: serial console corruption
From: Ralf Baechle <ralfb@cthulhu.engr.sgi.com>
Date: Fri, 16 Apr 1999 14:10:30 -0700
In-reply-to: <Pine.LNX.3.95.990415154639.6412C-100000@skynet.csn.ul.ie>; from Dave Airlie on Thu, Apr 15, 1999 at 03:50:24PM +0100
References: <XFMail.990413234006.Harald.Koerfgen@home.ivm.de> <Pine.LNX.3.95.990415154639.6412C-100000@skynet.csn.ul.ie>
On Thu, Apr 15, 1999 at 03:50:24PM +0100, Dave Airlie wrote:

> > These machines are considerably slower than your /200 an it may happen that
> > you need to insert some delay()'s or that the writeback buffer becomes
> > visible. In that case you need to insert some wbflush()'es at strategic
> > places.
> 
> good call, in the dz_console_put_char there was a 
> 
> int loops = 1000; 
> 
> the console writing code spins waiting for the bit to be set on the serial
> port, 
> 
> I've changed it to 3000 for my decstation,  and it now works, however I
> persume this is not how it should be done, 
> 
> I should be able to get it to work for any decstation easily enough from
> the processor speed info...

What you want to use instead are the udelay() and mdelay functions in
<linux/delay.h>.  Beware, they relay on the BogoMIPS value having already
being computed, so they cannot be called during the very early startup
unless you initialize loops_per_sec using some worst case assumption.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>