Changeset 76fbd9a in mainline for uspace/drv/bus/usb/ohci


Ignore:
Timestamp:
2012-02-24T19:07:44Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a76b01b4
Parents:
5837c7a
Message:

usb drivers: remove optical separators

Location:
uspace/drv/bus/usb/ohci
Files:
9 edited

Legend:

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

    r5837c7a r76fbd9a  
    6565        return EOK;
    6666}
    67 /*----------------------------------------------------------------------------*/
     67
    6868/** Set the next list in transfer list chain.
    6969 *
     
    8080        ed_append_ed(instance->list_head, next->list_head);
    8181}
    82 /*----------------------------------------------------------------------------*/
     82
    8383/** Add endpoint to the list and queue.
    8484 *
     
    132132        fibril_mutex_unlock(&instance->guard);
    133133}
    134 /*----------------------------------------------------------------------------*/
     134
    135135/** Remove endpoint from the list and queue.
    136136 *
  • uspace/drv/bus/usb/ohci/hc.c

    r5837c7a r76fbd9a  
    6868static int interrupt_emulator(hc_t *instance);
    6969static int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
    70 /*----------------------------------------------------------------------------*/
     70
    7171/** Get number of PIO ranges used in IRQ code.
    7272 * @return Number of ranges.
     
    7676        return sizeof(ohci_pio_ranges) / sizeof(irq_pio_range_t);
    7777}
    78 /*----------------------------------------------------------------------------*/
    79 /*----------------------------------------------------------------------------*/
     78
     79
    8080/** Get number of commands used in IRQ code.
    8181 * @return Number of commands.
     
    8585        return sizeof(ohci_irq_commands) / sizeof(irq_cmd_t);
    8686}
    87 /*----------------------------------------------------------------------------*/
     87
    8888/** Generate IRQ code.
    8989 * @param[out] ranges PIO ranges buffer.
     
    116116        return EOK;
    117117}
    118 /*----------------------------------------------------------------------------*/
     118
    119119/** Announce OHCI root hub to the DDF
    120120 *
     
    175175#undef CHECK_RET_RELEASE
    176176}
    177 /*----------------------------------------------------------------------------*/
     177
    178178/** Initialize OHCI hc driver structure
    179179 *
     
    228228        return EOK;
    229229}
    230 /*----------------------------------------------------------------------------*/
     230
    231231void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep)
    232232{
     
    261261        }
    262262}
    263 /*----------------------------------------------------------------------------*/
     263
    264264void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep)
    265265{
     
    296296        }
    297297}
    298 /*----------------------------------------------------------------------------*/
     298
    299299/** Add USB transfer to the schedule.
    300300 *
     
    338338        return EOK;
    339339}
    340 /*----------------------------------------------------------------------------*/
     340
    341341/** Interrupt handling routine
    342342 *
     
    384384
    385385}
    386 /*----------------------------------------------------------------------------*/
     386
    387387/** Check status register regularly
    388388 *
     
    402402        return EOK;
    403403}
    404 /*----------------------------------------------------------------------------*/
     404
    405405/** Turn off any (BIOS)driver that might be in control of the device.
    406406 *
     
    465465        async_usleep(50000);
    466466}
    467 /*----------------------------------------------------------------------------*/
     467
    468468/** OHCI hw initialization routine.
    469469 *
     
    537537            OHCI_RD(instance->registers->control));
    538538}
    539 /*----------------------------------------------------------------------------*/
     539
    540540/** Initialize schedule queues
    541541 *
     
    571571        return EOK;
    572572}
    573 /*----------------------------------------------------------------------------*/
     573
    574574/** Initialize memory structures used by the OHCI hcd.
    575575 *
  • uspace/drv/bus/usb/ohci/main.c

    r5837c7a r76fbd9a  
    6363        return EOK;
    6464}
    65 /*----------------------------------------------------------------------------*/
     65
    6666static driver_ops_t ohci_driver_ops = {
    6767        .dev_add = ohci_dev_add,
    6868};
    69 /*----------------------------------------------------------------------------*/
     69
    7070static driver_t ohci_driver = {
    7171        .name = NAME,
    7272        .driver_ops = &ohci_driver_ops
    7373};
    74 /*----------------------------------------------------------------------------*/
     74
    7575/** Initializes global driver structures (NONE).
    7676 *
  • uspace/drv/bus/usb/ohci/ohci.c

    r5837c7a r76fbd9a  
    7575        hc_interrupt(&ohci->hc, status);
    7676}
    77 /*----------------------------------------------------------------------------*/
     77
    7878/** Get USB address assigned to root hub.
    7979 *
     
    9292        return EOK;
    9393}
    94 /*----------------------------------------------------------------------------*/
     94
    9595/** Gets handle of the respective hc (this device, hc function).
    9696 *
     
    110110        return EOK;
    111111}
    112 /*----------------------------------------------------------------------------*/
     112
    113113/** Root hub USB interface */
    114114static usb_iface_t usb_iface = {
     
    116116        .get_my_address = rh_get_my_address,
    117117};
    118 /*----------------------------------------------------------------------------*/
     118
    119119/** Standard USB HC options (HC interface) */
    120120static ddf_dev_ops_t hc_ops = {
    121121        .interfaces[USBHC_DEV_IFACE] = &hcd_iface,
    122122};
    123 /*----------------------------------------------------------------------------*/
     123
    124124/** Standard USB RH options (RH interface) */
    125125static ddf_dev_ops_t rh_ops = {
    126126        .interfaces[USB_DEV_IFACE] = &usb_iface,
    127127};
    128 /*----------------------------------------------------------------------------*/
     128
    129129/** Initialize hc and rh ddf structures and their respective drivers.
    130130 *
  • uspace/drv/bus/usb/ohci/ohci_batch.c

    r5837c7a r76fbd9a  
    4444
    4545static void (*const batch_setup[])(ohci_transfer_batch_t*, usb_direction_t);
    46 /*----------------------------------------------------------------------------*/
     46
    4747/** Safely destructs ohci_transfer_batch_t structure
    4848 *
     
    6767        free(ohci_batch);
    6868}
    69 /*----------------------------------------------------------------------------*/
     69
    7070/** Finishes usb_transfer_batch and destroys the structure.
    7171 *
     
    8080        ohci_transfer_batch_dispose(ohci_batch);
    8181}
    82 /*----------------------------------------------------------------------------*/
     82
    8383/** Allocate memory and initialize internal data structure.
    8484 *
     
    158158#undef CHECK_NULL_DISPOSE_RET
    159159}
    160 /*----------------------------------------------------------------------------*/
     160
    161161/** Check batch TDs' status.
    162162 *
     
    261261        return true;
    262262}
    263 /*----------------------------------------------------------------------------*/
     263
    264264/** Starts execution of the TD list
    265265 *
     
    271271        ed_set_tail_td(ohci_batch->ed, ohci_batch->tds[ohci_batch->td_count]);
    272272}
    273 /*----------------------------------------------------------------------------*/
     273
    274274/** Prepare generic control transfer
    275275 *
     
    347347            USB_TRANSFER_BATCH_ARGS(*ohci_batch->usb_batch));
    348348}
    349 /*----------------------------------------------------------------------------*/
     349
    350350/** Prepare generic data transfer
    351351 *
     
    394394            USB_TRANSFER_BATCH_ARGS(*ohci_batch->usb_batch));
    395395}
    396 /*----------------------------------------------------------------------------*/
     396
    397397/** Transfer setup table. */
    398398static void (*const batch_setup[])(ohci_transfer_batch_t*, usb_direction_t) =
  • uspace/drv/bus/usb/ohci/ohci_batch.h

    r5837c7a r76fbd9a  
    6363void ohci_transfer_batch_commit(const ohci_transfer_batch_t *batch);
    6464void ohci_transfer_batch_finish_dispose(ohci_transfer_batch_t *batch);
    65 /*----------------------------------------------------------------------------*/
     65
    6666static inline ohci_transfer_batch_t *ohci_transfer_batch_from_link(link_t *l)
    6767{
  • uspace/drv/bus/usb/ohci/ohci_endpoint.c

    r5837c7a r76fbd9a  
    4848        ed_toggle_set(instance->ed, toggle);
    4949}
    50 /*----------------------------------------------------------------------------*/
     50
    5151/** Callback to get value of toggle bit.
    5252 *
     
    6161        return ed_toggle_get(instance->ed);
    6262}
    63 /*----------------------------------------------------------------------------*/
     63
    6464/** Creates new hcd endpoint representation.
    6565 *
     
    9393        return EOK;
    9494}
    95 /*----------------------------------------------------------------------------*/
     95
    9696/** Disposes hcd endpoint structure
    9797 *
  • uspace/drv/bus/usb/ohci/root_hub.c

    r5837c7a r76fbd9a  
    210210            instance->port_count);
    211211}
    212 /*----------------------------------------------------------------------------*/
     212
    213213/**
    214214 * Process root hub request.
     
    251251        }
    252252}
    253 /*----------------------------------------------------------------------------*/
     253
    254254/**
    255255 * Process interrupt on a hub device.
     
    272272        fibril_mutex_unlock(&instance->guard);
    273273}
    274 /*----------------------------------------------------------------------------*/
     274
    275275/**
    276276 * Create hub descriptor.
     
    327327        }
    328328}
    329 /*----------------------------------------------------------------------------*/
     329
    330330/** Initialize hub descriptors.
    331331 *
     
    353353            instance->hub_descriptor_size);
    354354}
    355 /*----------------------------------------------------------------------------*/
     355
    356356/**
    357357 * Create bitmap of changes to answer status interrupt.
     
    384384        return uint16_host2usb(mask);
    385385}
    386 /*----------------------------------------------------------------------------*/
     386
    387387/**
    388388 * Create answer to status request.
     
    475475
    476476}
    477 /*----------------------------------------------------------------------------*/
     477
    478478/**
    479479 * Create answer to a descriptor request.
     
    549549        TRANSFER_END(request, ENOTSUP);
    550550}
    551 /*----------------------------------------------------------------------------*/
     551
    552552/**
    553553 * process feature-enabling request on hub
     
    595595        }
    596596}
    597 /*----------------------------------------------------------------------------*/
     597
    598598/**
    599599 * Process feature clear request.
     
    659659        }
    660660}
    661 /*----------------------------------------------------------------------------*/
     661
    662662/**
    663663 * process one of requests that do not request nor carry additional data
     
    697697        }
    698698}
    699 /*----------------------------------------------------------------------------*/
     699
    700700/**
    701701 * process one of requests that do not request nor carry additional data
     
    744744        }
    745745}
    746 /*----------------------------------------------------------------------------*/
     746
    747747/**
    748748 * Process hub control request.
  • uspace/drv/bus/usb/ohci/utils/malloc32.h

    r5837c7a r76fbd9a  
    6262        return result;
    6363}
    64 /*----------------------------------------------------------------------------*/
     64
    6565/** Physical mallocator simulator
    6666 *
     
    7070static inline void * malloc32(size_t size)
    7171        { return memalign(OHCI_ALIGN, size); }
    72 /*----------------------------------------------------------------------------*/
     72
    7373/** Physical mallocator simulator
    7474 *
Note: See TracChangeset for help on using the changeset viewer.