uhci_pci.c (198500) | uhci_pci.c (198501) |
---|---|
1/*- 2 * Copyright (c) 1998 The NetBSD Foundation, Inc. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to The NetBSD Foundation 6 * by Lennart Augustsson (augustss@carlstedt.se) at 7 * Carlstedt Research & Technology. 8 * --- 22 unchanged lines hidden (view full) --- 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 The NetBSD Foundation, Inc. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to The NetBSD Foundation 6 * by Lennart Augustsson (augustss@carlstedt.se) at 7 * Carlstedt Research & Technology. 8 * --- 22 unchanged lines hidden (view full) --- 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/sys/dev/usb/controller/uhci_pci.c 198500 2009-10-26 20:23:15Z thompsa $"); | 39__FBSDID("$FreeBSD: head/sys/dev/usb/controller/uhci_pci.c 198501 2009-10-26 21:47:16Z thompsa $"); |
40 41/* Universal Host Controller Interface 42 * 43 * UHCI spec: http://www.intel.com/ 44 */ 45 46/* The low level controller code for UHCI has been split into 47 * PCI probes and UHCI specific code. This was done to facilitate the --- 62 unchanged lines hidden (view full) --- 110 return (0); 111} 112 113static int 114uhci_pci_resume(device_t self) 115{ 116 uhci_softc_t *sc = device_get_softc(self); 117 | 40 41/* Universal Host Controller Interface 42 * 43 * UHCI spec: http://www.intel.com/ 44 */ 45 46/* The low level controller code for UHCI has been split into 47 * PCI probes and UHCI specific code. This was done to facilitate the --- 62 unchanged lines hidden (view full) --- 110 return (0); 111} 112 113static int 114uhci_pci_resume(device_t self) 115{ 116 uhci_softc_t *sc = device_get_softc(self); 117 |
118 pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); 119 |
|
118 uhci_resume(sc); 119 120 bus_generic_resume(self); 121 return (0); 122} 123 124static const char * 125uhci_pci_match(device_t self) --- 230 unchanged lines hidden (view full) --- 356 (driver_intr_t *)uhci_interrupt, sc, &sc->sc_intr_hdl); 357#endif 358 359 if (err) { 360 device_printf(self, "Could not setup irq, %d\n", err); 361 sc->sc_intr_hdl = NULL; 362 goto error; 363 } | 120 uhci_resume(sc); 121 122 bus_generic_resume(self); 123 return (0); 124} 125 126static const char * 127uhci_pci_match(device_t self) --- 230 unchanged lines hidden (view full) --- 358 (driver_intr_t *)uhci_interrupt, sc, &sc->sc_intr_hdl); 359#endif 360 361 if (err) { 362 device_printf(self, "Could not setup irq, %d\n", err); 363 sc->sc_intr_hdl = NULL; 364 goto error; 365 } |
366 /* 367 * Set the PIRQD enable bit and switch off all the others. We don't 368 * want legacy support to interfere with us XXX Does this also mean 369 * that the BIOS won't touch the keyboard anymore if it is connected 370 * to the ports of the root hub? 371 */ 372#ifdef USB_DEBUG 373 if (pci_read_config(self, PCI_LEGSUP, 2) != PCI_LEGSUP_USBPIRQDEN) { 374 device_printf(self, "LegSup = 0x%04x\n", 375 pci_read_config(self, PCI_LEGSUP, 2)); 376 } 377#endif 378 pci_write_config(self, PCI_LEGSUP, PCI_LEGSUP_USBPIRQDEN, 2); |
|
364 365 err = uhci_init(sc); 366 if (!err) { 367 err = device_probe_and_attach(sc->sc_bus.bdev); 368 } 369 if (err) { 370 device_printf(self, "USB init failed\n"); 371 goto error; --- 84 unchanged lines hidden --- | 379 380 err = uhci_init(sc); 381 if (!err) { 382 err = device_probe_and_attach(sc->sc_bus.bdev); 383 } 384 if (err) { 385 device_printf(self, "USB init failed\n"); 386 goto error; --- 84 unchanged lines hidden --- |