* [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda
@ 2013-12-02 13:47 Roger Quadros
2013-12-02 13:47 ` [U-Boot] [PATCH 1/3] usb: ehci-omap: Reset the USB Host OMAP module Roger Quadros
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Roger Quadros @ 2013-12-02 13:47 UTC (permalink / raw)
To: u-boot
Hi,
This series
- Fixes OMAP4 Panda USB device detection issues
- Gets rid of ULPI reset errors on Beagle & Panda
---
cheers,
-roger
Roger Quadros (3):
usb: ehci-omap: Reset the USB Host OMAP module
omap3_beagle: Don't use ulpi_reset
omap4_panda: Don't use ulpi_reset
drivers/usb/host/ehci-omap.c | 57 +++++++++++++++++++++++++++++++-----------
include/configs/omap3_beagle.h | 3 ---
include/configs/omap4_panda.h | 3 ---
3 files changed, 42 insertions(+), 21 deletions(-)
--
1.8.3.2
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/3] usb: ehci-omap: Reset the USB Host OMAP module
2013-12-02 13:47 [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Roger Quadros
@ 2013-12-02 13:47 ` Roger Quadros
2013-12-04 18:03 ` Nikita Kiryanov
2013-12-02 13:47 ` [U-Boot] [PATCH 2/3] omap3_beagle: Don't use ulpi_reset Roger Quadros
` (4 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Roger Quadros @ 2013-12-02 13:47 UTC (permalink / raw)
To: u-boot
In commit bb1f327 we removed the UHH reset to fix NFS root (over usb
ethernet) problems with Beagleboard (3530 ES1.0). However, this
seems to cause USB detection problems for Pandaboard, about (3/8).
On further investigation, it seems that doing the UHH reset is not
the cause of the original Beagleboard problem, but in the way the reset
was done.
This patch adds proper UHH RESET mechanism for OMAP3 and OMAP4/5 based
on the UHH_REVISION register. This should fix the Beagleboard NFS
problem as well as the Pandaboard USB detection problem.
Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
CC: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/usb/host/ehci-omap.c | 57 ++++++++++++++++++++++++++++++++------------
1 file changed, 42 insertions(+), 15 deletions(-)
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 3c58f9e..98cea00 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -28,21 +28,48 @@ static struct omap_ehci *const ehci = (struct omap_ehci *)OMAP_EHCI_BASE;
static int omap_uhh_reset(void)
{
-/*
- * Soft resetting the UHH module causes instability issues on
- * all OMAPs so we just avoid it.
- *
- * See OMAP36xx Errata
- * i571: USB host EHCI may stall when entering smart-standby mode
- * i660: USBHOST Configured In Smart-Idle Can Lead To a Deadlock
- *
- * On OMAP4/5, soft-resetting the UHH module will put it into
- * Smart-Idle mode and lead to a deadlock.
- *
- * On OMAP3, this doesn't seem to be the case but still instabilities
- * are observed on beagle (3530 ES1.0) if soft-reset is used.
- * e.g. NFS root failures with Linux kernel.
- */
+ int timeout = 0;
+ u32 rev;
+
+ rev = readl(&uhh->rev);
+
+ /* Soft RESET */
+ writel(OMAP_UHH_SYSCONFIG_SOFTRESET, &uhh->sysc);
+
+ switch (rev) {
+ case OMAP_USBHS_REV1:
+ /* Wait for soft RESET to complete */
+ while (!(readl(&uhh->syss) & 0x1)) {
+ if (timeout > 100) {
+ printf("%s: RESET timeout\n", __func__);
+ return -1;
+ }
+ udelay(10);
+ timeout++;
+ }
+
+ /* Set No-Idle, No-Standby */
+ writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc);
+ break;
+
+ default: /* Rev. 2 onwards */
+
+ udelay(2); /* Need to wait before accessing SYSCONFIG back */
+
+ /* Wait for soft RESET to complete */
+ while ((readl(&uhh->sysc) & 0x1)) {
+ if (timeout > 100) {
+ printf("%s: RESET timeout\n", __func__);
+ return -1;
+ }
+ udelay(10);
+ timeout++;
+ }
+
+ writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc);
+ break;
+ }
+
return 0;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 2/3] omap3_beagle: Don't use ulpi_reset
2013-12-02 13:47 [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Roger Quadros
2013-12-02 13:47 ` [U-Boot] [PATCH 1/3] usb: ehci-omap: Reset the USB Host OMAP module Roger Quadros
@ 2013-12-02 13:47 ` Roger Quadros
2013-12-02 13:47 ` [U-Boot] [PATCH 3/3] omap4_panda: " Roger Quadros
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Roger Quadros @ 2013-12-02 13:47 UTC (permalink / raw)
To: u-boot
Fixes this error message when USB is started.
"ULPI: ulpi_reset: failed writing reset bit"
It is pointless to manually reset the ULPI as the USB Host
Reset and PHY RESET line should take care of that.
Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
include/configs/omap3_beagle.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
index 9fcd50b..88b67e7 100644
--- a/include/configs/omap3_beagle.h
+++ b/include/configs/omap3_beagle.h
@@ -118,9 +118,6 @@
#define CONFIG_USB_EHCI_OMAP
#define CONFIG_OMAP_EHCI_PHY1_RESET_GPIO 147
-#define CONFIG_USB_ULPI
-#define CONFIG_USB_ULPI_VIEWPORT_OMAP
-
#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3
#define CONFIG_USB_HOST_ETHER
#define CONFIG_USB_ETHER_SMSC95XX
--
1.8.3.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 3/3] omap4_panda: Don't use ulpi_reset
2013-12-02 13:47 [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Roger Quadros
2013-12-02 13:47 ` [U-Boot] [PATCH 1/3] usb: ehci-omap: Reset the USB Host OMAP module Roger Quadros
2013-12-02 13:47 ` [U-Boot] [PATCH 2/3] omap3_beagle: Don't use ulpi_reset Roger Quadros
@ 2013-12-02 13:47 ` Roger Quadros
2013-12-02 15:59 ` [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Marek Vasut
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Roger Quadros @ 2013-12-02 13:47 UTC (permalink / raw)
To: u-boot
Fixes this error message when USB is started.
"ULPI: ulpi_reset: failed writing reset bit"
It is pointless to manually reset the ULPI as the USB Host
Reset and PHY RESET line should take care of that.
Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
include/configs/omap4_panda.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h
index 8294622..89b1c51 100644
--- a/include/configs/omap4_panda.h
+++ b/include/configs/omap4_panda.h
@@ -36,9 +36,6 @@
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP
-#define CONFIG_USB_ULPI
-#define CONFIG_USB_ULPI_VIEWPORT_OMAP
-
#include <configs/omap4_common.h>
#define CONFIG_CMD_NET
--
1.8.3.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda
2013-12-02 13:47 [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Roger Quadros
` (2 preceding siblings ...)
2013-12-02 13:47 ` [U-Boot] [PATCH 3/3] omap4_panda: " Roger Quadros
@ 2013-12-02 15:59 ` Marek Vasut
2013-12-02 16:01 ` Tom Rini
2013-12-02 16:02 ` Marek Vasut
2013-12-04 9:58 ` Tomi Valkeinen
2013-12-04 22:05 ` Tom Rini
5 siblings, 2 replies; 11+ messages in thread
From: Marek Vasut @ 2013-12-02 15:59 UTC (permalink / raw)
To: u-boot
Dear Roger Quadros,
> Hi,
>
> This series
>
> - Fixes OMAP4 Panda USB device detection issues
> - Gets rid of ULPI reset errors on Beagle & Panda
Is this a V2 or what is this? I already see similar series posted a few days
ago.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda
2013-12-02 15:59 ` [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Marek Vasut
@ 2013-12-02 16:01 ` Tom Rini
2013-12-02 16:02 ` Marek Vasut
1 sibling, 0 replies; 11+ messages in thread
From: Tom Rini @ 2013-12-02 16:01 UTC (permalink / raw)
To: u-boot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/02/2013 10:59 AM, Marek Vasut wrote:
> Dear Roger Quadros,
>
>> Hi,
>>
>> This series
>>
>> - Fixes OMAP4 Panda USB device detection issues - Gets rid of
>> ULPI reset errors on Beagle & Panda
>
> Is this a V2 or what is this? I already see similar series posted
> a few days ago.
You missed my email. Roger forgot to CC the mailing list.
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSnK7kAAoJENk4IS6UOR1W66kP/iVLqu0dQGtXpVxAYZRJshxR
2DNhFS1LBkiEvIMZ2+YihCykHmYQSQk8npKmwfwQ2WRJELUFfjXP+/R9U7O17z0W
XEDNo3r0GzfVUpZ2Vp6Ilx4Kcy8XCGFLQs99xlUcSQ8T8yy98Vhn+CApg3j6NPNX
X/59CniUkE8lBYlTCURRxbUc+OWw20OpKWbhA9I7VM6mDmnb9tcnBfvmwLimdsGZ
0wtpfbzNHV0DRZzbrPpSliht4kxRp0qRovBYO0kDdZCLzXgoYQlf5NcvDzEXlRMn
nsWU7/gyzFXus5tDxPbQ3bW8AMY2sHdB1/kSh5PXPxEhB21IXKtifTaSDtDWMdam
7RZLxcFbKmNeu7JpM1Y1sW297l85rF5xUBO5SMgJLenvUGtXidQ76gQrv+zEgfof
UFKEQwzLzabUBEWfihjNQMV+VtP5loR4UM7M3vt+/GPcYzB3lmkGw3/NWOjhUAk1
6CLrw/89Ye2reKZg+BSV3ijXGLdr2CV5kzah/un3rw1hGIGMvzND9KnKlRKypCfO
Yrs0Otq0z3vUIfe0p5ZWF6xMRsIZ1XeTWShFRO+WS73r3Wh+CmNS4IzO3+y9Ctq9
LUBAPNNFHWuHJXRd5o2lm2ov2l6qKX5nq+uQCp9tZby5LqGkEid793qoWH4vhEoc
+EagxiR4YaXjZYZ5dqYs
=HGsN
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda
2013-12-02 15:59 ` [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Marek Vasut
2013-12-02 16:01 ` Tom Rini
@ 2013-12-02 16:02 ` Marek Vasut
1 sibling, 0 replies; 11+ messages in thread
From: Marek Vasut @ 2013-12-02 16:02 UTC (permalink / raw)
To: u-boot
Hi,
> Dear Roger Quadros,
>
> > Hi,
> >
> > This series
> >
> > - Fixes OMAP4 Panda USB device detection issues
> > - Gets rid of ULPI reset errors on Beagle & Panda
>
> Is this a V2 or what is this? I already see similar series posted a few
> days ago.
I see, it was not posted to the ML before.
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda
2013-12-02 13:47 [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Roger Quadros
` (3 preceding siblings ...)
2013-12-02 15:59 ` [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Marek Vasut
@ 2013-12-04 9:58 ` Tomi Valkeinen
2013-12-04 11:17 ` Roger Quadros
2013-12-04 22:05 ` Tom Rini
5 siblings, 1 reply; 11+ messages in thread
From: Tomi Valkeinen @ 2013-12-04 9:58 UTC (permalink / raw)
To: u-boot
On 2013-12-02 15:47, Roger Quadros wrote:
> Hi,
>
> This series
>
> - Fixes OMAP4 Panda USB device detection issues
> - Gets rid of ULPI reset errors on Beagle & Panda
>
> ---
> cheers,
> -roger
>
> Roger Quadros (3):
> usb: ehci-omap: Reset the USB Host OMAP module
> omap3_beagle: Don't use ulpi_reset
> omap4_panda: Don't use ulpi_reset
>
> drivers/usb/host/ehci-omap.c | 57 +++++++++++++++++++++++++++++++-----------
> include/configs/omap3_beagle.h | 3 ---
> include/configs/omap4_panda.h | 3 ---
> 3 files changed, 42 insertions(+), 21 deletions(-)
Tested on OMAP4 Panda and OMAP3 Beagle xM.
Usually seems to work, but on Panda I still sometimes see that the eth
is not found:
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
scanning usb for ethernet devices... 0 Ethernet Device(s) found
No ethernet found.
Tomi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131204/0778783f/attachment.pgp>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda
2013-12-04 9:58 ` Tomi Valkeinen
@ 2013-12-04 11:17 ` Roger Quadros
0 siblings, 0 replies; 11+ messages in thread
From: Roger Quadros @ 2013-12-04 11:17 UTC (permalink / raw)
To: u-boot
Hi,
On 12/04/2013 11:58 AM, Tomi Valkeinen wrote:
> On 2013-12-02 15:47, Roger Quadros wrote:
>> Hi,
>>
>> This series
>>
>> - Fixes OMAP4 Panda USB device detection issues
>> - Gets rid of ULPI reset errors on Beagle & Panda
>>
>> ---
>> cheers,
>> -roger
>>
>> Roger Quadros (3):
>> usb: ehci-omap: Reset the USB Host OMAP module
>> omap3_beagle: Don't use ulpi_reset
>> omap4_panda: Don't use ulpi_reset
>>
>> drivers/usb/host/ehci-omap.c | 57 +++++++++++++++++++++++++++++++-----------
>> include/configs/omap3_beagle.h | 3 ---
>> include/configs/omap4_panda.h | 3 ---
>> 3 files changed, 42 insertions(+), 21 deletions(-)
>
> Tested on OMAP4 Panda and OMAP3 Beagle xM.
>
> Usually seems to work, but on Panda I still sometimes see that the eth
> is not found:
>
> (Re)start USB...
> USB0: USB EHCI 1.00
> scanning bus 0 for devices... 1 USB Device(s) found
> scanning usb for storage devices... 0 Storage Device(s) found
> scanning usb for ethernet devices... 0 Ethernet Device(s) found
> No ethernet found.
Thanks for the tests. I'll need to investigate more, but the patches are good
enough to go as they are.
cheers,
-roger
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 1/3] usb: ehci-omap: Reset the USB Host OMAP module
2013-12-02 13:47 ` [U-Boot] [PATCH 1/3] usb: ehci-omap: Reset the USB Host OMAP module Roger Quadros
@ 2013-12-04 18:03 ` Nikita Kiryanov
0 siblings, 0 replies; 11+ messages in thread
From: Nikita Kiryanov @ 2013-12-04 18:03 UTC (permalink / raw)
To: u-boot
Hi Roger,
This patch fixes a USB issue we had which was caused by the function
ehci_shutdown() in usb_lowlevel_stop(). The issue was that once "usb
stop" was called, usb devices would no longer be detected by the
"usb start" command. With this patch the devices are detected each
time.
One suggestion though (see below):
On 12/02/2013 03:47 PM, Roger Quadros wrote:
> In commit bb1f327 we removed the UHH reset to fix NFS root (over usb
> ethernet) problems with Beagleboard (3530 ES1.0). However, this
> seems to cause USB detection problems for Pandaboard, about (3/8).
>
> On further investigation, it seems that doing the UHH reset is not
> the cause of the original Beagleboard problem, but in the way the reset
> was done.
>
> This patch adds proper UHH RESET mechanism for OMAP3 and OMAP4/5 based
> on the UHH_REVISION register. This should fix the Beagleboard NFS
> problem as well as the Pandaboard USB detection problem.
>
> Reported-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> CC: Stefan Roese <sr@denx.de>
> Reviewed-by: Stefan Roese <sr@denx.de>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
[...]
> +
> + switch (rev) {
> + case OMAP_USBHS_REV1:
> + /* Wait for soft RESET to complete */
> + while (!(readl(&uhh->syss) & 0x1)) {
> + if (timeout > 100) {
> + printf("%s: RESET timeout\n", __func__);
> + return -1;
> + }
> + udelay(10);
> + timeout++;
> + }
> +
> + /* Set No-Idle, No-Standby */
> + writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc);
> + break;
> +
> + default: /* Rev. 2 onwards */
> +
> + udelay(2); /* Need to wait before accessing SYSCONFIG back */
> +
> + /* Wait for soft RESET to complete */
> + while ((readl(&uhh->sysc) & 0x1)) {
> + if (timeout > 100) {
> + printf("%s: RESET timeout\n", __func__);
> + return -1;
> + }
> + udelay(10);
> + timeout++;
> + }
> +
> + writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc);
> + break;
> + }
> +
You have a lot of unnecessart code duplication in this switch statment.
How about:
====
if (rev != OMAP_USBHS_REV1)
udelay(2); /* Need to wait before accessing SYSCONFIG back */
/* Wait for soft RESET to complete */
while (!omap_uhh_reset_done(rev)) {
if (timeout > 100) {
printf("%s: RESET timeout\n", __func__);
return -1;
}
udelay(10);
timeout++;
}
writel(OMAP_UHH_SYSCONFIG_VAL, &uhh->sysc);
====
With omap_uhh_reset_done() doing the appropriate check for the revision.
Also, why can't we do udelay(2) when rev == OMAP_USBHS_REV1?
--
Regards,
Nikita.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda
2013-12-02 13:47 [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Roger Quadros
` (4 preceding siblings ...)
2013-12-04 9:58 ` Tomi Valkeinen
@ 2013-12-04 22:05 ` Tom Rini
5 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2013-12-04 22:05 UTC (permalink / raw)
To: u-boot
On Mon, Dec 02, 2013 at 03:47:42PM +0200, Roger Quadros wrote:
> Hi,
>
> This series
>
> - Fixes OMAP4 Panda USB device detection issues
> - Gets rid of ULPI reset errors on Beagle & Panda
>
> ---
> cheers,
> -roger
>
> Roger Quadros (3):
> usb: ehci-omap: Reset the USB Host OMAP module
> omap3_beagle: Don't use ulpi_reset
> omap4_panda: Don't use ulpi_reset
>
> drivers/usb/host/ehci-omap.c | 57 +++++++++++++++++++++++++++++++-----------
> include/configs/omap3_beagle.h | 3 ---
> include/configs/omap4_panda.h | 3 ---
> 3 files changed, 42 insertions(+), 21 deletions(-)
Applied to u-boot-ti/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131204/4f30aec7/attachment.pgp>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-12-04 22:05 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-02 13:47 [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Roger Quadros
2013-12-02 13:47 ` [U-Boot] [PATCH 1/3] usb: ehci-omap: Reset the USB Host OMAP module Roger Quadros
2013-12-04 18:03 ` Nikita Kiryanov
2013-12-02 13:47 ` [U-Boot] [PATCH 2/3] omap3_beagle: Don't use ulpi_reset Roger Quadros
2013-12-02 13:47 ` [U-Boot] [PATCH 3/3] omap4_panda: " Roger Quadros
2013-12-02 15:59 ` [U-Boot] [PATCH 0/3] OMAP USB host fixes for Beagle & Panda Marek Vasut
2013-12-02 16:01 ` Tom Rini
2013-12-02 16:02 ` Marek Vasut
2013-12-04 9:58 ` Tomi Valkeinen
2013-12-04 11:17 ` Roger Quadros
2013-12-04 22:05 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox