Changeset cabda7f in mainline for uspace/drv/uhci-hcd/main.c
- Timestamp:
- 2011-02-25T20:48:30Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0fde1d5
- Parents:
- 2d33eb5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/main.c
r2d33eb5 rcabda7f 61 61 }; 62 62 /*----------------------------------------------------------------------------*/ 63 #ifdef USE_INTERRUPTS64 63 static void irq_handler(ddf_dev_t *dev, ipc_callid_t iid, ipc_call_t *call) 65 64 { … … 70 69 uhci_interrupt(hc, status); 71 70 } 72 #endif73 71 /*----------------------------------------------------------------------------*/ 74 72 #define CHECK_RET_RETURN(ret, message...) \ … … 85 83 86 84 87 uintptr_t io_reg_base ;88 size_t io_reg_size ;89 int irq ;85 uintptr_t io_reg_base = 0; 86 size_t io_reg_size = 0; 87 int irq = 0; 90 88 91 89 int ret = 92 90 pci_get_my_registers(device, &io_reg_base, &io_reg_size, &irq); 93 io_reg_size = sizeof(regs_t);94 91 95 92 CHECK_RET_RETURN(ret, … … 97 94 usb_log_info("I/O regs at 0x%X (size %zu), IRQ %d.\n", 98 95 io_reg_base, io_reg_size, irq); 96 io_reg_size = 32; 99 97 100 #ifdef USE_INTERRUPTS 101 ret = pci_enable_interrupts(device); 102 CHECK_RET_RETURN(ret, "Failed(%d) to get enable interrupts:\n", ret); 103 #endif 98 // ret = pci_enable_interrupts(device); 99 // CHECK_RET_RETURN(ret, "Failed(%d) to get enable interrupts:\n", ret); 104 100 105 101 uhci_t *uhci_hc = malloc(sizeof(uhci_t)); … … 119 115 */ 120 116 device->driver_data = uhci_hc; 121 #ifdef USE_INTERRUPTS122 117 ret = register_interrupt_handler(device, irq, irq_handler, 123 118 &uhci_hc->interrupt_code); … … 128 123 return ret; 129 124 } 130 #endif131 125 132 126 ddf_fun_t *rh; … … 155 149 { 156 150 sleep(3); 157 usb_log_enable(USB_LOG_LEVEL_ INFO, NAME);151 usb_log_enable(USB_LOG_LEVEL_DEBUG, NAME); 158 152 159 153 return ddf_driver_main(&uhci_driver);
Note:
See TracChangeset
for help on using the changeset viewer.