Deleted Added
sdiff udiff text old ( 227849 ) new ( 228483 )
full compact
1#include <sys/cdefs.h>
2__FBSDID("$FreeBSD: head/sys/dev/usb/controller/atmegadci_atmelarm.c 228483 2011-12-14 00:28:54Z hselasky $");
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

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

57#include <dev/usb/usb_bus.h>
58#include <dev/usb/controller/atmegadci.h>
59
60#include <sys/rman.h>
61
62static device_probe_t atmegadci_probe;
63static device_attach_t atmegadci_attach;
64static device_detach_t atmegadci_detach;
65
66struct atmegadci_super_softc {
67 struct atmegadci_softc sc_otg; /* must be first */
68};
69
70static void
71atmegadci_clocks_on(struct usb_bus *bus)
72{

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

187 sc->sc_otg.sc_io_res);
188 sc->sc_otg.sc_io_res = NULL;
189 }
190 usb_bus_mem_free_all(&sc->sc_otg.sc_bus, NULL);
191
192 return (0);
193}
194
195static device_method_t atmegadci_methods[] = {
196 /* Device interface */
197 DEVMETHOD(device_probe, atmegadci_probe),
198 DEVMETHOD(device_attach, atmegadci_attach),
199 DEVMETHOD(device_detach, atmegadci_detach),
200 DEVMETHOD(device_suspend, bus_generic_suspend),
201 DEVMETHOD(device_resume, bus_generic_resume),
202 DEVMETHOD(device_shutdown, bus_generic_shutdown),
203
204 DEVMETHOD_END
205};
206
207static driver_t atmegadci_driver = {
208 .name = "atmegadci",
209 .methods = atmegadci_methods,
210 .size = sizeof(struct atmegadci_super_softc),
211};
212
213static devclass_t atmegadci_devclass;
214
215DRIVER_MODULE(atmegadci, atmelarm, atmegadci_driver, atmegadci_devclass, 0, 0);
216MODULE_DEPEND(atmegadci, usb, 1, 1, 1);