[PATCHv7 2.6.34-rc5 4/5] mxc: Add generic USB HW initialization for MX51
Daniel Mack
daniel at caiaq.de
Thu Apr 22 11:02:44 EDT 2010
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 at freescale.com 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
More information about the linux-arm-kernel
mailing list