Changeset e20eaed in mainline for uspace/drv/bus/usb/ohci/batch.c
- Timestamp:
- 2011-08-25T13:53:38Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 620c710
- Parents:
- 23b0fe8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/batch.c
r23b0fe8 re20eaed 39 39 40 40 #include "batch.h" 41 #include " hcd_endpoint.h"41 #include "ohci_endpoint.h" 42 42 #include "utils/malloc32.h" 43 43 #include "hw_struct/endpoint_descriptor.h" … … 122 122 } else (void)0 123 123 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); 126 126 127 127 ohci_transfer_batch_t *data = calloc(sizeof(ohci_transfer_batch_t), 1); … … 135 135 } 136 136 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 */ 138 138 data->tds = calloc(sizeof(td_t*), data->td_count + 1); 139 139 CHECK_NULL_DISPOSE_RETURN(data->tds, … … 141 141 142 142 /* Add TD left over by the previous transfer */ 143 data->tds[0] = hcd_ep->td;143 data->tds[0] = ohci_ep->td; 144 144 data->leave_td = 0; 145 145 unsigned i = 1; … … 150 150 } 151 151 152 data->ed = hcd_ep->ed;152 data->ed = ohci_ep->ed; 153 153 batch->private_data = data; 154 154 batch->private_data_dtor = ohci_batch_dispose; … … 213 213 ohci_batch_dispose); 214 214 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); 217 217 218 218 ohci_transfer_batch_t *data = calloc(sizeof(ohci_transfer_batch_t), 1); … … 233 233 234 234 /* Add TD left over by the previous transfer */ 235 data->tds[0] = hcd_ep->td;235 data->tds[0] = ohci_ep->td; 236 236 data->leave_td = 0; 237 237 unsigned i = 1; … … 242 242 } 243 243 244 data->ed = hcd_ep->ed;244 data->ed = ohci_ep->ed; 245 245 246 246 /* NOTE: OHCI is capable of handling buffer that crosses page boundaries … … 303 303 data->leave_td = i; 304 304 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]; 308 309 assert(i > 0); 309 310 for (--i;i < data->td_count; ++i) … … 312 313 /* Clear possible ED HALT */ 313 314 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); 315 316 assert(pa == (data->ed->td_head & ED_TDHEAD_PTR_MASK)); 316 317 assert(pa == (data->ed->td_tail & ED_TDTAIL_PTR_MASK));
Note:
See TracChangeset
for help on using the changeset viewer.