linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Li Yang <leoli@freescale.com>,
	Pavankumar Kondeti <pkondeti@codeaurora.org>,
	Felipe Balbi <balbi@ti.com>, Greg KH <gregkh@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peter Chen <peter.chen@freescale.com>,
	Lin Tony-B19295 <B19295@freescale.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: Re: [PATCHv4 00/19] First round in OTG rework
Date: Tue, 20 Sep 2011 12:01:50 +0200	[thread overview]
Message-ID: <20110920100150.GW31404@pengutronix.de> (raw)
In-Reply-To: <20110920065038.GA28684@xps8300>

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 |

      reply	other threads:[~2011-09-20 10:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07  7:15 [PATCHv4 00/19] First round in OTG rework Heikki Krogerus
2011-09-07  7:15 ` [PATCHv4 01/19] usb: otg: Rename otg_transceiver to usb_phy Heikki Krogerus
2011-09-07  7:15 ` [PATCHv4 02/19] usb: otg: Rename usb_otg and usb_xceiv " Heikki Krogerus
2011-09-07  7:15 ` [PATCHv4 03/19] usb: otg: Separate otg members from usb_phy Heikki Krogerus
2011-09-07  7:15 ` [PATCHv4 04/19] usb: otg: ab8500: Start using struct usb_otg Heikki Krogerus
2011-09-07 14:58   ` Mian Yousaf Kaukab
2011-09-07  7:15 ` [PATCHv4 05/19] usb: otg: fsl: " Heikki Krogerus
2011-09-07  7:15 ` [PATCHv4 06/19] usb: otg: gpio_vbus: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 07/19] usb: otg: isp1301_omap: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 08/19] usb: otg: msm: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 09/19] usb: otg: langwell: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 10/19] usb: otg: nop: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 11/19] usb: otg: twl4030: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 12/19] usb: otg: twl6030: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 13/19] usb: otg: ulpi: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 14/19] arm: imx: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 15/19] usb: musb: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 16/19] power_supply: Convert all users to new usb_phy Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 17/19] usb: " Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 18/19] usb: otg: Remove OTG specific members from usb_phy Heikki Krogerus
2011-09-07  7:16 ` [PATCHv4 19/19] usb: otg: Convert all users to pass struct usb_otg for OTG functions Heikki Krogerus
2011-09-12 12:12 ` [PATCHv4 00/19] First round in OTG rework Heikki Krogerus
2011-09-12 12:45   ` ABRAHAM, KISHON VIJAY
2011-09-13  7:56   ` Igor Grinberg
2011-09-19 11:55   ` Sascha Hauer
2011-09-20  6:50     ` Heikki Krogerus
2011-09-20 10:01       ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110920100150.GW31404@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=B19295@freescale.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=balbi@ti.com \
    --cc=gregkh@suse.de \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=leoli@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@freescale.com \
    --cc=pkondeti@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).