Deleted Added
full compact
at91_ohci.c (186439) at91_ohci.c (187170)
1/*-
2 * Copyright (c) 2006 M. Warner Losh. 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.

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

18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 M. Warner Losh. 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.

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

18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include <sys/cdefs.h>
26__FBSDID("$FreeBSD: head/sys/dev/usb2/controller/ohci2_atmelarm.c 186439 2008-12-23 17:36:25Z thompsa $");
26__FBSDID("$FreeBSD: head/sys/dev/usb2/controller/ohci2_atmelarm.c 187170 2009-01-13 19:02:40Z thompsa $");
27
28#include <dev/usb2/include/usb2_mfunc.h>
29#include <dev/usb2/include/usb2_defs.h>
30#include <dev/usb2/include/usb2_standard.h>
31
32#include <dev/usb2/core/usb2_core.h>
33#include <dev/usb2/core/usb2_busdma.h>
34#include <dev/usb2/core/usb2_process.h>

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

68{
69 struct at91_ohci_softc *sc = device_get_softc(dev);
70 int err;
71 int rid;
72
73 if (sc == NULL) {
74 return (ENXIO);
75 }
27
28#include <dev/usb2/include/usb2_mfunc.h>
29#include <dev/usb2/include/usb2_defs.h>
30#include <dev/usb2/include/usb2_standard.h>
31
32#include <dev/usb2/core/usb2_core.h>
33#include <dev/usb2/core/usb2_busdma.h>
34#include <dev/usb2/core/usb2_process.h>

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

68{
69 struct at91_ohci_softc *sc = device_get_softc(dev);
70 int err;
71 int rid;
72
73 if (sc == NULL) {
74 return (ENXIO);
75 }
76 /* get all DMA memory */
77
76 /* initialise some bus fields */
78 sc->sc_ohci.sc_bus.parent = dev;
77 sc->sc_ohci.sc_bus.parent = dev;
78 sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices;
79 sc->sc_ohci.sc_bus.devices_max = OHCI_MAX_DEVICES;
80
81 /* get all DMA memory */
79 if (usb2_bus_mem_alloc_all(&sc->sc_ohci.sc_bus,
80 USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) {
82 if (usb2_bus_mem_alloc_all(&sc->sc_ohci.sc_bus,
83 USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) {
81 return ENOMEM;
84 return (ENOMEM);
82 }
83 sc->iclk = at91_pmc_clock_ref("ohci_clk");
84 sc->fclk = at91_pmc_clock_ref("uhpck");
85
86 sc->sc_ohci.sc_dev = dev;
87
88 rid = MEM_RID;
89 sc->sc_ohci.sc_io_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,

--- 144 unchanged lines hidden ---
85 }
86 sc->iclk = at91_pmc_clock_ref("ohci_clk");
87 sc->fclk = at91_pmc_clock_ref("uhpck");
88
89 sc->sc_ohci.sc_dev = dev;
90
91 rid = MEM_RID;
92 sc->sc_ohci.sc_io_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,

--- 144 unchanged lines hidden ---