Changeset 0d3167e in mainline for uspace/drv/ehci-hcd/pci.c


Ignore:
Timestamp:
2011-03-07T16:22:55Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a7e2f0d
Parents:
275bf456
Message:

EHCI, zero configured flag to surrender root hub port control

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ehci-hcd/pci.c

    r275bf456 r0d3167e  
    5252#define HCC_PARAMS_EECP_MASK 0xff
    5353#define HCC_PARAMS_EECP_OFFSET 8
     54
     55#define CMD_OFFSET 0x0
     56#define CONFIGFLAG_OFFSET 0x40
    5457
    5558#define USBCMD_RUN 1
     
    258261        }
    259262
    260 
    261263        /* Zero SMI enables in legacy control register.
    262264         * It would prevent pre-OS code from interfering. */
     
    288290        /* Zero USBCMD register. */
    289291        volatile uint32_t *usbcmd =
    290          (uint32_t*)((uint8_t*)registers + operation_offset);
     292            (uint32_t*)((uint8_t*)registers + operation_offset + CMD_OFFSET);
     293        volatile uint32_t *usbconfigured =
     294            (uint32_t*)((uint8_t*)registers + operation_offset
     295            + CONFIGFLAG_OFFSET);
    291296        usb_log_debug("USBCMD value: %x.\n", *usbcmd);
    292297        if (*usbcmd & USBCMD_RUN) {
    293298                *usbcmd = 0;
     299                *usbconfigured = 0;
    294300                usb_log_info("EHCI turned off.\n");
    295301        } else {
Note: See TracChangeset for help on using the changeset viewer.