Re: CPM2 USB host driver

David Brownell <[email protected]>
Newsgroups gmane.linux.usb.devel,gmane.linux.ports.ppc64.devel
Message-ID <[email protected]>
On Friday 30 November 2007, Arnd Bergmann wrote:
> 6100 lines means it's still the second-largest hcd driver in the kernel,
> only drivers/usb/host/u132-hcd.c has even more.

~/kernel/g26/drivers/usb/host$ wc -l ohci*[hc] |grep total
  9485 total
~/kernel/g26/drivers/usb/host$ wc -l ehci*[hc] |grep total
  8709 total
~/kernel/g26/drivers/usb/host$ wc -l uhci*[hc] |grep total
  4211 total
~/kernel/g26/drivers/usb/host$ wc -l sl811*[hc] |grep total
 2472 total
~/kernel/g26/drivers/usb/host$ 

Of course a lot of the OHCI stuff is various flavors of bus glue
(with more in the queue).  And for one nyet-merged driver:

~/kernel/omap-2.6/drivers/usb/musb$ wc -l *[hc] |  grep total
 15223 total
~/kernel/omap-2.6/drivers/usb/musb$ 

That's an OTG driver so it includes both host and peripheral
sides, plus currently bus glue for three different chunks of
silicon (DaVinci, OMAP, TUSB6010 ... Blackfin on the way)
with three different DMA engines (sigh).

So it's not that big; larger than UHCI or sl811-hcd though.  ;)


> My experience with other drivers moved into the kernel is that you
> end up rewriting it completely anyway. I can also recommend starting
> from scratch, and taking one of the in-kernel drivers as an example.

Start-from-scratch vs Incremental-rewrite ... there are advantages
to each approach.


> Maybe Greg or David can give you a suggestion which one of them
> serves as the best example for a new host driver.

I don't even know what a CPM2 is, or what kind of host it has.
(Wasn't CPM the predecessor of MS-DOS?)

Suggestions would be futile.

- Dave

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.