Changeset df6ded8 in mainline for uspace/drv/bus/usb/ehci/hc.h


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/hc.h

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2011 Jan Vesely
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    5556/** Main EHCI driver structure */
    5657typedef struct hc {
     58        /* Common device header */
     59        hc_device_t base;
     60
    5761        /** Memory mapped CAPS register area */
    5862        ehci_caps_regs_t *caps;
     
    6064        ehci_regs_t *registers;
    6165
    62         /** Iso transfer list */
    63         link_pointer_t *periodic_list_base;
     66        /** Iso transfer list, backed by dma_buffer */
     67        link_pointer_t *periodic_list;
     68
     69        dma_buffer_t dma_buffer;
    6470
    6571        /** CONTROL and BULK schedules */
     
    7076
    7177        /** List of active transfers */
    72         list_t pending_batches;
     78        list_t pending_endpoints;
    7379
    7480        /** Guards schedule and endpoint manipulation */
     
    8086        /** USB hub emulation structure */
    8187        ehci_rh_t rh;
     88
     89        /** USB bookkeeping */
     90        ehci_bus_t bus;
    8291} hc_t;
    8392
    84 errno_t hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interrupts);
    85 void hc_fini(hc_t *instance);
     93static inline hc_t *hcd_to_hc(hc_device_t *hcd)
     94{
     95        assert(hcd);
     96        return (hc_t *) hcd;
     97}
    8698
    87 void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep);
    88 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);
     99void hc_enqueue_endpoint(hc_t *, const endpoint_t *);
     100void hc_dequeue_endpoint(hc_t *, const endpoint_t *);
    89101
    90 errno_t ehci_hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res, int *irq);
     102/* Boottime operations */
     103extern errno_t hc_add(hc_device_t *, const hw_res_list_parsed_t *);
     104extern errno_t hc_start(hc_device_t *);
     105extern errno_t hc_setup_roothub(hc_device_t *);
     106extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *,
     107    const hw_res_list_parsed_t *, int *);
     108extern errno_t hc_gone(hc_device_t *);
    91109
    92 void ehci_hc_interrupt(hcd_t *hcd, uint32_t status);
    93 errno_t ehci_hc_status(hcd_t *hcd, uint32_t *status);
    94 errno_t ehci_hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
     110/** Runtime operations */
     111extern void ehci_hc_interrupt(bus_t *, uint32_t);
     112extern errno_t ehci_hc_status(bus_t *, uint32_t *);
     113extern errno_t ehci_hc_schedule(usb_transfer_batch_t *);
     114
    95115#endif
    96116/**
Note: See TracChangeset for help on using the changeset viewer.