public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/1] tegra: usb: Fix device enumeration problem of USB1
Date: Thu, 21 Jun 2012 18:57:56 +0200	[thread overview]
Message-ID: <201206211857.56921.marek.vasut@gmail.com> (raw)
In-Reply-To: <4B9C9637D5087840A465BDCB251780E9E2D6EDA3E7@HKMAIL02.nvidia.com>

Dear Jim Lin,

> >From: Marek Vasut [mailto:marek.vasut at gmail.com]
> >Sent: Thursday, June 21, 2012 6:16 PM
> >
> >> --- a/drivers/usb/host/ehci-tegra.c
> >> +++ b/drivers/usb/host/ehci-tegra.c
> >> @@ -1,5 +1,5 @@
> >> 
> >>  /*
> >> 
> >> - * Copyright (c) 2009 NVIDIA Corporation
> >> + * Copyright (c) 2009-2012 NVIDIA Corporation
> >> 
> >>   *
> >>   * See file CREDITS for list of people who contributed to this
> >>   * project.
> >> 
> >> @@ -29,6 +29,22 @@
> >> 
> >>  #include <asm/errno.h>
> >>  #include <asm/arch/usb.h>
> >> 
> >> +/*
> >> + * A known hardware issue where Connect Status Change bit of PORTSC
> >> register + * of USB1 controller will be set after Port Reset.
> >> + * We have to clear it in order for later device enumeration to
> >> proceed. + * This ehci_powerup_fixup overrides the weak function
> >> ehci_powerup_fixup + * in "ehci-hcd.c".
> >> + */
> >> +void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
> >
> >So it was even enough to use the already preinstalled callback? :-)
> 
> Yes.
> 
> >> +{
> >> +	mdelay(50);
> >> +	if (((u32) status_reg & 0xFFFFC000) != TEGRA_USB1_BASE)
> >
> >What's this magic number here?
> 
> Address Mask value, any suggestion?

I wonder ... either comment or #define it somewhere, the later is favorable.

> 
> >> +		return;
> > 
> > +	/* For EHCI_PS_CSC to be cleared in ehci_hcd.c */
> > 
> >> +	if (ehci_readl(status_reg) & EHCI_PS_CSC)
> >> +		*reg |= EHCI_PS_CSC;
> >
> >writel()
> 
> The real IO write (ehci_writel) is done in ehci-hcd.c after calling of
> ehci_powerup_fixup. Any suggestion?

Good, leave it at that.

> ---------------------------------------------------------------------------
> -------- This email message is for the sole use of the intended
> recipient(s) and may contain confidential information.  Any unauthorized
> review, use, disclosure or distribution is prohibited.  If you are not the
> intended recipient, please contact the sender by reply email and destroy
> all copies of the original message.
> ---------------------------------------------------------------------------
> --------

^^ The above is nvidia bullshit, please remove it, it doesn't make sense here.

Best regards,
Marek Vasut

      reply	other threads:[~2012-06-21 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21  3:24 [U-Boot] [PATCH v4 1/1] tegra: usb: Fix device enumeration problem of USB1 Jim Lin
2012-06-21  5:41 ` Stephen Warren
2012-06-21 10:16 ` Marek Vasut
2012-06-21 10:42   ` Jim Lin
2012-06-21 16:57     ` Marek Vasut [this message]

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=201206211857.56921.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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