On Wed, Apr 12, 2000 at 04:13:23PM +0200, Sylvester Drozdik wrote:
> Hi,
> I'am working on a PCL823 board driver kernel module using outw and inw
> from <asm/io.h>. I should write subsequent 16bit ports within an IRQ
> routine -- but I can't. The first outw writes the port well, next ones
> do something else. Here the code:
> void intr_handler(void)
> {
>     outw(v1,a1); // a
>     outw(v2,a2); // b
> }
> If I comment out 'a' or 'b', it works.
> I've tried to slow down the IO, without being too slow for an IRQ.
> Nothing helped.
> Any Idea?
> Maybe it isn't an RTL specific issue...


It most likely isn't an RTL issue.

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.

Also, you might try inserting an inw() from the board in between
the outw()s, i.e., 

     outw(v1,a1); // a
     inw(a1);
     outw(v2,a2); // b

Crazy as it may seem, I have seen boards that can't handle two
consecutive write cycles.


dave...


-- [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/

Reply via email to