Andrew Boyd(deleted)
09/28/2009 10:48 AM
post38873
|
Wiki updated:
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Drivers_wiki_page
with the following:
-- cut --
How do I write a non-PCI Driver?
On a board with a PCI bus, you can rely on the pci server being there to tell you about the ethernet hardware - how many
interfaces there are, and their hardware parameters. But what about on a board with no PCI bus? A good example of this
is the devnp-mpc85xx.so ethernet driver. Over time, board-specific information (such as interrupts, etc) crept in the
driver, and that's not good, because every new board required that the driver binary be altered - yuck. So, there was an
initiative to beef up the existing HWINFO infrastructure. This required changed to both the startup - to create the hwi
entries - and the driver - to use the hwi entries. But at the end of the day, the result is that by using the hwi
infrastructure, a new driver binary is not required for every board. Take a look at the devnp-mpx85xx.so source -
specifically, the mpc85xx/detect.c source file, and the ppc85xx_get_syspage_params() function, which fishes out all the
required hardware parameters. Now, you will notice that devnp-mpc85xx.so still had command line options, which allow a
user to override the auto-detected hwi values - eg during development - but ideally, with a properly-written startup,
this should not be necessary. For more information on the hwi stuff, click here.
-- cut --
It needs more work - but it's a start.
|
|
|