Changeset 4bfcf22 in mainline


Ignore:
Timestamp:
2014-01-18T22:01:10Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9f6cb910
Parents:
a5361fb
Message:

ehci,ohci,uhci: Remove interrupt handler wrappers

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

Legend:

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

    ra5361fb r4bfcf22  
    240240 * @param[in] status Value of the status register at the time of interrupt.
    241241 */
    242 void hc_interrupt(hc_t *instance, uint32_t status)
    243 {
     242void hc_interrupt(hcd_t *hcd, uint32_t status)
     243{
     244        assert(hcd);
     245        hc_t *instance = hcd->driver.data;
    244246        status = EHCI_RD(status);
    245247        assert(instance);
  • uspace/drv/bus/usb/ehci/hc.h

    ra5361fb r4bfcf22  
    7878void hc_enqueue_endpoint(hc_t *instance, const endpoint_t *ep);
    7979void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep);
     80
    8081int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
    81 
    82 void hc_interrupt(hc_t *instance, uint32_t status);
     82void hc_interrupt(hcd_t *hcd, uint32_t status);
    8383#endif
    8484/**
  • uspace/drv/bus/usb/ehci/main.c

    ra5361fb r4bfcf22  
    4747
    4848#define NAME "ehci"
    49 // TODO: This should be merged to hc_interrupt
    50 static void ehci_interrupt(hcd_t *hcd, uint32_t status)
    51 {
    52         assert(hcd);
    53         if (hcd->driver.data)
    54                 hc_interrupt(hcd->driver.data, status);
    55 }
    5649
    5750static int ehci_driver_init(hcd_t *hcd, const hw_res_list_parsed_t *res, bool irq)
     
    6760        if (ret == EOK)
    6861                hcd_set_implementation(hcd, instance, hc_schedule,
    69                     NULL, NULL, ehci_interrupt, NULL);
     62                    NULL, NULL, hc_interrupt, NULL);
    7063        return ret;
    7164}
  • uspace/drv/bus/usb/ohci/hc.c

    ra5361fb r4bfcf22  
    327327 * @param[in] status Value of the status register at the time of interrupt.
    328328 */
    329 void hc_interrupt(hc_t *instance, uint32_t status)
    330 {
     329void hc_interrupt(hcd_t *hcd, uint32_t status)
     330{
     331        assert(hcd);
     332        hc_t *instance = hcd->driver.data;
    331333        status = OHCI_RD(status);
    332334        assert(instance);
  • uspace/drv/bus/usb/ohci/hc.h

    ra5361fb r4bfcf22  
    8888int hc_status(hcd_t *hcd, uint32_t *status);
    8989
    90 void hc_interrupt(hc_t *instance, uint32_t status);
     90void hc_interrupt(hcd_t *hcd, uint32_t status);
    9191#endif
    9292/**
  • uspace/drv/bus/usb/ohci/main.c

    ra5361fb r4bfcf22  
    4646
    4747#define NAME "ohci"
    48 // TODO: This should be merged to hc_interrupt
    49 static void ohci_interrupt(hcd_t *hcd, uint32_t status)
    50 {
    51         assert(hcd);
    52         if (hcd->driver.data)
    53                 hc_interrupt(hcd->driver.data, status);
    54 }
    5548
    5649static int ohci_driver_init(hcd_t *hcd, const hw_res_list_parsed_t *res, bool irq)
     
    6659        if (ret == EOK)
    6760                hcd_set_implementation(hcd, instance, hc_schedule,
    68                     ohci_endpoint_init, ohci_endpoint_fini, ohci_interrupt,
     61                    ohci_endpoint_init, ohci_endpoint_fini, hc_interrupt,
    6962                    hc_status);
    7063        return ret;
  • uspace/drv/bus/usb/uhci/hc.c

    ra5361fb r4bfcf22  
    146146/** Take action based on the interrupt cause.
    147147 *
    148  * @param[in] instance UHCI structure to use.
     148 * @param[in] hcd HCD structure to use.
    149149 * @param[in] status Value of the status register at the time of interrupt.
    150150 *
     
    154154 * - resume from suspend state (not implemented)
    155155 */
    156 void hc_interrupt(hc_t *instance, uint16_t status)
    157 {
     156void hc_interrupt(hcd_t *hcd, uint32_t status)
     157{
     158        assert(hcd);
     159        hc_t *instance = hcd->driver.data;
    158160        assert(instance);
    159161        /* Lower 2 bits are transaction error and transaction complete */
  • uspace/drv/bus/usb/uhci/hc.h

    ra5361fb r4bfcf22  
    127127int hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);
    128128
    129 void hc_interrupt(hc_t *instance, uint16_t status);
     129void hc_interrupt(hcd_t *hcd, uint32_t status);
    130130int hc_status(hcd_t *hcd, uint32_t *status);
    131131int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
  • uspace/drv/bus/usb/uhci/main.c

    ra5361fb r4bfcf22  
    4848#define NAME "uhci"
    4949
    50 // TODO: This should be merged to hc_interrupt
    51 static void uhci_interrupt(hcd_t *hcd, uint32_t status)
    52 {
    53         assert(hcd);
    54         if (hcd->driver.data)
    55                 hc_interrupt(hcd->driver.data, status);
    56 }
    57 
    5850static int uhci_driver_init(hcd_t *hcd, const hw_res_list_parsed_t *res, bool irq)
    5951{
     
    6860        if (ret == EOK)
    6961                hcd_set_implementation(hcd, instance, hc_schedule, NULL, NULL,
    70                     uhci_interrupt, hc_status);
     62                    hc_interrupt, hc_status);
    7163        return ret;
    7264}
Note: See TracChangeset for help on using the changeset viewer.