summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300/drivers/usb/host/ehci-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300/drivers/usb/host/ehci-hub.c')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/drivers/usb/host/ehci-hub.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/drivers/usb/host/ehci-hub.c b/cleopatre/linux-2.6.25.10-spc300/drivers/usb/host/ehci-hub.c
index 4e065e556e..3607822e58 100644
--- a/cleopatre/linux-2.6.25.10-spc300/drivers/usb/host/ehci-hub.c
+++ b/cleopatre/linux-2.6.25.10-spc300/drivers/usb/host/ehci-hub.c
@@ -588,7 +588,11 @@ static int ehci_hub_control (
goto error;
wIndex--;
temp = ehci_readl(ehci, status_reg);
-
+#if defined(MSTAR_PATCH_USB_HCD)
+ //tony add for FUSB200
+ if(temp & PORT_OWNER)
+ break;
+#endif
/*
* Even if OWNER is set, so the port is owned by the
* companion controller, khubd needs to be able to clear
@@ -835,6 +839,9 @@ static int ehci_hub_control (
"port %d low speed --> companion\n",
wIndex + 1);
temp |= PORT_OWNER;
+#if defined(MSTAR_PATCH_USB_HCD)
+ ehci_writel(ehci, temp, status_reg);
+#endif
} else {
ehci_vdbg (ehci, "port %d reset\n", wIndex + 1);
temp |= PORT_RESET;
@@ -889,3 +896,16 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum)
set_owner(ehci, --portnum, PORT_OWNER);
}
+#if defined(CONFIG_CHIP_MSE500)
+static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum)
+{
+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
+ u32 __iomem *reg;
+
+ if (ehci_is_TDI(ehci))
+ return 0;
+ reg = &ehci->regs->port_status[portnum - 1];
+ return ehci_readl(ehci, reg) & PORT_OWNER;
+}
+#endif
+