Changeset 0d3167e in mainline


Ignore:
Timestamp:
2011-03-07T16:22:55Z (13 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

Location:
uspace/drv/ehci-hcd
Files:
2 edited

Legend:

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

    r275bf456 r0d3167e  
    9797 * @param[in] argv Cmdline argument vector (ignored).
    9898 * @return Error code.
     99 *
     100 * Driver debug level is set here.
    99101 */
    100102int main(int argc, char *argv[])
  • 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.