Changeset afcd86e in mainline for uspace/drv/uhci-hcd/main.c
- Timestamp:
- 2011-02-01T22:19:15Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c56dbe0
- Parents:
- 7ce0fe3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/main.c
r7ce0fe3 rafcd86e 28 28 #include <driver.h> 29 29 #include <errno.h> 30 #include <str_error.h>31 30 #include <usb_iface.h> 32 31 33 #include "debug.h" 32 #include <usb/debug.h> 33 34 34 #include "iface.h" 35 #include "name.h"36 35 #include "pci.h" 37 36 #include "root_hub.h" 38 37 #include "uhci.h" 38 39 #define NAME "uhci-hcd" 39 40 40 41 static int usb_iface_get_hc_handle(device_t *dev, devman_handle_t *handle) … … 58 59 static int uhci_add_device(device_t *device) 59 60 { 60 uhci_print_info( "uhci_add_device() called\n" ); 61 assert(device); 62 63 usb_log_info("uhci_add_device() called\n"); 61 64 device->ops = &uhci_ops; 62 65 … … 69 72 70 73 if (rc != EOK) { 71 u hci_print_fatal("failed to get I/O registers addresses: %s.\n",72 str_error(rc));74 usb_log_error("Failed(%d) to get I/O registers addresses for device:.\n", 75 rc, device->handle); 73 76 return rc; 74 77 } 75 78 76 u hci_print_info("I/O regs at 0x%X (size %zu), IRQ %d.\n",79 usb_log_info("I/O regs at 0x%X (size %zu), IRQ %d.\n", 77 80 io_reg_base, io_reg_size, irq); 78 81 … … 80 83 81 84 if (ret != EOK) { 82 u hci_print_error("Failed to init uhci-hcd.\n");85 usb_log_error("Failed to init uhci-hcd.\n"); 83 86 return ret; 84 87 } … … 87 90 88 91 if (ret != EOK) { 89 u hci_print_error("Failed to setup uhci root hub.\n");92 usb_log_error("Failed to setup uhci root hub.\n"); 90 93 /* TODO: destroy uhci here */ 91 94 return ret; … … 94 97 ret = child_device_register(rh, device); 95 98 if (ret != EOK) { 96 u hci_print_error("Failed to register root hub.\n");99 usb_log_error("Failed to register root hub.\n"); 97 100 /* TODO: destroy uhci here */ 98 101 return ret; … … 117 120 */ 118 121 sleep(5); 119 usb_ dprintf_enable(NAME, DEBUG_LEVEL_INFO);122 usb_log_enable(USB_LOG_LEVEL_INFO, NAME); 120 123 121 124 return driver_main(&uhci_driver);
Note:
See TracChangeset
for help on using the changeset viewer.