Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 01bbbb2 in mainline


Ignore:
Timestamp:
2011-07-11T12:21:31Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
dbb9663
Parents:
062b25f
Message:

OHCI: Root hub: create descriptors after device setup.

Fix some comments and fixes.

Location:
uspace/drv/bus/usb/ohci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/ohci_regs.h

    r062b25f r01bbbb2  
    4646
    4747        volatile uint32_t control;
    48 #define C_CSBR_MASK (0x3) /* Control-bulk service ratio */
    49 #define C_CSBR_1_1  (0x0)
    50 #define C_CSBR_1_2  (0x1)
    51 #define C_CSBR_1_3  (0x2)
    52 #define C_CSBR_1_4  (0x3)
    53 #define C_CSBR_SHIFT (0)
     48#define C_CBSR_MASK (0x3) /* Control-bulk service ratio */
     49#define C_CBSR_1_1  (0x0)
     50#define C_CBSR_1_2  (0x1)
     51#define C_CBSR_1_3  (0x2)
     52#define C_CBSR_1_4  (0x3)
     53#define C_CBSR_SHIFT (0)
    5454
    5555#define C_PLE (1 << 2)   /* Periodic list enable */
  • uspace/drv/bus/usb/ohci/root_hub.c

    r062b25f r01bbbb2  
    7474        .interface_count = 1,
    7575        .length = sizeof (usb_standard_configuration_descriptor_t),
    76         .max_power = 100,
     76        .max_power = 0, /* root hubs don't need no power */
    7777        .str_configuration = 0,
    7878};
     
    238238        }
    239239
    240         int ret = rh_init_descriptors(instance);
    241         if (ret != EOK) {
    242                 return ret;
    243         }
    244240        /* Don't forget the hub status bit and round up */
    245241        instance->interrupt_mask_size = (instance->port_count + 1 + 8) / 8;
     
    248244        instance->unfinished_interrupt_transfer = NULL;
    249245
    250         /* Set port power mode to no-power-switching. */
     246        /* Set port power mode to no power-switching. (always on) */
    251247        instance->registers->rh_desc_a |= RHDA_NPS_FLAG;
     248
     249        int ret = rh_init_descriptors(instance);
     250        if (ret != EOK) {
     251                return ret;
     252        }
    252253
    253254        usb_log_info("Root hub (%zu ports) initialized.\n",
Note: See TracChangeset for help on using the changeset viewer.