lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 22 Oct 2013 11:50:01 +0100
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Arokux X <arokux@...il.com>
Cc:	Kishon Vijay Abraham I <kishon@...com>, peter.chen@...escale.com,
	Felipe Balbi <balbi@...com>,
	Alan Stern <stern@...land.harvard.edu>,
	Greg KH <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: When USB PHY framework should be used?

On Mon, Oct 21, 2013 at 01:19:46PM +0200, Arokux X wrote:
> Dear Kishon,
> 
> thank you for the answer, no problem it was late! Your understanding
> is almost correct.
> 
> > From whatever I could understand, you have a USB HOST controller (each HOST
> > controller has an EHCI controller and a companion OHCI controller?). There are
> > separate clocks for each of EHCI and OHCI controller. EHCI and OHCI has
> > separate PHYs. Both these PHYs are fed by the same common clock. And you have a
> > separate reset bits for each of the PHYs.
> 
> EHCI and OHCI have the same PHY. And this PHY has a reset bit. This is
> exactly what bothers me. Because there should be something central to
> both EHCI and OHCI which manages this reset bit, i.e. the bit should
> be cleared if and only if both EHCI and OHCI controllers are unloaded
> (as modules). I have done a nice picture of the hardware here, please
> take a look at it:
> 
> http://linux-sunxi.org/User:Arokux#USB_Host_Hardware
> 
> I've just realized that there is another commo thing for EHCI and OHCI
> - a GPIO which turns on the power to the USB_VBUS. The power should be
> supplied if at least one of the EHCI or OHCI is loaded. This again
> needs some central management.
> 
> So to summarize, I have two things (reset bit and GPIO for the
> USB_VBUS) which are common to EHCI and OHCI and need to be managed
> outside of the EHCI/OHCI bus glue drivers. My exact question is: where
> this management should be done? Are there good examples in the kernel
> already?

It looks to me like all of these are just different registers of the
same controller. So to me, you should have a single driver for it, that
manages both the reset, regulators and clocks, and loads both the ohci
and ehci layers. bcma-hcd seems to be doing exactly that for example.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ