Changeset fb78ae72 in mainline for uspace/drv/uhci-hcd/main.c
- Timestamp:
- 2011-02-19T23:34:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 423e8c81, deece2f
- Parents:
- b9d910f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/main.c
rb9d910f rfb78ae72 34 34 #include <driver.h> 35 35 #include <usb_iface.h> 36 #include <ipc/irc.h> 37 #include <ipc/ns.h> 38 #include <ipc/services.h> 39 #include <sysinfo.h> 36 #include <device/hw_res.h> 40 37 41 38 #include <errno.h> … … 84 81 assert(device); 85 82 uhci_t *hc = dev_to_uhci(device); 86 usb_log_info("LOL HARDWARE INTERRUPT: %p.\n", hc);87 83 uint16_t status = IPC_GET_ARG1(*call); 88 84 assert(hc); … … 111 107 112 108 CHECK_RET_RETURN(ret, 113 "Failed(%d) to get I/O registers addresses for device:.\n", 114 ret, device->handle); 109 "Failed(%d) to get I/O addresses:.\n", ret, device->handle); 115 110 usb_log_info("I/O regs at 0x%X (size %zu), IRQ %d.\n", 116 111 io_reg_base, io_reg_size, irq); 117 112 118 119 sysarg_t apic; 120 sysarg_t i8259; 121 int irc_phone = -1; 122 int irc_service = 0; 123 124 if ((sysinfo_get_value("apic", &apic) == EOK) && (apic)) { 125 irc_service = SERVICE_APIC; 126 usb_log_debug("SERVICE_APIC\n"); 127 } else if ((sysinfo_get_value("i8259", &i8259) == EOK) && (i8259)) { 128 irc_service = SERVICE_I8259; 129 usb_log_debug("SERVICE_I8259\n"); 130 } 131 132 if (irc_service) { 133 while (irc_phone < 0) 134 irc_phone = service_connect_blocking(irc_service, 0, 0); 135 } 136 usb_log_debug("Interrupt conttroller phone: %d\n", irc_phone); 137 138 async_msg_1(irc_phone, IRC_ENABLE_INTERRUPT, irq); 139 async_hangup(irc_phone); 140 113 ret = pci_enable_interrupts(device); 114 CHECK_RET_RETURN(ret, "Failed(%d) to get enable interrupts:\n", ret); 141 115 142 116 uhci_t *uhci_hc = malloc(sizeof(uhci_t));
Note:
See TracChangeset
for help on using the changeset viewer.