Changeset b854e56 in mainline
- Timestamp:
- 2011-04-08T22:25:32Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e42dd32
- Parents:
- 7786cea
- Location:
- uspace/drv/ohci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/Makefile
r7786cea rb854e56 41 41 root_hub.c \ 42 42 transfer_list.c \ 43 hw_struct/endpoint_descriptor.c 43 hw_struct/endpoint_descriptor.c \ 44 hw_struct/transfer_descriptor.c 44 45 45 46 -
uspace/drv/ohci/batch.c
r7786cea rb854e56 43 43 #include "hw_struct/transfer_descriptor.h" 44 44 45 #define OHCI_MAX_TRANSFER (8 * 1024) /* OHCI TDs can handle up to 8KB buffers */46 47 45 typedef struct ohci_batch { 48 46 ed_t *ed; … … 85 83 86 84 /* we needs + 1 transfer descriptor as the last one won't be executed */ 87 data->td_count = 88 1 + ((buffer_size + OHCI_MAX_TRANSFER - 1) / OHCI_MAX_TRANSFER);85 data->td_count = 1 + 86 ((buffer_size + OHCI_TD_MAX_TRANSFER - 1) / OHCI_TD_MAX_TRANSFER); 89 87 if (ep->transfer_type == USB_TRANSFER_CONTROL) { 90 88 data->td_count += 2; -
uspace/drv/ohci/hw_struct/transfer_descriptor.h
r7786cea rb854e56 39 39 #include "completion_codes.h" 40 40 41 /* OHCI TDs can handle up to 8KB buffers */ 42 #define OHCI_TD_MAX_TRANSFER (8 * 1024) 43 41 44 typedef struct td { 42 45 volatile uint32_t status; … … 52 55 #define TD_STATUS_T_MASK (0x3) /* data toggle 1x = use ED toggle carry */ 53 56 #define TD_STATUS_T_SHIFT (24) 57 #define TD_STATUS_T_0 (0x0) 58 #define TD_STATUS_T_1 (0x1) 59 #define TD_STATUS_T_USE_EP (0x1) 54 60 #define TD_STATUS_EC_MASK (0x3) /* error count */ 55 61 #define TD_STATUS_EC_SHIFT (26) … … 64 70 volatile uint32_t be; /* buffer end, address of the last byte */ 65 71 } __attribute__((packed)) td_t; 72 73 void td_init( 74 td_t *instance, usb_direction_t dir, void *buffer, size_t size, int toggle); 75 76 inline static void td_set_next(td_t *instance, uint32_t next) 77 { 78 assert(instance); 79 instance->next = next & TD_NEXT_PTR_MASK; 80 } 66 81 #endif 67 82 /**
Note:
See TracChangeset
for help on using the changeset viewer.