David Schleef wrote:
> How are you slowing down IO? Linux has macros specifically for
> this, that is, outw_p() and inw_p(). This slows down ISA I/O by
> putting a fake bus access after the real one, which is useful if
> the board can't handle back-to-back I/O.
For slowing down, I tried outw_p ( with and without REALLY_SLOW_IO defined)
- nothing.
Also tried three methods (below) with or without input command (before
or/and after output) - nothing. I adjusted the WAIT STATE jumper on the
board - nothing.
Code below:
-----------------------------------------------------
#define _OO(v,a) ao((v),(a)) // outw, outw_p, so, bo, or ao
replacment
inline void so(unsigned short v, unsigned short a)
{
outw(v,a);
inw(a);
}
inline void bo(unsigned short v, unsigned short a)
{
outb((v>>8) & 0xff,a+1);
outb((v>>0) & 0xff,a+0);
}
inline void ao(unsigned short v, unsigned short a)
{
__asm__ __volatile__ (
"
mov %1, %%dx
in %%dx,%%ax
mov %0,%%ax
out %%ax,%%dx
"
: /* nothing */
: "g" (v), "g" (a)
: "ax", "dx");
}
/* somewhere in a periodically (4-4000 ms) waked up task */
...
_OO(v1,a1);
_OO(v2,a2);
...
--------------------------------------------
Frustrating. I spent a week trying different methods. Is there anybody
expert could explain it at least?
Sly
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/