lkml.org 
[lkml]   [2002]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Cleanup port 0x80 use (was: Re: IO delay ...)
Date
Followup to:  <E16lw5V-0004ES-00@the-village.bc.nu>
By author: Alan Cox <alan@lxorguk.ukuu.org.uk>
In newsgroup: linux.dev.kernel
>
> > I am still wondering, though, why this method of getting a delay
> > is used so often. IMO in most places one could use udelay(1) instead,
> > with much less risk of doing wrong.
>
> udelay(1) I don't believe is enough. Unfortunately I can't find my
> documentation on the ISA bus which covers the timeout for acknowledging an
> address cycle. Otherwise for tsc capable boxes I agree entirely.
>

The ISA bus doesn't time out; a cycle on the ISA bus just happens, and
the fact that noone is there to listen doesn't seem to matter.

The delay is something like 8 cycles @ 8.3 MHz or around 1 ms.
However, an important thing to note is that this delay applies *at the
southbridge*. An OUT is a fully synchronizing operation, so it
doesn't just give a 1 ms delay due to the ISA bus cycle, but it also
makes sure everything else in the system is completed before the
timing counter even starts to tick.

Of course, if all you're doing is IOIO (on an x86!) it doesn't matter
-- IOIO is fully synchronizing anyway.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.094 / U:5.820 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site