public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: kishon <kishon@ti.com>
Cc: <gregkh@linuxfoundation.org>, <stern@rowland.harvard.edu>,
	<balbi@ti.com>, <b-cousson@ti.com>, <mark.rutland@arm.com>,
	<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
	<linux-omap@vger.kernel.org>,
	<devicetree-discuss@lists.ozlabs.org>
Subject: Re: [PATCH 12/12] USB: ehci-omap: Fix detection in HSIC mode
Date: Tue, 12 Mar 2013 12:53:58 +0200	[thread overview]
Message-ID: <513F0946.7020507@ti.com> (raw)
In-Reply-To: <513F089B.5080004@ti.com>

On 03/12/2013 12:51 PM, kishon wrote:
> Hi,
> 
> On Tuesday 12 March 2013 04:14 PM, Roger Quadros wrote:
>> The HSIC devices need to be kept in reset while the EHCI controller
>> is being initialized and only brought out of reset after the
>> initialization is complete, else HSIC devices will not be detected.
>>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> CC: Alan Stern <stern@rowland.harvard.edu>
>> ---
>>   drivers/usb/host/ehci-omap.c |   28 +++++++++++-----------------
>>   1 files changed, 11 insertions(+), 17 deletions(-)
>>
>> diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
>> index 1ba1df8..52a2d46 100644
>> --- a/drivers/usb/host/ehci-omap.c
>> +++ b/drivers/usb/host/ehci-omap.c
>> @@ -50,6 +50,7 @@
>>   #include <linux/usb/hcd.h>
>>   #include <linux/of.h>
>>   #include <linux/dma-mapping.h>
>> +#include <linux/delay.h>
> 
> not needed here I guess.

Right. will remove.

>>
>>   #include "ehci.h"
>>
>> @@ -90,26 +91,13 @@ static inline u32 ehci_read(void __iomem *base, u32 reg)
>>   static int omap_ehci_init(struct usb_hcd *hcd)
>>   {
>>       struct ehci_hcd    *ehci = hcd_to_ehci(hcd);
>> -    struct omap_hcd    *omap = (struct omap_hcd *)ehci->priv;
>> -    int rc, i;
>> -
>> -    /* Hold PHYs in reset while initializing EHCI controller */
>> -    for (i = 0; i < omap->nports; i++) {
>> -        if (omap->phy[i])
>> -            usb_phy_shutdown(omap->phy[i]);
>> -    }
>> +    int rc;
>>
>>       /* we know this is the memory we want, no need to ioremap again */
>>       ehci->caps = hcd->regs;
>>
>>       rc = ehci_setup(hcd);
>>
>> -    /* Bring PHYs out of reset */
>> -    for (i = 0; i < omap->nports; i++) {
>> -        if (omap->phy[i])
>> -            usb_phy_init(omap->phy[i]);
>> -    }
>> -
>>       return rc;
>>   }
>>
>> @@ -219,9 +207,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
>>           }
>>
>>           omap->phy[i] = phy;
>> -        usb_phy_init(omap->phy[i]);
>> -        /* bring PHY out of suspend */
>> -        usb_phy_set_suspend(omap->phy[i], 0);
>>       }
>>
>>       pm_runtime_enable(dev);
>> @@ -245,6 +230,15 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
>>           goto err_pm_runtime;
>>       }
>>
>> +    /* Bring PHYs out of reset */
>> +    for (i = 0; i < omap->nports; i++) {
>> +        if (!omap->phy[i])
>> +            continue;
>> +
>> +        usb_phy_init(omap->phy[i]);
>> +        /* bring PHY out of suspend */
>> +        usb_phy_set_suspend(omap->phy[i], 0);
>> +    }
> 
> But isn't HSIC supposed to be PHYless devices. Maybe a comment explaining it might be helpful.
> 

Yes HSIC is PHYless but they do have reset line between the chips.
I'll put a comment.

cheers,
-roger

  reply	other threads:[~2013-03-12 10:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12 10:44 [PATCH 00/12] USB: ehci-omap: Device tree support for 3.10 Roger Quadros
2013-03-12 10:44 ` [PATCH 01/12] USB: EHCI: split ehci-omap out to a separate driver Roger Quadros
2013-03-12 10:44 ` [PATCH 02/12] USB: ehci-omap: Use devm_ioremap_resource() Roger Quadros
2013-03-12 10:44 ` [PATCH 03/12] USB: ehci-omap: Use PHY APIs to get the PHY device and put it out of suspend Roger Quadros
2013-03-12 10:44 ` [PATCH 04/12] USB: ehci-omap: Remove PHY reset handling code Roger Quadros
2013-03-12 10:44 ` [PATCH 05/12] USB: ehci-omap: Remove PHY regulator " Roger Quadros
2013-03-12 10:44 ` [PATCH 06/12] USB: ehci-omap: Select NOP USB transceiver driver Roger Quadros
2013-03-12 10:44 ` [PATCH 07/12] USB: ehci-omap: Get platform resources by index rather than by name Roger Quadros
2013-03-12 10:44 ` [PATCH 08/12] USB: ohci-omap3: " Roger Quadros
2013-03-12 10:44 ` [PATCH 09/12] USB: ohci-omap3: Add device tree support and binding information Roger Quadros
2013-03-12 10:44 ` [PATCH 10/12] USB: ehci-omap: " Roger Quadros
2013-03-12 10:44 ` [PATCH 11/12] USB: ehci-omap: Try to get PHY even if not in PHY mode Roger Quadros
2013-03-12 15:57   ` Alan Stern
2013-03-14 14:08     ` Felipe Balbi
2013-03-14 15:08       ` Alan Stern
2013-03-12 10:44 ` [PATCH 12/12] USB: ehci-omap: Fix detection in HSIC mode Roger Quadros
2013-03-12 10:51   ` kishon
2013-03-12 10:53     ` Roger Quadros [this message]
2013-03-12 11:09   ` [PATCH v2 " Roger Quadros
2013-03-12 16:07     ` Alan Stern
2013-03-13 11:48       ` Roger Quadros
2013-03-13 13:14     ` [PATCH v3 12/13] " Roger Quadros
2013-03-13 14:30       ` Alan Stern
2013-03-13 13:16 ` [PATCH 13/13] USB: ehci-omap: Get rid of omap_ehci_init() Roger Quadros
2013-03-13 14:32   ` Alan Stern

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=513F0946.7020507@ti.com \
    --to=rogerq@ti.com \
    --cc=b-cousson@ti.com \
    --cc=balbi@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=stern@rowland.harvard.edu \
    /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