Changeset 8c877b2 in mainline for uspace/drv/uhci-hcd/pci.c
- Timestamp:
- 2011-03-04T13:05:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d49728c
- Parents:
- dff940f8 (diff), 9a422574 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/pci.c
rdff940f8 r8c877b2 38 38 #include <devman.h> 39 39 #include <device/hw_res.h> 40 41 #include <usb/debug.h> 42 #include <pci_dev_iface.h> 40 43 41 44 #include "pci.h" … … 83 86 irq = res->res.interrupt.irq; 84 87 irq_found = true; 88 usb_log_debug2("Found interrupt: %d.\n", irq); 85 89 break; 86 90 case IO_RANGE: 87 io_address = (uintptr_t) 88 res->res.io_range.address; 91 io_address = res->res.io_range.address; 89 92 io_size = res->res.io_range.size; 93 usb_log_debug2("Found io: %llx %zu.\n", 94 res->res.io_range.address, res->res.io_range.size); 90 95 io_found = true; 91 96 break; … … 105 110 } 106 111 107 if (io_reg_address != NULL) { 108 *io_reg_address = io_address; 109 } 110 if (io_reg_size != NULL) { 111 *io_reg_size = io_size; 112 } 113 if (irq_no != NULL) { 114 *irq_no = irq; 115 } 112 *io_reg_address = io_address; 113 *io_reg_size = io_size; 114 *irq_no = irq; 116 115 117 116 rc = EOK; … … 127 126 IPC_FLAG_BLOCKING); 128 127 bool enabled = hw_res_enable_interrupt(parent_phone); 128 async_hangup(parent_phone); 129 129 return enabled ? EOK : EIO; 130 130 } 131 /*----------------------------------------------------------------------------*/ 132 int pci_disable_legacy(ddf_dev_t *device) 133 { 134 assert(device); 135 int parent_phone = devman_parent_device_connect(device->handle, 136 IPC_FLAG_BLOCKING); 137 if (parent_phone < 0) { 138 return parent_phone; 139 } 140 141 /* See UHCI design guide for these values, 142 * write all WC bits in USB legacy register */ 143 sysarg_t address = 0xc0; 144 sysarg_t value = 0x8f00; 145 146 int rc = async_req_3_0(parent_phone, DEV_IFACE_ID(PCI_DEV_IFACE), 147 IPC_M_CONFIG_SPACE_WRITE_16, address, value); 148 async_hangup(parent_phone); 149 150 return rc; 151 } 152 /*----------------------------------------------------------------------------*/ 131 153 /** 132 154 * @}
Note:
See TracChangeset
for help on using the changeset viewer.