Deleted Added
full compact
ehci_ixp4xx.c (190755) ehci_ixp4xx.c (194228)
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 190755 2009-04-06 00:32:54Z thompsa $");
30__FBSDID("$FreeBSD: head/sys/dev/usb/controller/ehci_ixp4xx.c 194228 2009-06-15 01:02:43Z thompsa $");
31
32#include "opt_bus.h"
33
34#include <dev/usb/usb_mfunc.h>
35#include <dev/usb/usb.h>
36
37#include <dev/usb/usb_core.h>
38#include <dev/usb/usb_busdma.h>

--- 87 unchanged lines hidden (view full) ---

126 int rid;
127
128 /* initialise some bus fields */
129 sc->sc_bus.parent = self;
130 sc->sc_bus.devices = sc->sc_devices;
131 sc->sc_bus.devices_max = EHCI_MAX_DEVICES;
132
133 /* get all DMA memory */
31
32#include "opt_bus.h"
33
34#include <dev/usb/usb_mfunc.h>
35#include <dev/usb/usb.h>
36
37#include <dev/usb/usb_core.h>
38#include <dev/usb/usb_busdma.h>

--- 87 unchanged lines hidden (view full) ---

126 int rid;
127
128 /* initialise some bus fields */
129 sc->sc_bus.parent = self;
130 sc->sc_bus.devices = sc->sc_devices;
131 sc->sc_bus.devices_max = EHCI_MAX_DEVICES;
132
133 /* get all DMA memory */
134 if (usb2_bus_mem_alloc_all(&sc->sc_bus,
134 if (usb_bus_mem_alloc_all(&sc->sc_bus,
135 USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) {
136 return (ENOMEM);
137 }
138
139 sc->sc_bus.usbrev = USB_REV_2_0;
140
141 /* NB: hints fix the memory location and irq */
142

--- 125 unchanged lines hidden (view full) ---

268 bus_release_resource(self, SYS_RES_IRQ, 0, sc->sc_irq_res);
269 sc->sc_irq_res = NULL;
270 }
271 if (sc->sc_io_res) {
272 bus_release_resource(self, SYS_RES_MEMORY, 0,
273 sc->sc_io_res);
274 sc->sc_io_res = NULL;
275 }
135 USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) {
136 return (ENOMEM);
137 }
138
139 sc->sc_bus.usbrev = USB_REV_2_0;
140
141 /* NB: hints fix the memory location and irq */
142

--- 125 unchanged lines hidden (view full) ---

268 bus_release_resource(self, SYS_RES_IRQ, 0, sc->sc_irq_res);
269 sc->sc_irq_res = NULL;
270 }
271 if (sc->sc_io_res) {
272 bus_release_resource(self, SYS_RES_MEMORY, 0,
273 sc->sc_io_res);
274 sc->sc_io_res = NULL;
275 }
276 usb2_bus_mem_free_all(&sc->sc_bus, &ehci_iterate_hw_softc);
276 usb_bus_mem_free_all(&sc->sc_bus, &ehci_iterate_hw_softc);
277
278 return (0);
279}
280
281/*
282 * Bus space accessors for PIO operations.
283 */
284

--- 63 unchanged lines hidden ---
277
278 return (0);
279}
280
281/*
282 * Bus space accessors for PIO operations.
283 */
284

--- 63 unchanged lines hidden ---