Changeset b19131c5 in mainline for uspace/drv/bus/usb/xhci/hc.c


Ignore:
Timestamp:
2017-07-06T13:20:32Z (7 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3256a6c
Parents:
8cbc167
Message:

added scratchpad definition, allocation and deallocation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hc.c

    r8cbc167 rb19131c5  
    4141#include "hc.h"
    4242#include "hw_struct/trb.h"
     43#include "scratchpad.h"
    4344
    4445static const irq_cmd_t irq_commands[] = {
     
    206207                goto err_cmd_ring;
    207208
    208         // TODO: Allocate scratchpad buffers
    209 
    210         return EOK;
    211 
     209        if ((err = xhci_scratchpad_alloc(hc)))
     210                goto err_scratchpad;
     211
     212        return EOK;
     213
     214err_scratchpad:
    212215        xhci_event_ring_fini(&hc->event_ring);
    213216err_cmd_ring:
     
    434437        xhci_trb_ring_fini(&hc->command_ring);
    435438        xhci_event_ring_fini(&hc->event_ring);
     439        xhci_scratchpad_free(hc);
    436440        pio_disable(hc->base, RNGSZ(hc->mmio_range));
    437441        usb_log_info("HC(%p): Finalized.", hc);
Note: See TracChangeset for help on using the changeset viewer.