Thread (7 messages) flat view 7 messages, 4 authors, 2011-01-04

Re: Question about combining a PCI driver with an OF driver

From: <hidden>
Date: 2011-01-04 21:00:11

Scott,

Thanks for the feedback.
Making a faithful clone of any reasonably complex device strikes me as
more work than writing a new ethernet driver.

The last thing you want to end up doing is...
quoted
 And for speed sake it would go on the PCI bus. 
(So much for letting HW make decisions regarding SW :)   )
...hacking up the existing driver to deal with the quirks of the clone,
and having to maintain those hacks. :-)
True, but we really didn't want to recreate all the infrastructure that 
the gianfar driver has in it we wanted to just use it.  Maybe what I 
should do is just take the guts of the gianfar driver and make a pure PCI 
driver out of it. 
It shouldn't matter -- the way buses work in Linux, you should be able
to add a platform device at any time, and the driver will receive a
probe() callback.  The driver never actively searches for devices to
claim.
Okay, I get that and it makes sense with what I know so far about how the 
kernel device model works (which I'm still learning).  So how would I 
manually add a device?  Say I create the PCI wrapper driver that claims 
the clone-TSEC, is there a "register device" type call similar to 
pci_register_driver() that I could put in the wrapper code that causes the 
gfar_probe() to be called?

Bruce
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help