Hi list,
I'm currently reading the LDD 3rd Edition and trying to create a device
driver for a custom device located on VME bus. I have already linux
2.6.15running on the master board, as well as the device driver for
the PCI-VME
bridge. The main problem I have is understanding how to "attach" my driver
for the custom device to the bridge device driver.
The bridge device driver is implemented as a class, i.e. doesn't define a
new bus type. Should I define a new class for my driver, or should I connect
it somehow to the existing one (maybe by something as "subclass")?
All I want to do is to redirect I/O reads and writes to the VME bus, but I
got no clue as to how to use the existing VME bridge driver for this
purpose. After I get through this I think all other things (VME interrupt
registration & handling, etc.) will be straightforward.
The LDD 3rd book states that defining a new bus type is the last thing one
would like to do, instead defining a class is far better approach. Why is
that?
Any recommendations and sharing of practical experience are highly
appreciated.
Best Regards,
Konstantin
Hello Konstantin,
Konstantin Boyanov wrote:
Hi list,
I'm currently reading the LDD 3rd Edition and trying to create a
device driver for a custom device located on VME bus. I have already
linux 2.6.15 running on the master board, as well as the device driver
for the PCI-VME bridge. The main problem I have is understanding how
to "attach" my driver for the custom device to the bridge device driver.
The bridge device driver is implemented as a class, i.e. doesn't
define a new bus type. Should I define a new class for my driver, or
should I connect it somehow to the existing one (maybe by something as
"subclass")?
All I want to do is to redirect I/O reads and writes to the VME bus,
but I got no clue as to how to use the existing VME bridge driver for
this purpose. After I get through this I think all other things (VME
interrupt registration & handling, etc.) will be straightforward.
The LDD 3rd book states that defining a new bus type is the last thing
one would like to do, instead defining a class is far better approach.
Why is that?
Any recommendations and sharing of practical experience are highly
appreciated.
I am also working on a VME-board. What I did was use mmap to map
specific parts of the VME-memory into user space.
BTW: what kind of board and Linux-flavor are you using?
Kind regards,
Johan Borkhuis
Hi Johan,
I already went through the user space stuff with the help of other people on
this list, but now I want to do reads and writes in kernel space, in other
words on driver level.
Main reason for the development of a driver for the device is interrupt
handling and signal sending to user space processes by the custom device in
short time frames (within miliseconds), e.g. proper and fast respond is
crutial. But for now I don't know how to do a simple read/write...
I'm using MVME6100 with ELinOS-based distro, kernel 2.6.15.
Regards,
Konstantin