Deleted Added
full compact
musb_otg_atmelarm.c (190755) musb_otg_atmelarm.c (194228)
1/* $FreeBSD: head/sys/dev/usb/controller/musb_otg_atmelarm.c 190755 2009-04-06 00:32:54Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/controller/musb_otg_atmelarm.c 194228 2009-06-15 01:02:43Z thompsa $ */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

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

94 sc->sc_otg.sc_clocks_arg = sc;
95
96 /* initialise some bus fields */
97 sc->sc_otg.sc_bus.parent = dev;
98 sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices;
99 sc->sc_otg.sc_bus.devices_max = MUSB2_MAX_DEVICES;
100
101 /* get all DMA memory */
2/*-
3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

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

94 sc->sc_otg.sc_clocks_arg = sc;
95
96 /* initialise some bus fields */
97 sc->sc_otg.sc_bus.parent = dev;
98 sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices;
99 sc->sc_otg.sc_bus.devices_max = MUSB2_MAX_DEVICES;
100
101 /* get all DMA memory */
102 if (usb2_bus_mem_alloc_all(&sc->sc_otg.sc_bus,
102 if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus,
103 USB_GET_DMA_TAG(dev), NULL)) {
104 return (ENOMEM);
105 }
106 rid = 0;
107 sc->sc_otg.sc_io_res =
108 bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
109
110 if (!(sc->sc_otg.sc_io_res)) {

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

187 sc->sc_otg.sc_irq_res = NULL;
188 }
189 /* free memory resource, if any */
190 if (sc->sc_otg.sc_io_res) {
191 bus_release_resource(dev, SYS_RES_MEMORY, 0,
192 sc->sc_otg.sc_io_res);
193 sc->sc_otg.sc_io_res = NULL;
194 }
103 USB_GET_DMA_TAG(dev), NULL)) {
104 return (ENOMEM);
105 }
106 rid = 0;
107 sc->sc_otg.sc_io_res =
108 bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE);
109
110 if (!(sc->sc_otg.sc_io_res)) {

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

187 sc->sc_otg.sc_irq_res = NULL;
188 }
189 /* free memory resource, if any */
190 if (sc->sc_otg.sc_io_res) {
191 bus_release_resource(dev, SYS_RES_MEMORY, 0,
192 sc->sc_otg.sc_io_res);
193 sc->sc_otg.sc_io_res = NULL;
194 }
195 usb2_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL);
195 usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL);
196
197 return (0);
198}
199
200static int
201musbotg_shutdown(device_t dev)
202{
203 struct musbotg_super_softc *sc = device_get_softc(dev);

--- 34 unchanged lines hidden ---
196
197 return (0);
198}
199
200static int
201musbotg_shutdown(device_t dev)
202{
203 struct musbotg_super_softc *sc = device_get_softc(dev);

--- 34 unchanged lines hidden ---