Changeset a81a1d09 in mainline for uspace/drv/ehci-hcd/pci.c
- Timestamp:
- 2011-05-11T16:49:28Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 19387b61
- Parents:
- e1dbcbc (diff), 9212f8a (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/ehci-hcd/pci.c
re1dbcbc ra81a1d09 54 54 55 55 #define CMD_OFFSET 0x0 56 #define CONFIGFLAG_OFFSET 0x40 56 #define STS_OFFSET 0x4 57 #define CFG_OFFSET 0x40 57 58 58 59 #define USBCMD_RUN 1 … … 186 187 CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) to read PCI config space.\n", 187 188 ret); 188 usb_log_info("Register space BAR at %p:%" PRIxn ".\n", (void *) address, value); 189 usb_log_info("Register space BAR at %p:%" PRIxn ".\n", 190 (void *) address, value); 189 191 190 192 /* clear lower byte, it's not part of the BASE address */ … … 263 265 * It would prevent pre-OS code from interfering. */ 264 266 ret = async_req_3_0(parent_phone, DEV_IFACE_ID(PCI_DEV_IFACE), 265 IPC_M_CONFIG_SPACE_WRITE_32, eecp + USBLEGCTLSTS_OFFSET, 0); 267 IPC_M_CONFIG_SPACE_WRITE_32, eecp + USBLEGCTLSTS_OFFSET, 268 0xe0000000); 266 269 CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) zero USBLEGCTLSTS.\n", ret); 267 usb_log_debug("Zeroed USBLEGCTLSTS register.\n");268 270 269 271 /* Read again Legacy Support and Control register */ … … 290 292 volatile uint32_t *usbcmd = 291 293 (uint32_t*)((uint8_t*)registers + operation_offset + CMD_OFFSET); 294 volatile uint32_t *usbsts = 295 (uint32_t*)((uint8_t*)registers + operation_offset + STS_OFFSET); 292 296 volatile uint32_t *usbconfigured = 293 (uint32_t*)((uint8_t*)registers + operation_offset 294 + CONFIGFLAG_OFFSET); 297 (uint32_t*)((uint8_t*)registers + operation_offset + CFG_OFFSET); 295 298 usb_log_debug("USBCMD value: %x.\n", *usbcmd); 296 299 if (*usbcmd & USBCMD_RUN) { 297 300 *usbcmd = 0; 301 while (!(*usbsts & (1 << 12))); /*wait until hc is halted */ 298 302 *usbconfigured = 0; 299 303 usb_log_info("EHCI turned off.\n"); … … 301 305 usb_log_info("EHCI was not running.\n"); 302 306 } 307 usb_log_debug("Registers: %x(0x00080000):%x(0x00001000):%x(0x0).\n", 308 *usbcmd, *usbsts, *usbconfigured); 303 309 304 310 async_hangup(parent_phone);
Note:
See TracChangeset
for help on using the changeset viewer.