Ignore:
Timestamp:
2018-02-28T16:37:50Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b20da0
Parents:
f5e5f73 (diff), b2dca8de (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.
git-author:
Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
git-committer:
Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
Message:

Merge github.com:helenos-xhci-team/helenos

This commit merges support for USB 3 and generally refactors, fixes,
extends and cleans up the existing USB framework.

Notable additions and features:

  • new host controller driver has been implemented to control various xHC models (among others, NEC Renesas uPD720200)
  • isochronous data transfer mode
  • support for explicit USB device removal
  • USB tablet driver
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/hw_struct/queue_head.c

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2013 Jan Vesely
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    3738#include <mem.h>
    3839#include <macros.h>
     40#include <usb/host/bus.h>
    3941
    4042#include "mem_access.h"
     
    6365                return;
    6466        }
    65         assert(ep->speed < ARRAY_SIZE(speed));
     67        assert(ep->device->speed < ARRAY_SIZE(speed));
    6668        EHCI_MEM32_WR(instance->ep_char,
    67             QH_EP_CHAR_ADDR_SET(ep->address) |
     69            QH_EP_CHAR_ADDR_SET(ep->device->address) |
    6870            QH_EP_CHAR_EP_SET(ep->endpoint) |
    69             speed[ep->speed] |
    70             QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size)
    71         );
     71            speed[ep->device->speed] |
     72            QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size));
    7273        if (ep->transfer_type == USB_TRANSFER_CONTROL) {
    73                 if (ep->speed != USB_SPEED_HIGH)
     74                if (ep->device->speed != USB_SPEED_HIGH)
    7475                        EHCI_MEM32_SET(instance->ep_char, QH_EP_CHAR_C_FLAG);
    7576                /* Let BULK and INT use queue head managed toggle,
     
    7879        }
    7980        uint32_t ep_cap = QH_EP_CAP_C_MASK_SET(3 << 2) |
    80                     QH_EP_CAP_MULTI_SET(ep->packets);
    81         if (ep->speed != USB_SPEED_HIGH) {
     81            QH_EP_CAP_MULTI_SET(ep->packets_per_uframe);
     82        if (usb_speed_is_11(ep->device->speed)) {
     83                assert(ep->device->tt.dev != NULL);
    8284                ep_cap |=
    83                     QH_EP_CAP_TT_PORT_SET(ep->tt.port) |
    84                     QH_EP_CAP_TT_ADDR_SET(ep->tt.address);
     85                    QH_EP_CAP_TT_PORT_SET(ep->device->tt.port) |
     86                    QH_EP_CAP_TT_ADDR_SET(ep->device->tt.dev->address);
    8587        }
    8688        if (ep->transfer_type == USB_TRANSFER_INTERRUPT) {
Note: See TracChangeset for help on using the changeset viewer.