From: Tony Lindgren <tony@atomide.com>
To: Bin Liu <b-liu@ti.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
Jacopo Mondi <jacopo@jmondi.org>, Marcel Partap <mpartap@gmx.net>,
Merlijn Wajer <merlijn@wizzup.org>,
Michael Scott <hashcode0f@gmail.com>, NeKit <nekit1000@gmail.com>,
Pavel Machek <pavel@ucw.cz>, Sebastian Reichel <sre@kernel.org>
Subject: [PATCH 4/4] usb: musb: omap2430: Clean up enable and remove devctl tinkering
Date: Fri, 30 Aug 2019 16:20:58 -0700 [thread overview]
Message-ID: <20190830232058.53414-5-tony@atomide.com> (raw)
In-Reply-To: <20190830232058.53414-1-tony@atomide.com>
There should be no need to tinker with devctl in enable in the SoC glue
code. We have musb_start() to take care of handling it already.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/usb/musb/omap2430.c | 20 --------------------
1 file changed, 20 deletions(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -275,33 +275,13 @@ static int omap2430_musb_init(struct musb *musb)
static void omap2430_musb_enable(struct musb *musb)
{
- u8 devctl;
- unsigned long timeout = jiffies + msecs_to_jiffies(1000);
struct device *dev = musb->controller;
struct omap2430_glue *glue = dev_get_drvdata(dev->parent);
- struct musb_hdrc_platform_data *pdata = dev_get_platdata(dev);
- struct omap_musb_board_data *data = pdata->board_data;
-
switch (glue->status) {
case MUSB_ID_GROUND:
omap_control_usb_set_mode(glue->control_otghs, USB_MODE_HOST);
- if (data->interface_type != MUSB_INTERFACE_UTMI)
- break;
- devctl = musb_readb(musb->mregs, MUSB_DEVCTL);
- /* start the session */
- devctl |= MUSB_DEVCTL_SESSION;
- musb_writeb(musb->mregs, MUSB_DEVCTL, devctl);
- while (musb_readb(musb->mregs, MUSB_DEVCTL) &
- MUSB_DEVCTL_BDEVICE) {
- cpu_relax();
-
- if (time_after(jiffies, timeout)) {
- dev_err(dev, "configured as A device timeout");
- break;
- }
- }
break;
case MUSB_VBUS_VALID:
--
2.23.0
next prev parent reply other threads:[~2019-08-30 23:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 23:20 [PATCH 0/4] musb host improvments mostly for omap2430 glue Tony Lindgren
2019-08-30 23:20 ` [PATCH 1/4] usb: musb: omap2430: Wait on enable to avoid babble Tony Lindgren
2019-08-30 23:20 ` [PATCH 2/4] usb: musb: omap2430: Handle multiple ID ground interrupts Tony Lindgren
2019-08-30 23:20 ` [PATCH 3/4] usb: musb: Add musb_set_host and peripheral and use them for omap2430 Tony Lindgren
2019-08-30 23:20 ` Tony Lindgren [this message]
2019-09-01 19:39 ` next-20190830 on Droid 4 was Re: [PATCH 0/4] musb host improvments mostly for omap2430 glue Pavel Machek
2019-09-01 19:49 ` Pavel Machek
2019-09-02 9:23 ` Pavel Machek
2019-09-02 9:44 ` Pavel Machek
2019-09-02 16:06 ` Tony Lindgren
2019-09-03 8:07 ` Pavel Machek
2019-09-16 1:20 ` Tony Lindgren
2019-09-16 1:26 ` Tony Lindgren
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=20190830232058.53414-5-tony@atomide.com \
--to=tony@atomide.com \
--cc=b-liu@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=hashcode0f@gmail.com \
--cc=jacopo@jmondi.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=merlijn@wizzup.org \
--cc=mpartap@gmx.net \
--cc=nekit1000@gmail.com \
--cc=pavel@ucw.cz \
--cc=sre@kernel.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).