atmegadci_atmelarm.c (192984) | atmegadci_atmelarm.c (194228) |
---|---|
1#include <sys/cdefs.h> | 1#include <sys/cdefs.h> |
2__FBSDID("$FreeBSD: head/sys/dev/usb/controller/atmegadci_atmelarm.c 192984 2009-05-28 17:36:36Z thompsa $"); | 2__FBSDID("$FreeBSD: head/sys/dev/usb/controller/atmegadci_atmelarm.c 194228 2009-06-15 01:02:43Z thompsa $"); |
3 4/*- 5 * Copyright (c) 2009 Hans Petter Selasky. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 68 unchanged lines hidden (view full) --- 79 sc->sc_otg.sc_clocks_off = &atmegadci_clocks_off; 80 81 /* initialise some bus fields */ 82 sc->sc_otg.sc_bus.parent = dev; 83 sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; 84 sc->sc_otg.sc_bus.devices_max = ATMEGA_MAX_DEVICES; 85 86 /* get all DMA memory */ | 3 4/*- 5 * Copyright (c) 2009 Hans Petter Selasky. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 68 unchanged lines hidden (view full) --- 79 sc->sc_otg.sc_clocks_off = &atmegadci_clocks_off; 80 81 /* initialise some bus fields */ 82 sc->sc_otg.sc_bus.parent = dev; 83 sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; 84 sc->sc_otg.sc_bus.devices_max = ATMEGA_MAX_DEVICES; 85 86 /* get all DMA memory */ |
87 if (usb2_bus_mem_alloc_all(&sc->sc_otg.sc_bus, | 87 if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, |
88 USB_GET_DMA_TAG(dev), NULL)) { 89 return (ENOMEM); 90 } 91 rid = 0; 92 sc->sc_otg.sc_io_res = 93 bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); 94 95 if (!(sc->sc_otg.sc_io_res)) { --- 67 unchanged lines hidden (view full) --- 163 sc->sc_otg.sc_irq_res = NULL; 164 } 165 /* free memory resource, if any */ 166 if (sc->sc_otg.sc_io_res) { 167 bus_release_resource(dev, SYS_RES_MEMORY, 0, 168 sc->sc_otg.sc_io_res); 169 sc->sc_otg.sc_io_res = NULL; 170 } | 88 USB_GET_DMA_TAG(dev), NULL)) { 89 return (ENOMEM); 90 } 91 rid = 0; 92 sc->sc_otg.sc_io_res = 93 bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); 94 95 if (!(sc->sc_otg.sc_io_res)) { --- 67 unchanged lines hidden (view full) --- 163 sc->sc_otg.sc_irq_res = NULL; 164 } 165 /* free memory resource, if any */ 166 if (sc->sc_otg.sc_io_res) { 167 bus_release_resource(dev, SYS_RES_MEMORY, 0, 168 sc->sc_otg.sc_io_res); 169 sc->sc_otg.sc_io_res = NULL; 170 } |
171 usb2_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL); | 171 usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL); |
172 173 return (0); 174} 175 176static int 177atmegadci_shutdown(device_t dev) 178{ 179 struct atmegadci_super_softc *sc = device_get_softc(dev); --- 34 unchanged lines hidden --- | 172 173 return (0); 174} 175 176static int 177atmegadci_shutdown(device_t dev) 178{ 179 struct atmegadci_super_softc *sc = device_get_softc(dev); --- 34 unchanged lines hidden --- |