All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <me@felipebalbi.com>
To: Gary Thomas <gary@mlbassoc.com>
Cc: me@felipebalbi.com, Linux OMAP Mailing List <linux-omap@vger.kernel.org>
Subject: Re: OMAP3530 USB host problems
Date: Fri, 20 Feb 2009 21:23:30 +0200	[thread overview]
Message-ID: <20090220192330.GN32564@gandalf> (raw)
In-Reply-To: <499EFF0D.6060602@mlbassoc.com>

On Fri, Feb 20, 2009 at 12:05:49PM -0700, Gary Thomas wrote:
> Felipe Balbi wrote:
> > On Fri, Feb 20, 2009 at 11:50:44AM -0700, Gary Thomas wrote:
> >> Felipe Balbi wrote:
> >>> On Fri, Feb 20, 2009 at 11:15:36AM -0700, Gary Thomas wrote:
> >>>> I have a 3530 board (similar to the OMAP3EVM) and I'm trying
> >>>> to get the USB host working.  Sadly, this is failing, but I
> >>>> don't quite see why.  From drivers/usb/host/echi-omap.c:
> >>>> 	/* Wait for TLL to be Active */
> >>>>         timeout = 1000;
> >>>> 	while ((cm_read_mod_reg(CORE_MOD, OMAP2430_CM_IDLEST3)
> >>>> 			& (1 << OMAP3430ES2_ST_USBTLL_SHIFT)))
> >>>>         {
> >>>>             if (--timeout <= 0) {
> >>>>                 printk(KERN_ERR "USB TLL is unavailable\n");
> >>>>                 return -ENODEV;
> >>>>             }
> >>>> 		cpu_relax();
> >>>>         }
> >>>>
> >>>> Any clues on why this might be?  How do I solve it?
> >>> could you enable CONFIG_DEBUG_LL and post the seria console output ?
> >>>
> >>> do you really use TLL ?? I don't really know omap3evm, but I guess it
> >>> uses PHY mode (correct me if I'm wrong).
> >>>
> >> It's not that I _need_ TLL, the driver function omap_start_ehci()
> >> tries to reset the part of the USB controller and fails.  I'm just
> >> trying to understand why this part of the code falls over.
> > 
> > you have OMAP_EHCI_TLL_MODE set, you should probably use
> > OMAP_EHCI_PHY_MODE instead.
> > 
> > You can fix it via "make menuconfig"
> > 
> 
> I already have that; this code is still being used.
>   # CONFIG_OMAP_EHCI_TLL_MODE is not set
>   CONFIG_OMAP_EHCI_PHY_MODE=y
> 
> This is not used in the function above at all.

hmm.. true, just checked the function.

Weird, TRM says when that bit is 1, we cannot access ST_USBTLL, we
should access it when it's 0, try the following:

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 1b3266c..122e95b 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -250,7 +250,7 @@ static int omap_start_ehc(struct platform_device *dev, struct usb_hcd *hcd)
 
        /* Wait for TLL to be Active */
        while ((cm_read_mod_reg(CORE_MOD, OMAP2430_CM_IDLEST3)
-                       & (1 << OMAP3430ES2_ST_USBTLL_SHIFT)))
+                       & (0 << OMAP3430ES2_ST_USBTLL_SHIFT)))
                cpu_relax();
 
        /* perform TLL soft reset, and wait until reset is complete */

and tell us if it worked

-- 
balbi

  reply	other threads:[~2009-02-20 19:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 18:15 OMAP3530 USB host problems Gary Thomas
2009-02-20 18:29 ` Felipe Balbi
2009-02-20 18:50   ` Gary Thomas
2009-02-20 18:54     ` Felipe Balbi
2009-02-20 19:05       ` Gary Thomas
2009-02-20 19:23         ` Felipe Balbi [this message]
2009-02-20 19:35           ` Gary Thomas
2009-02-20 19:41             ` Felipe Balbi
2009-02-23 10:21               ` Felipe Balbi
2009-02-23 13:08                 ` Gary Thomas
2009-02-23 13:27                   ` Felipe Balbi
2009-02-23 17:21                     ` Gary Thomas
2009-02-23 18:00                       ` Felipe Balbi

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=20090220192330.GN32564@gandalf \
    --to=me@felipebalbi.com \
    --cc=gary@mlbassoc.com \
    --cc=linux-omap@vger.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 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.