LPC bus device driver
Posted: Thu Nov 19, 2009 4:12 pm
Hi all,
Im kind of novice when it comes to device drivers but I am currently looking into a driver for a legacy device attached to a LPC bus. My device is built in as a block in a FPGA. I wonder if you guys can help me with some tips of how to start.
I have a access to a driver for a similar device , but that device i not a part of a FPGA and attached to a PCI slot, so it is written as a PnP driver. My idea is to modify that PnP driver and use it for my LPC-device. Is that a bad idea? I guess I have to remove all PnP parts since the LPC bus doesn´t support PnP .
Basically, what I need is to access some I/O port adresses to communicate with the FPGA and also allocate two IRQ:s (ISA).
My Questions:
1. Is it a bad idea, or maybe even possible, to modify the PnP driver and rewrite it for my LPC bus device? If not, what do you suggest?
2. How do I allocate resources for my LPC device, such as IRQ:s and the I/O ports? The PnP driver seems to do it by "IoReportResourceForUsage" and for the IRQ, "IoConnectInterrupt". How is it done for a non PnP driver?
Thanks in advice...
/Marlin22
Im kind of novice when it comes to device drivers but I am currently looking into a driver for a legacy device attached to a LPC bus. My device is built in as a block in a FPGA. I wonder if you guys can help me with some tips of how to start.
I have a access to a driver for a similar device , but that device i not a part of a FPGA and attached to a PCI slot, so it is written as a PnP driver. My idea is to modify that PnP driver and use it for my LPC-device. Is that a bad idea? I guess I have to remove all PnP parts since the LPC bus doesn´t support PnP .
Basically, what I need is to access some I/O port adresses to communicate with the FPGA and also allocate two IRQ:s (ISA).
My Questions:
1. Is it a bad idea, or maybe even possible, to modify the PnP driver and rewrite it for my LPC bus device? If not, what do you suggest?
2. How do I allocate resources for my LPC device, such as IRQ:s and the I/O ports? The PnP driver seems to do it by "IoReportResourceForUsage" and for the IRQ, "IoConnectInterrupt". How is it done for a non PnP driver?
Thanks in advice...
/Marlin22