linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Arend van Spriel" <arend@broadcom.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"Michael Büsch" <m@bues.ch>, "Rafał Miłecki" <zajec5@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: bcma USB Host driver
Date: Sun, 27 Nov 2011 01:18:57 +0100	[thread overview]
Message-ID: <4ED181F1.40009@hauke-m.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1111252022490.14777-100000@netrider.rowland.org>

Hi Alan,

On 11/26/2011 02:27 AM, Alan Stern wrote:
> On Sat, 26 Nov 2011, Hauke Mehrtens wrote:
> 
>>> Main question would be whether a linux device driver can provide
>>> multiple system functions. I tend to say it can. So I would suggest to
>>> have a single device driver providing OHCI and EHCI functionality.
>>
>> @USB guys, how do I design a driver for a linux device providing ohci
>> and ehci functionality at the same time. The device has two address
>> spaces one for ehci and one for ohci functions.
> 
> How many IRQ lines?
The ehci and ohci controller are sharing one IRQ line.
> 
> And incidentally, in what sense is this _one_ device?  Are you sure 
> it's not _two_ devices in one package?
This is an SoC, so in hardware it is a chip with many functionality. On
the internal bus it is connected as one device, which offers two address
spaces. I do not have access to the detailed hardware specs just some
other driver source code.
> 
>> I thought about registering one controller (ehci or ohci) with
>> usb_create_shared_hcd(). The code then will be in an own module and not
>> in echi_hcd.ko and ochi_hcd.ko like for pci, I hope this works.
>> Is there a better solution to do this, is there an other driver with the
>> same problem already solved?
> 
> I don't know of any other driver that does this.  Your best solution is 
> probably write a driver that registers two child platform devices, and 
> write two corresponding platform drivers, one for the EHCI part and one 
> for the OHCI part.
Thanks for this tip. I did this and it is working nicely. It has an
other advantage, for the ssb bus I was able to use the same platform
drivers as used for the bcma bus.
> 
> Alan Stern
> 

Hauke


      reply	other threads:[~2011-11-27  0:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 21:56 bcma USB Host driver Hauke Mehrtens
2011-11-22 11:50 ` Arend van Spriel
2011-11-25 23:56   ` Hauke Mehrtens
2011-11-26  1:27     ` Alan Stern
2011-11-27  0:18       ` Hauke Mehrtens [this message]

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=4ED181F1.40009@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=arend@broadcom.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=m@bues.ch \
    --cc=stern@rowland.harvard.edu \
    --cc=zajec5@gmail.com \
    /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).