From fdd13b36c4a501d8787a27e54635fbd943f2685d Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 31 Aug 2005 11:52:57 -0700 Subject: [PATCH] USB: OHCI relies less on NDP register Some OHCI implementations have differences in the way the NDP register (in roothub_a) reports the number of ports present. This patch allows the platform specific code to optionally supply the number of ports. The driver just reads the value at init (if not supplied) instead of reading it every time its needed (except for an AMD756 bug workaround). It also sets the value correctly for the ARM pxa27x architecture. Signed-Off-By: Richard Purdie Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-pxa27x.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/usb/host/ohci-pxa27x.c') diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index e5bc1789d18..5dd20dbe852 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -258,6 +258,9 @@ ohci_pxa27x_start (struct usb_hcd *hcd) ohci_dbg (ohci, "ohci_pxa27x_start, ohci:%p", ohci); + /* The value of NDP in roothub_a is incorrect on this hardware */ + ohci->num_ports = 3; + if ((ret = ohci_init(ohci)) < 0) return ret; -- cgit v1.2.3 From 155faf5e1e36ca3a6127bdfb5c624d58e520c411 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 31 Aug 2005 11:54:09 -0700 Subject: [PATCH] USB: OHCI, pxa27x OHCI port power tweaks Now that it's in use on other boards, a bug in the original code needs fixing. There is no need for the PXA27x OHCI to set usb power during init, since the hub driver in usbcore handles that. Those platform-specific power control functions are also incorrect, and should therefore be removed. Add a check to clear the OTG pin hold bit until such times OTG is properly implemented. Signed-Off-By: Richard Purdie Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-pxa27x.c | 45 +++++++----------------------------------- 1 file changed, 7 insertions(+), 38 deletions(-) (limited to 'drivers/usb/host/ohci-pxa27x.c') diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 5dd20dbe852..2fdb262d472 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c @@ -75,33 +75,6 @@ static int pxa27x_ohci_select_pmm( int mode ) return 0; } -/* - If you select PMM_PERPORT_MODE, you should set the port power - */ -static int pxa27x_ohci_set_port_power( int port ) -{ - if ( (pxa27x_ohci_pmm_state==PMM_PERPORT_MODE) - && (port>0) && (port0) && (port