public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [[PATCH v2 5/6] USB: ehci: Add a weak function for resetting devices
Date: Wed, 10 Jul 2013 18:16:01 -0500	[thread overview]
Message-ID: <51DDEB31.40806@ti.com> (raw)
In-Reply-To: <201307110020.06325.marex@denx.de>

On 07/10/2013 05:20 PM, Marek Vasut wrote:
> Dear Dan Murphy,
>
>> Add a __weak function that can be overridden to reset devices
>> attached to an ehci devices after the FEAT_POWER has been submitted
>>
>> Signed-off-by: Dan Murphy <dmurphy@ti.com>
>> ---
>>  drivers/usb/host/ehci-hcd.c |    7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
>> index 706cf0c..fdd3994 100644
>> --- a/drivers/usb/host/ehci-hcd.c
>> +++ b/drivers/usb/host/ehci-hcd.c
>> @@ -616,6 +616,11 @@ __weak uint32_t *ehci_get_portsc_register(struct
>> ehci_hcor *hcor, int port) return (uint32_t *)&hcor->or_portsc[port];
>>  }
>>
>> +__weak void ehci_reset_attached_devices(int port)
>> +{
>> +	return;
>> +}
>> +
> Can the reset not happen elsewhere?
I have tried to move this around and keep this out of this file completely but nothing else seems to work.

For port 2 where the USB3530 is we don't have the issue the 3530 enumerates properly.

I did not see any information in the data sheet eluding to a timing issue.
>
>>  int
>>  ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
>>  		 int length, struct devrequest *req)
>> @@ -777,6 +782,7 @@ ehci_submit_root(struct usb_device *dev, unsigned long
>> pipe, void *buffer, reg |= EHCI_PS_PP;
>>  				ehci_writel(status_reg, reg);
>>  			}
>> +			ehci_reset_attached_devices(port);
>>  			break;
>>  		case USB_PORT_FEAT_RESET:
>>  			if ((reg & (EHCI_PS_PE | EHCI_PS_CS)) == EHCI_PS_CS &&
>> @@ -794,6 +800,7 @@ ehci_submit_root(struct usb_device *dev, unsigned long
>> pipe, void *buffer, reg |= EHCI_PS_PR;
>>  				reg &= ~EHCI_PS_PE;
>>  				ehci_writel(status_reg, reg);
>> +
> NAK
DOH!
>
>>  				/*
>>  				 * caller must wait, then call GetPortStatus
>>  				 * usb 2.0 specification say 50 ms resets on
> Best regards,
> Marek Vasut


-- 
------------------
Dan Murphy

  reply	other threads:[~2013-07-10 23:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 20:05 [U-Boot] OMAP5 USB EHCI Dan Murphy
2013-07-10 20:05 ` [U-Boot] [[PATCH v2 1/6] omap5: uevm: Change the board name to correct name Dan Murphy
2013-07-10 23:48   ` Nishanth Menon
2013-07-10 20:05 ` [U-Boot] [[PATCH v2 2/6] ARM: OMAP5: Power: Add USB LDO9 enable interface Dan Murphy
2013-07-11  7:56   ` Roger Quadros
2013-07-11 13:44     ` Dan Murphy
2013-07-10 20:05 ` [U-Boot] [[PATCH v2 3/6] ARM: OMAP5: USB: Add OMAP5 common USB EHCI information Dan Murphy
2013-07-11  3:51   ` Lokesh Vutla
2013-07-11  7:58     ` Roger Quadros
2013-07-11  8:35       ` Sricharan R
2013-07-11  8:55         ` Roger Quadros
2013-07-11  9:31           ` Sricharan R
2013-07-11 13:48             ` Dan Murphy
2013-07-11 14:37           ` Tom Rini
2013-07-10 20:05 ` [U-Boot] [[PATCH v2 4/6] ARM: OMAP: USB: Fix linker error when ULPI is not defined Dan Murphy
2013-07-10 20:05 ` [U-Boot] [[PATCH v2 5/6] USB: ehci: Add a weak function for resetting devices Dan Murphy
2013-07-10 22:20   ` Marek Vasut
2013-07-10 23:16     ` Dan Murphy [this message]
2013-07-11  8:11       ` Roger Quadros
2013-07-11 12:35         ` Marek Vasut
2013-07-11 14:23           ` Roger Quadros
2013-07-11 15:29             ` Dan Murphy
2013-07-15  3:19               ` Marek Vasut
2013-07-16 20:19                 ` Dan Murphy
2013-07-11 16:06             ` Marek Vasut
2013-07-10 20:05 ` [U-Boot] [[PATCH v2 6/6] ARM: OMAP5-uevm: Add USB ehci support for the uEVM Dan Murphy
2013-07-11 14:46   ` Tom Rini

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=51DDEB31.40806@ti.com \
    --to=dmurphy@ti.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