Changeset e20eaed in mainline for uspace/drv/bus/usb/ohci/batch.c


Ignore:
Timestamp:
2011-08-25T13:53:38Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
620c710
Parents:
23b0fe8
Message:

ohci: Rename hcd_endpoint ⇒ ohci_endpoint to avoid hcd confusion

File:
1 edited

Legend:

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

    r23b0fe8 re20eaed  
    3939
    4040#include "batch.h"
    41 #include "hcd_endpoint.h"
     41#include "ohci_endpoint.h"
    4242#include "utils/malloc32.h"
    4343#include "hw_struct/endpoint_descriptor.h"
     
    122122        } else (void)0
    123123
    124         const hcd_endpoint_t *hcd_ep = hcd_endpoint_get(batch->ep);
    125         assert(hcd_ep);
     124        const ohci_endpoint_t *ohci_ep = ohci_endpoint_get(batch->ep);
     125        assert(ohci_ep);
    126126
    127127        ohci_transfer_batch_t *data = calloc(sizeof(ohci_transfer_batch_t), 1);
     
    135135        }
    136136
    137         /* We need an extra place for TD that is currently assigned to hcd_ep*/
     137        /* We need an extra place for TD that is assigned to ohci_ep */
    138138        data->tds = calloc(sizeof(td_t*), data->td_count + 1);
    139139        CHECK_NULL_DISPOSE_RETURN(data->tds,
     
    141141
    142142        /* Add TD left over by the previous transfer */
    143         data->tds[0] = hcd_ep->td;
     143        data->tds[0] = ohci_ep->td;
    144144        data->leave_td = 0;
    145145        unsigned i = 1;
     
    150150        }
    151151
    152         data->ed = hcd_ep->ed;
     152        data->ed = ohci_ep->ed;
    153153        batch->private_data = data;
    154154        batch->private_data_dtor = ohci_batch_dispose;
     
    213213            ohci_batch_dispose);
    214214
    215         const hcd_endpoint_t *hcd_ep = hcd_endpoint_get(ep);
    216         assert(hcd_ep);
     215        const ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep);
     216        assert(ohci_ep);
    217217
    218218        ohci_transfer_batch_t *data = calloc(sizeof(ohci_transfer_batch_t), 1);
     
    233233
    234234        /* Add TD left over by the previous transfer */
    235         data->tds[0] = hcd_ep->td;
     235        data->tds[0] = ohci_ep->td;
    236236        data->leave_td = 0;
    237237        unsigned i = 1;
     
    242242        }
    243243
    244         data->ed = hcd_ep->ed;
     244        data->ed = ohci_ep->ed;
    245245
    246246        /* NOTE: OHCI is capable of handling buffer that crosses page boundaries
     
    303303        data->leave_td = i;
    304304        assert(data->leave_td <= data->td_count);
    305         hcd_endpoint_t *hcd_ep = hcd_endpoint_get(instance->ep);
    306         assert(hcd_ep);
    307         hcd_ep->td = data->tds[i];
     305
     306        ohci_endpoint_t *ohci_ep = ohci_endpoint_get(instance->ep);
     307        assert(ohci_ep);
     308        ohci_ep->td = data->tds[i];
    308309        assert(i > 0);
    309310        for (--i;i < data->td_count; ++i)
     
    312313        /* Clear possible ED HALT */
    313314        data->ed->td_head &= ~ED_TDHEAD_HALTED_FLAG;
    314         const uint32_t pa = addr_to_phys(hcd_ep->td);
     315        const uint32_t pa = addr_to_phys(ohci_ep->td);
    315316        assert(pa == (data->ed->td_head & ED_TDHEAD_PTR_MASK));
    316317        assert(pa == (data->ed->td_tail & ED_TDTAIL_PTR_MASK));
Note: See TracChangeset for help on using the changeset viewer.