1/*- 2 * Copyright (C) 2009 Yohanes Nugroho <yohanes@gmail.com> 3 * based on ehci_mbus.c 4 * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. 5 * All rights reserved. 6 * 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/arm/econa/ehci_ebus.c 228483 2011-12-14 00:28:54Z hselasky $"); |
36 37#include "opt_bus.h" 38 39#include <machine/resource.h> 40 41#include <sys/stdint.h> 42#include <sys/stddef.h> 43#include <sys/param.h> --- 26 unchanged lines hidden (view full) --- 70#include <dev/usb/usb_controller.h> 71#include <dev/usb/usb_bus.h> 72#include <dev/usb/controller/ehci.h> 73#include <dev/usb/controller/ehcireg.h> 74 75 76static device_attach_t ehci_ebus_attach; 77static device_detach_t ehci_ebus_detach; |
78 |
79static void *ih_err; 80 81#define EHCI_HC_DEVSTR "CNS11XX USB EHCI" 82#define USB_BRIDGE_INTR_MASK 0x214 83 84static int |
85ehci_ebus_probe(device_t self) 86{ 87 88 device_set_desc(self, EHCI_HC_DEVSTR); 89 90 return (BUS_PROBE_DEFAULT); 91} 92 --- 136 unchanged lines hidden (view full) --- 229 return (0); 230} 231 232static device_method_t ehci_methods[] = { 233 /* Device interface */ 234 DEVMETHOD(device_probe, ehci_ebus_probe), 235 DEVMETHOD(device_attach, ehci_ebus_attach), 236 DEVMETHOD(device_detach, ehci_ebus_detach), |
237 DEVMETHOD(device_suspend, bus_generic_suspend), 238 DEVMETHOD(device_resume, bus_generic_resume), 239 DEVMETHOD(device_shutdown, bus_generic_shutdown), |
240 241 DEVMETHOD_END 242}; 243 244static driver_t ehci_driver = { |
245 .name = "ehci", 246 .methods = ehci_methods, 247 .size = sizeof(ehci_softc_t), |
248}; 249 250static devclass_t ehci_devclass; 251 252DRIVER_MODULE(ehci, econaarm, ehci_driver, ehci_devclass, 0, 0); 253MODULE_DEPEND(ehci, usb, 1, 1, 1); |