Re: [PATCHv7 2.6.34-rc5 4/5] mxc: Add generic USB HWinitialization for MX51

From: Daniel Mack
Date: Thu Apr 22 2010 - 11:02:56 EST


On Thu, Apr 22, 2010 at 04:45:43PM +0200, Sascha Hauer wrote:
> On Wed, Apr 21, 2010 at 10:13:14AM -0500, Dinh.Nguyen@xxxxxxxxxxxxx wrote:
> > @@ -191,6 +191,11 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
> > clk_enable(priv->ahbclk);
> > }
> >
> > + /* setup specific usb hw */
> > + ret = mxc_initialize_usb_hw(pdev->id, pdata->flags);
> > + if (ret < 0)
> > + goto err_init;
> > +
> > /* set USBMODE to host mode */
> > temp = readl(hcd->regs + USBMODE_OFFSET);
> > writel(temp | USBMODE_CM_HOST, hcd->regs + USBMODE_OFFSET);
> > @@ -199,11 +204,6 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev)
> > writel(pdata->portsc, hcd->regs + PORTSC_OFFSET);
> > mdelay(10);
> >
> > - /* setup USBCONTROL. */
> > - ret = mxc_set_usbcontrol(pdev->id, pdata->flags);
> > - if (ret < 0)
> > - goto err_init;
>
> Has somebody tested if this works on other i.MXs? I remember it was quite
> difficult to get the correct order of initialization. I don't want to
> break this.

Yes, I tested it on a MX31LiteKit and it works fine, so I didn't
consider this critical.

> We should at least make a seperate patch from it so that anybody
> bisecting this only finds this change and not the i.MX51 support also
> added in this patch.

Good idea. However, I insisted to have this hunk in this one commit as
it follows a function rename (mxc_initialize_usb_hw vs.
mxc_set_usbcontrol). So if we want to have this seperate, we'd need one
intermediate step.

Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/