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/ohci/hw_struct/endpoint_descriptor.h

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2011 Jan Vesely
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    106107#define ED_NEXT_PTR_MASK (0xfffffff0)
    107108#define ED_NEXT_PTR_SHIFT (0)
    108 } __attribute__((packed)) ed_t;
     109} __attribute__((packed, aligned(32))) ed_t;
    109110
    110111void ed_init(ed_t *instance, const endpoint_t *ep, const td_t *td);
     
    162163        assert(instance);
    163164        return OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_PTR_MASK;
     165}
     166
     167/**
     168 * Set the HeadP of ED. Do not call unless the ED is Halted.
     169 * @param instance ED
     170 */
     171static inline void ed_set_head_td(ed_t *instance, const td_t *td)
     172{
     173        assert(instance);
     174        const uintptr_t pa = addr_to_phys(td);
     175        OHCI_MEM32_WR(instance->td_head, pa & ED_TDHEAD_PTR_MASK);
    164176}
    165177
     
    192204{
    193205        assert(instance);
    194         return (OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY) ? 1 : 0;
     206        return !!(OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY);
    195207}
    196208
Note: See TracChangeset for help on using the changeset viewer.