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

Ignore:
Timestamp:
2012-07-20T18:14:55Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
b828907, be67118
Parents:
7030bc9 (diff), 32260a0 (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.
Message:

Merge USB branch.

USB should be endian agnostic now.
OHCI and pci work on qemu powerpc, but pci locks up on real hw.
Hopefully no regressions on amd64/ia32.
Tested on qemu and Virtualbox.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c

    r7030bc9 r6de2d766  
    5858                /* Mark as dead, used for dummy EDs at the beginning of
    5959                 * endpoint lists. */
    60                 instance->status = ED_STATUS_K_FLAG;
     60                OHCI_MEM32_WR(instance->status, ED_STATUS_K_FLAG);
    6161                return;
    6262        }
     
    6565
    6666        /* Status: address, endpoint nr, direction mask and max packet size. */
    67         instance->status = 0
    68             | ((ep->address & ED_STATUS_FA_MASK) << ED_STATUS_FA_SHIFT)
     67        OHCI_MEM32_WR(instance->status,
     68            ((ep->address & ED_STATUS_FA_MASK) << ED_STATUS_FA_SHIFT)
    6969            | ((ep->endpoint & ED_STATUS_EN_MASK) << ED_STATUS_EN_SHIFT)
    7070            | ((dir[ep->direction] & ED_STATUS_D_MASK) << ED_STATUS_D_SHIFT)
    7171            | ((ep->max_packet_size & ED_STATUS_MPS_MASK)
    72                 << ED_STATUS_MPS_SHIFT);
     72                << ED_STATUS_MPS_SHIFT));
    7373
    7474        /* Low speed flag */
    7575        if (ep->speed == USB_SPEED_LOW)
    76                 instance->status |= ED_STATUS_S_FLAG;
     76                OHCI_MEM32_SET(instance->status, ED_STATUS_S_FLAG);
    7777
    7878        /* Isochronous format flag */
    7979        if (ep->transfer_type == USB_TRANSFER_ISOCHRONOUS)
    80                 instance->status |= ED_STATUS_F_FLAG;
     80                OHCI_MEM32_SET(instance->status, ED_STATUS_F_FLAG);
    8181
    8282        /* Set TD to the list */
    8383        const uintptr_t pa = addr_to_phys(td);
    84         instance->td_head = pa & ED_TDHEAD_PTR_MASK;
    85         instance->td_tail = pa & ED_TDTAIL_PTR_MASK;
     84        OHCI_MEM32_WR(instance->td_head, pa & ED_TDHEAD_PTR_MASK);
     85        OHCI_MEM32_WR(instance->td_tail, pa & ED_TDTAIL_PTR_MASK);
    8686
    8787        /* Set toggle bit */
    8888        if (ep->toggle)
    89                 instance->td_head |= ED_TDHEAD_TOGGLE_CARRY;
     89                OHCI_MEM32_SET(instance->td_head, ED_TDHEAD_TOGGLE_CARRY);
    9090
    9191}
Note: See TracChangeset for help on using the changeset viewer.