ehci_ixp4xx.c (198151) | ehci_ixp4xx.c (199057) |
---|---|
1/*- 2 * Copyright (c) 2008 Sam Leffler. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 13 unchanged lines hidden (view full) --- 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 25/* 26 * IXP435 attachment driver for the USB Enhanced Host Controller. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Sam Leffler. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 13 unchanged lines hidden (view full) --- 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 25/* 26 * IXP435 attachment driver for the USB Enhanced Host Controller. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/usb/controller/ehci_ixp4xx.c 198151 2009-10-15 20:07:08Z thompsa $"); | 30__FBSDID("$FreeBSD: head/sys/dev/usb/controller/ehci_ixp4xx.c 199057 2009-11-08 20:44:55Z thompsa $"); |
31 32#include "opt_bus.h" 33 34#include <sys/stdint.h> 35#include <sys/stddef.h> 36#include <sys/param.h> 37#include <sys/queue.h> 38#include <sys/types.h> --- 113 unchanged lines hidden (view full) --- 152 sc->sc_bus.devices_max = EHCI_MAX_DEVICES; 153 154 /* get all DMA memory */ 155 if (usb_bus_mem_alloc_all(&sc->sc_bus, 156 USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) { 157 return (ENOMEM); 158 } 159 | 31 32#include "opt_bus.h" 33 34#include <sys/stdint.h> 35#include <sys/stddef.h> 36#include <sys/param.h> 37#include <sys/queue.h> 38#include <sys/types.h> --- 113 unchanged lines hidden (view full) --- 152 sc->sc_bus.devices_max = EHCI_MAX_DEVICES; 153 154 /* get all DMA memory */ 155 if (usb_bus_mem_alloc_all(&sc->sc_bus, 156 USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) { 157 return (ENOMEM); 158 } 159 |
160 sc->sc_bus.usbrev = USB_REV_2_0; 161 | |
162 /* NB: hints fix the memory location and irq */ 163 164 rid = 0; 165 sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); 166 if (!sc->sc_io_res) { 167 device_printf(self, "Could not map memory\n"); 168 goto error; 169 } --- 55 unchanged lines hidden (view full) --- 225 * register following a port enable. 226 */ 227 sc->sc_flags |= EHCI_SCFLG_TT 228 | EHCI_SCFLG_SETMODE 229 | EHCI_SCFLG_BIGEDESC 230 | EHCI_SCFLG_BIGEMMIO 231 | EHCI_SCFLG_NORESTERM 232 ; | 160 /* NB: hints fix the memory location and irq */ 161 162 rid = 0; 163 sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); 164 if (!sc->sc_io_res) { 165 device_printf(self, "Could not map memory\n"); 166 goto error; 167 } --- 55 unchanged lines hidden (view full) --- 223 * register following a port enable. 224 */ 225 sc->sc_flags |= EHCI_SCFLG_TT 226 | EHCI_SCFLG_SETMODE 227 | EHCI_SCFLG_BIGEDESC 228 | EHCI_SCFLG_BIGEMMIO 229 | EHCI_SCFLG_NORESTERM 230 ; |
233 (void) ehci_reset(sc); | |
234 235 err = ehci_init(sc); 236 if (!err) { 237 err = device_probe_and_attach(sc->sc_bus.bdev); 238 } 239 if (err) { 240 device_printf(self, "USB init failed err=%d\n", err); 241 goto error; --- 127 unchanged lines hidden --- | 231 232 err = ehci_init(sc); 233 if (!err) { 234 err = device_probe_and_attach(sc->sc_bus.bdev); 235 } 236 if (err) { 237 device_printf(self, "USB init failed err=%d\n", err); 238 goto error; --- 127 unchanged lines hidden --- |