From: daniel@caiaq.de (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv7 2.6.34-rc5 4/5] mxc: Add generic USB HW initialization for MX51
Date: Thu, 22 Apr 2010 17:02:44 +0200 [thread overview]
Message-ID: <20100422150244.GX30801@buzzloop.caiaq.de> (raw)
In-Reply-To: <20100422144543.GU7882@pengutronix.de>
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
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Mack <daniel@caiaq.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Dinh.Nguyen@freescale.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk,
valentin.longchamp@epfl.ch, grant.likely@secretlab.ca,
bryan.wu@canonical.com, amit.kucheria@canonical.com,
Jun.Li@freescale.com, xiao-lizhang@freescale.com
Subject: Re: [PATCHv7 2.6.34-rc5 4/5] mxc: Add generic USB HW initialization for MX51
Date: Thu, 22 Apr 2010 17:02:44 +0200 [thread overview]
Message-ID: <20100422150244.GX30801@buzzloop.caiaq.de> (raw)
In-Reply-To: <20100422144543.GU7882@pengutronix.de>
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@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
next prev parent reply other threads:[~2010-04-22 15:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 15:13 [PATCHv7 2.6.34-rc5 1/5] mxc: Update GPIO for USB support on Freescale MX51 Babbage HW Dinh.Nguyen at freescale.com
2010-04-21 15:13 ` Dinh.Nguyen
2010-04-21 15:13 ` [PATCHv7 2.6.34-rc5 2/5] mx5: Add USB device definitions for " Dinh.Nguyen at freescale.com
2010-04-21 15:13 ` Dinh.Nguyen
2010-04-21 15:13 ` [PATCHv7 2.6.34-rc5 3/5] mx5: Enable board specific functions for enabling USB host on Babbage Dinh.Nguyen at freescale.com
2010-04-21 15:13 ` Dinh.Nguyen
2010-04-21 15:13 ` [PATCHv7 2.6.34-rc5 4/5] mxc: Add generic USB HW initialization for MX51 Dinh.Nguyen at freescale.com
2010-04-21 15:13 ` Dinh.Nguyen
2010-04-21 15:13 ` [PATCHv7 2.6.34-rc5 5/5] mx5: Add USB to Freescale MX51 defconfig Dinh.Nguyen at freescale.com
2010-04-21 15:13 ` Dinh.Nguyen
2010-04-22 14:45 ` [PATCHv7 2.6.34-rc5 4/5] mxc: Add generic USB HW initialization for MX51 Sascha Hauer
2010-04-22 14:45 ` Sascha Hauer
2010-04-22 15:02 ` Daniel Mack [this message]
2010-04-22 15:02 ` Daniel Mack
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=20100422150244.GX30801@buzzloop.caiaq.de \
--to=daniel@caiaq.de \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.