Re: [RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-20 Thread Arnd Bergmann
On Friday 20 May 2016 13:44:14 Mark Brown wrote: > On Fri, May 20, 2016 at 02:24:14PM +0200, Arnd Bergmann wrote: > > On Thursday 19 May 2016 14:08:43 Andy Gross wrote: > > > > I'd rather do something like what we did for the GSBI. It needed to > > > change some phy related bits in the TCSR as

Re: [RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-20 Thread Arnd Bergmann
On Friday 20 May 2016 13:44:14 Mark Brown wrote: > On Fri, May 20, 2016 at 02:24:14PM +0200, Arnd Bergmann wrote: > > On Thursday 19 May 2016 14:08:43 Andy Gross wrote: > > > > I'd rather do something like what we did for the GSBI. It needed to > > > change some phy related bits in the TCSR as

Re: [RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-20 Thread Mark Brown
On Fri, May 20, 2016 at 02:24:14PM +0200, Arnd Bergmann wrote: > On Thursday 19 May 2016 14:08:43 Andy Gross wrote: > > I'd rather do something like what we did for the GSBI. It needed to > > change some phy related bits in the TCSR as well. We defined the TCSR > > as a syscon, with binding

Re: [RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-20 Thread Mark Brown
On Fri, May 20, 2016 at 02:24:14PM +0200, Arnd Bergmann wrote: > On Thursday 19 May 2016 14:08:43 Andy Gross wrote: > > I'd rather do something like what we did for the GSBI. It needed to > > change some phy related bits in the TCSR as well. We defined the TCSR > > as a syscon, with binding

Re: [RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-20 Thread Arnd Bergmann
On Thursday 19 May 2016 14:08:43 Andy Gross wrote: > > + * - Tim > > + */ > > +int qcom_tcsr_phy_sel(u32 val) > > +{ > > + void __iomem *phy_select; > > + int ret; > > + > > + phy_select = ioremap(USB2_PHY_SEL, 4); > > + > > + if (!phy_select) { > > +

Re: [RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-20 Thread Arnd Bergmann
On Thursday 19 May 2016 14:08:43 Andy Gross wrote: > > + * - Tim > > + */ > > +int qcom_tcsr_phy_sel(u32 val) > > +{ > > + void __iomem *phy_select; > > + int ret; > > + > > + phy_select = ioremap(USB2_PHY_SEL, 4); > > + > > + if (!phy_select) { > > +

Re: [RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-19 Thread Andy Gross
On 18 May 2016 at 16:24, Arnd Bergmann wrote: > +/* > + * This abstracts the TCSR register area in Qualcomm SoCs, originally > + * introduced by Tim Bird as part of the phy-msm-usb.ko device driver, > + * and split out by Arnd Bergmann into a separate file. > + * > + * This file

Re: [RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-19 Thread Andy Gross
On 18 May 2016 at 16:24, Arnd Bergmann wrote: > +/* > + * This abstracts the TCSR register area in Qualcomm SoCs, originally > + * introduced by Tim Bird as part of the phy-msm-usb.ko device driver, > + * and split out by Arnd Bergmann into a separate file. > + * > + * This file shouldn't

[RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-18 Thread Arnd Bergmann
The phy-msm-usb driver open-codes access to the Top Control and Status Register area for setting the phy mode, without any serialization or checks if these registers are actually present. This moves the hack to a more prominent location in the hope that it can eventually get cleaned up.

[RFC 4/8] usb: phy: move TCSR driver into new file

2016-05-18 Thread Arnd Bergmann
The phy-msm-usb driver open-codes access to the Top Control and Status Register area for setting the phy mode, without any serialization or checks if these registers are actually present. This moves the hack to a more prominent location in the hope that it can eventually get cleaned up.