Changes in uspace/drv/uhci/main.c [67a1b78:ea991e84] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/main.c
r67a1b78 rea991e84 1 1 /* 2 * Copyright (c) 2010 Vojtech Horky , Jan Vesely2 * Copyright (c) 2010 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 26 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 27 */ 28 #include <usb/hcdhubd.h> 28 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 <str_error.h> 33 #include <driver.h> 34 34 #include "uhci.h" 35 35 … … 54 54 static int uhci_add_device(device_t *device) 55 55 { 56 u hci_print_info( "uhci_add_device() called\n");56 usb_dprintf(NAME, 1, "uhci_add_device() called\n"); 57 57 device->ops = &uhci_ops; 58 58 59 // TODO: get this value out of pci driver 60 return uhci_init(device, (void*)0xc020); 59 uintptr_t io_reg_base; 60 size_t io_reg_size; 61 int irq; 62 63 int rc = pci_get_my_registers(device, 64 &io_reg_base, &io_reg_size, &irq); 65 66 if (rc != EOK) { 67 fprintf(stderr, 68 NAME ": failed to get I/O registers addresses: %s.\n", 69 str_error(rc)); 70 return rc; 71 } 72 73 usb_dprintf(NAME, 2, "I/O regs at 0x%X (size %zu), IRQ %d.\n", 74 io_reg_base, io_reg_size, irq); 75 76 /* 77 * We need to announce the presence of our root hub. 78 */ 79 usb_dprintf(NAME, 2, "adding root hub\n"); 80 usb_hcd_add_root_hub(device); 81 82 return EOK; 61 83 } 62 84 … … 76 98 */ 77 99 sleep(5); 78 usb_dprintf_enable(NAME, DEBUG_LEVEL_INFO);100 usb_dprintf_enable(NAME, 5); 79 101 80 102 return driver_main(&uhci_driver);
Note:
See TracChangeset
for help on using the changeset viewer.