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] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 1 Feb 2013 11:43:27 +0200
From:	Felipe Balbi <balbi@...com>
To:	Vivek Gautam <gautamvivek1987@...il.com>
CC:	<balbi@...com>, kishon <kishon@...com>,
	Vivek Gautam <gautam.vivek@...sung.com>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<linux-omap@...r.kernel.org>, <linux-samsung-soc@...r.kernel.org>,
	<gregkh@...uxfoundation.org>,
	Grant Likely <grant.likely@...retlab.ca>,
	Rob Herring <rob.herring@...xeda.com>,
	<devicetree-discuss@...ts.ozlabs.org>
Subject: Re: [PATCH RFC] usb: dwc3: Get PHY from platform specific dwc3 dt
 node.

Hi,

On Fri, Feb 01, 2013 at 02:23:28PM +0530, Vivek Gautam wrote:
> >> >>>>> On Thu, Jan 31, 2013 at 08:53:27PM +0530, Vivek Gautam wrote:
> >> >>>>>>>>
> >> >>>>>>>> Moreover, SoCs having multiple dwc3 controllers will have multiple
> >> >>>>>>>> PHYs, which eventually be added using usb_add_phy_dev(), and not
> >> >>>>>>>> using usb_add_phy(). So each dwc3 controller won't be able to
> >> >>>>>>>> get PHYs by simply calling devm_usb_get_phy() also.
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>> No. We have added usb_get_phy_dev() for that purpose in the case of
> >> >>>>>>> non-dt.
> >> >>>>>>> I think, instead you can have a patch to use devm_usb_get_phy_dev()
> >> >>>>>>> here and
> >> >>>>>>> in exynos platform specific code use usb_bind_phy() to bind the phy
> >> >>>>>>> and
> >> >>>>>>> controller till you change it to dt.
> >> >>>>>>>
> >> >>>>>>
> >> >>>>>> We have dt support for dwc3-exynos, in such case we should go ahead
> >> >>>>>> with
> >> >>>>>> of_platform_populate(), right ?
> >> >>>>>> But if when i use of_platform_populate() i will not be able to set
> >> >>>>>> dma_mask to dwc3->dev. :-(
> >> >>
> >> >>
> >> >> You can do something like this
> >> >>
> >> >> static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);
> >> >>
> >> >> static int dwc3_exynos_set_dmamask(struct device *dev, void *c)
> >> >> {
> >> >>         dev->dma_mask = &dwc3_exynos_dma_mask;
> >> >>
> >> >>         return 0;
> >> >> }
> >> >>
> >> >> And in your probe after of_platform_populate, you can add
> >> >>
> >> >> device_for_each_child(&pdev->dev, NULL, dwc3_exynos_set_dmamask);
> >> >>
> >> >> Here pdev is the platform device of dwc3-exynos. By this way all the
> >> >> children of dwc3-exynos will have dma_mask set to the required value.
> >> >>
> >> >
> >> > Nice idea, thanks :-)
> >> > hmm.. so i can patch this now, and get things working ;-)
> >> >
> >>
> >> If this is fine with you shall i go ahead and post a patch for the same ? ;-)
> >
> > should be fine, but we can wait a bit to see if DeviceTree folks reply,
> > your patch will only go on v3.10 anyway.
> >
> 
> Yeah, sure. No problem at all.
> For the time being i will continue to use this change for my other
> development work too. :-)

Sure, makes sense ;-)

-- 
balbi

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