lkml.org 
[lkml]   [2011]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv4 00/19] First round in OTG rework
On Tue, Sep 20, 2011 at 09:50:38AM +0300, Heikki Krogerus wrote:
> Hi,
>
> On Mon, Sep 19, 2011 at 01:55:20PM +0200, Sascha Hauer wrote:
> > The following is needed to make i.MX compile and work. You renamed
> > pdata->otg to pdata->xceiv in the driver, but not in the header file.
> > Renaming it would also mean to rename it in the boards using this
> > header, that's why I kept the name 'otg' for now instead of renaming
> > it to 'xceiv' (or 'phy' which I like better).
>
> Thanks for the review. Is it OK to make this part of the imx patch?

Sure.

Sascha

>
>
> > diff --git a/arch/arm/mach-imx/mx31moboard-devboard.c b/arch/arm/mach-imx/mx31moboard-devboard.c
> > index cb792d0..f11d0ef 100644
> > --- a/arch/arm/mach-imx/mx31moboard-devboard.c
> > +++ b/arch/arm/mach-imx/mx31moboard-devboard.c
> > @@ -177,7 +177,7 @@ static int devboard_isp1105_init(struct usb_phy *otg)
> > }
> >
> >
> > -static int devboard_isp1105_set_vbus(struct usb_phy *otg, bool on)
> > +static int devboard_isp1105_set_vbus(struct usb_otg *otg, bool on)
> > {
> > if (on)
> > gpio_set_value(USBH1_VBUSEN_B, 0);
> > diff --git a/arch/arm/mach-imx/mx31moboard-marxbot.c b/arch/arm/mach-imx/mx31moboard-marxbot.c
> > index f921e47..0eb1d12 100644
> > --- a/arch/arm/mach-imx/mx31moboard-marxbot.c
> > +++ b/arch/arm/mach-imx/mx31moboard-marxbot.c
> > @@ -291,7 +291,7 @@ static int marxbot_isp1105_init(struct usb_phy *otg)
> > }
> >
> >
> > -static int marxbot_isp1105_set_vbus(struct usb_phy *otg, bool on)
> > +static int marxbot_isp1105_set_vbus(struct usb_otg *otg, bool on)
> > {
> > if (on)
> > gpio_set_value(USBH1_VBUSEN_B, 0);
> > diff --git a/arch/arm/plat-mxc/include/mach/mxc_ehci.h b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
> > index 2c159dc..9ffd1bb 100644
> > --- a/arch/arm/plat-mxc/include/mach/mxc_ehci.h
> > +++ b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
> > @@ -44,7 +44,7 @@ struct mxc_usbh_platform_data {
> > int (*exit)(struct platform_device *pdev);
> >
> > unsigned int portsc;
> > - struct otg_transceiver *otg;
> > + struct usb_phy *otg;
> > };
> >
> > int mx51_initialize_usb_hw(int port, unsigned int flags);
> > diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
> > index 6e32147..cf8f192 100644
> > --- a/drivers/usb/host/ehci-mxc.c
> > +++ b/drivers/usb/host/ehci-mxc.c
> > @@ -218,15 +218,15 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
> > msleep(10);
> >
> > /* Initialize the transceiver */
> > - if (pdata->xceiv) {
> > - pdata->xceiv->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET;
> > - ret = usb_phy_init(pdata->xceiv);
> > + if (pdata->otg) {
> > + pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET;
> > + ret = usb_phy_init(pdata->otg);
> > if (ret) {
> > dev_err(dev, "unable to init transceiver, probably missing\n");
> > ret = -ENODEV;
> > goto err_add;
> > }
> > - ret = otg_set_vbus(pdata->xceiv->otg, 1);
> > + ret = otg_set_vbus(pdata->otg->otg, 1);
> > if (ret) {
> > dev_err(dev, "unable to enable vbus on transceiver\n");
> > goto err_add;
> > @@ -240,17 +240,17 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
> > if (ret)
> > goto err_add;
> >
> > - if (pdata->xceiv) {
> > + if (pdata->otg) {
> > /*
> > * efikamx and efikasb have some hardware bug which is
> > * preventing usb to work unless CHRGVBUS is set.
> > * It's in violation of USB specs
> > */
> > if (machine_is_mx51_efikamx() || machine_is_mx51_efikasb()) {
> > - flags = usb_phy_io_read(pdata->xceiv,
> > + flags = usb_phy_io_read(pdata->otg,
> > ULPI_OTG_CTRL);
> > flags |= ULPI_OTG_CTRL_CHRGVBUS;
> > - ret = usb_phy_io_write(pdata->xceiv, flags,
> > + ret = usb_phy_io_write(pdata->otg, flags,
> > ULPI_OTG_CTRL);
> > if (ret) {
> > dev_err(dev, "unable to set CHRVBUS\n");
> > @@ -298,8 +298,8 @@ static int __exit ehci_mxc_drv_remove(struct platform_device *pdev)
> > if (pdata && pdata->exit)
> > pdata->exit(pdev);
> >
> > - if (pdata->xceiv)
> > - usb_phy_shutdown(pdata->xceiv);
> > + if (pdata->otg)
> > + usb_phy_shutdown(pdata->otg);
> >
> > usb_remove_hcd(hcd);
> > iounmap(hcd->regs);
>
> --
> heikki
>

--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |


\
 
 \ /
  Last update: 2011-09-20 12:05    [W:0.037 / U:4.948 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site