Changes in uspace/drv/uhci/main.c [2972e21:71ed4849] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/main.c
r2972e21 r71ed4849 1 1 /* 2 * Copyright (c) 2010 Vojtech Horky , Jan Vesely2 * Copyright (c) 2010 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 #include <usb/hcdhubd.h> 29 #include <usb_iface.h> 30 #include <usb/debug.h> 29 31 #include <errno.h> 30 31 #include "debug.h" 32 #include "iface.h" 33 #include "name.h" 32 #include <driver.h> 34 33 #include "uhci.h" 35 34 35 static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle) 36 { 37 /* This shall be called only for the UHCI itself. */ 38 assert(dev->parent == NULL); 39 40 *handle = dev->handle; 41 return EOK; 42 } 43 44 static usb_iface_t hc_usb_iface = { 45 .get_hc_handle = usb_iface_get_hc_handle 46 }; 36 47 37 48 static device_ops_t uhci_ops = { 38 .interfaces[USBHC_DEV_IFACE] = &uhci_iface, 49 .interfaces[USB_DEV_IFACE] = &hc_usb_iface, 50 .interfaces[USBHC_DEV_IFACE] = &uhci_iface 39 51 }; 40 52 41 53 static int uhci_add_device(device_t *device) 42 54 { 43 // usb_dprintf(NAME, DEBUG, "uhci_add_device() called\n"); 44 uhci_print_info( "uhci_add_device() called\n" ); 55 usb_dprintf(NAME, 1, "uhci_add_device() called\n"); 45 56 device->ops = &uhci_ops; 46 57 47 uhci_init( device, (void*)0xc020 ); 58 /* 59 * We need to announce the presence of our root hub. 60 */ 61 usb_dprintf(NAME, 2, "adding root hub\n"); 62 usb_hcd_add_root_hub(device); 48 63 49 64 return EOK; … … 64 79 * Do some global initializations. 65 80 */ 66 sleep( 5);67 usb_dprintf_enable(NAME, DEBUG_LEVEL_MAX);81 sleep(5); 82 usb_dprintf_enable(NAME, 5); 68 83 69 84 return driver_main(&uhci_driver);
Note:
See TracChangeset
for help on using the changeset viewer.