linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Arnd Bergmann <arnd@arndb.de>, avorontsov@ru.mvista.com
Cc: linuxppc-dev@ozlabs.org, gregkh@suse.de,
	linux-usb-devel@lists.sourceforge.net, mike@compulab.co.il
Subject: Re: CPM2 USB host driver
Date: Fri, 30 Nov 2007 15:18:42 -0800	[thread overview]
Message-ID: <200711301518.43044.david-b@pacbell.net> (raw)
In-Reply-To: <200711302332.21864.arnd@arndb.de>

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

  reply	other threads:[~2007-11-30 23:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-30 10:45 CPM2 USB host driver Laurent Pinchart
2007-11-30 11:16 ` Vitaly Bordug
2007-11-30 12:30   ` Laurent Pinchart
2007-11-30 12:48     ` Anton Vorontsov
2007-11-30 13:00       ` Vitaly Bordug
2007-11-30 15:28       ` Laurent Pinchart
2007-11-30 16:11         ` Anton Vorontsov
2007-11-30 22:32           ` Arnd Bergmann
2007-11-30 23:18             ` David Brownell [this message]
2007-12-02  6:31         ` Mike Rapoport
2007-11-30 13:02     ` Vitaly Bordug

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200711301518.43044.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=arnd@arndb.de \
    --cc=avorontsov@ru.mvista.com \
    --cc=gregkh@suse.de \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mike@compulab.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).