Subject: Re: Driver for device behind a PCI-VME bridge

From: Johan Borkhuis <[email-masked]>
Date: Tue, 21 Aug 2007 10:32:50 +0200

Konstantin Boyanov wrote:
>
> Hi again,
>  
> After some googling I came to the conclusion that the best approach to 
> understanding how to write a driver for a device behind a PCI-XXX 
> bridge is to look at the source for the USB subsystem, although the 
> USB subsystem is actually a bus subssytem and not a class.

I also work with devices on the VME bus. The approach we took is to map 
all the devices into userspace, and use Xenomai for RT performance. This 
avoids the need to write drivers for all the devices. The RT-performance 
of Xenomai is quite good: the jitter on a timer-interrupt is always less 
than 20usec, even under high load, where standard Linux only achieves 
this in a no load situatieo, under high load standard Linux has a jitter 
of over 10 msec.

The setup we choose was to have a RT-interrupt handler and a RT IOCTL 
call "WAIT_FOR_INTERRUPT". This is a slightly modified version from the 
Motorola driver (I guess that you also use the Tundra chipset to access 
the VME-bus). Here you can wait for a specific VME interrupt-level, and 
it returns the vector number. So you can have several applications 
connect to the same VME driver, but all on different levels.

Kind regards,
    Johan Borkhuis