Changes in uspace/drv/ehci-hcd/pci.c [8855939:561112f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ehci-hcd/pci.c
r8855939 r561112f 54 54 55 55 #define CMD_OFFSET 0x0 56 #define STS_OFFSET 0x4 57 #define CFG_OFFSET 0x40 56 #define CONFIGFLAG_OFFSET 0x40 58 57 59 58 #define USBCMD_RUN 1 … … 265 264 * It would prevent pre-OS code from interfering. */ 266 265 ret = async_req_3_0(parent_phone, DEV_IFACE_ID(PCI_DEV_IFACE), 267 IPC_M_CONFIG_SPACE_WRITE_32, eecp + USBLEGCTLSTS_OFFSET, 268 0xe0000000); 266 IPC_M_CONFIG_SPACE_WRITE_32, eecp + USBLEGCTLSTS_OFFSET, 0); 269 267 CHECK_RET_HANGUP_RETURN(ret, "Failed(%d) zero USBLEGCTLSTS.\n", ret); 268 usb_log_debug("Zeroed USBLEGCTLSTS register.\n"); 270 269 271 270 /* Read again Legacy Support and Control register */ … … 292 291 volatile uint32_t *usbcmd = 293 292 (uint32_t*)((uint8_t*)registers + operation_offset + CMD_OFFSET); 294 volatile uint32_t *usbsts =295 (uint32_t*)((uint8_t*)registers + operation_offset + STS_OFFSET);296 293 volatile uint32_t *usbconfigured = 297 (uint32_t*)((uint8_t*)registers + operation_offset + CFG_OFFSET); 294 (uint32_t*)((uint8_t*)registers + operation_offset 295 + CONFIGFLAG_OFFSET); 298 296 usb_log_debug("USBCMD value: %x.\n", *usbcmd); 299 297 if (*usbcmd & USBCMD_RUN) { 300 298 *usbcmd = 0; 301 while (!(*usbsts & (1 << 12))); /*wait until hc is halted */302 299 *usbconfigured = 0; 303 300 usb_log_info("EHCI turned off.\n"); … … 305 302 usb_log_info("EHCI was not running.\n"); 306 303 } 307 usb_log_debug("Registers: %x(0x00080000):%x(0x00001000):%x(0x0).\n",308 *usbcmd, *usbsts, *usbconfigured);309 304 310 305 async_hangup(parent_phone);
Note:
See TracChangeset
for help on using the changeset viewer.