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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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) {
> > +               ret = -ENOMEM;
> > +               goto out;
> > +       }
> > +       /* Enable second PHY with the OTG port */
> > +       writel(0x1, phy_select);
> > +       ret = 0;
> > +out:
> > +       iounmap(phy_select);
> > +       return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(qcom_tcsr_phy_sel);
> 
> 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 documentation under mfd.  If we add a syscon
> entry and use it if it is present, we can deal with that pretty
> easily.  The offsets change for each soc, and this would also fix that
> issue because we can change offset based on tcsr compat.

Works for me, but be aware that this will break the server chips,
as ACPI has no support for regmap devices.

I think that's fine, they should really handle this register access
in the firmware anyway rather than relying on a hardcoded MMIO
location.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux