[U-Boot] [PATCH 3/3] HACK: ehci-omap: do gpio toggle after port power is set

Dan Murphy dmurphy at ti.com
Mon Jul 8 22:59:35 CEST 2013


Need to check why gpio toggling in ehci-omap is not
working and works only from ehci-hcd.

Signed-off-by: Dan Murphy <dmurphy at ti.com>
---
 drivers/usb/host/ehci-hcd.c  |    7 ++++++-
 drivers/usb/host/ehci-omap.c |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 706cf0c..17d0c9c 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -29,7 +29,7 @@
 #include <malloc.h>
 #include <watchdog.h>
 #include <linux/compiler.h>
-
+#include <asm/ehci-omap.h>
 #include "ehci.h"
 
 #ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
@@ -776,6 +776,11 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
 			if (HCS_PPC(ehci_readl(&ctrl->hccr->cr_hcsparams))) {
 				reg |= EHCI_PS_PP;
 				ehci_writel(status_reg, reg);
+#ifdef CONFIG_USB_EHCI_OMAP
+				omap_ehci_phy_reset(1, 1000);
+				mdelay(10);
+				omap_ehci_phy_reset(0, 1000);
+#endif
 			}
 			break;
 		case USB_PORT_FEAT_RESET:
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 17f2214..68add44 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -109,7 +109,7 @@ int board_usb_init(void) __attribute__((weak, alias("__board_usb_init")));
 #if defined(CONFIG_OMAP_EHCI_PHY1_RESET_GPIO) || \
 	defined(CONFIG_OMAP_EHCI_PHY2_RESET_GPIO)
 /* controls PHY(s) reset signal(s) */
-static inline void omap_ehci_phy_reset(int on, int delay)
+void omap_ehci_phy_reset(int on, int delay)
 {
 	/*
 	 * Refer ISSUE1:
-- 
1.7.9.5



More information about the U-Boot mailing list