Changeset 1d758fc in mainline for uspace/drv/bus/usb/xhci/scratchpad.c
- Timestamp:
- 2018-02-12T10:11:47Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5fe3f954
- Parents:
- 2f762a7
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-02-05 03:28:50)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-02-12 10:11:47)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/scratchpad.c
r2f762a7 r1d758fc 72 72 memset(hc->scratchpad_array.virt, 0, size); 73 73 74 uint64_t phys_begin = hc->scratchpad_array.phys+ array_size;74 const char *base = hc->scratchpad_array.virt + array_size; 75 75 uint64_t *array = hc->scratchpad_array.virt; 76 76 77 for (unsigned i = 0; i < num_bufs; ++i) 78 array[i] = host2xhci(64, phys_begin + i * PAGE_SIZE); 77 for (unsigned i = 0; i < num_bufs; ++i) { 78 array[i] = host2xhci(64, dma_buffer_phys(&hc->scratchpad_array, 79 base + i * PAGE_SIZE)); 80 } 79 81 80 hc->dcbaa[0] = host2xhci(64, hc->scratchpad_array.phys);82 hc->dcbaa[0] = host2xhci(64, dma_buffer_phys_base(&hc->scratchpad_array)); 81 83 82 84 usb_log_debug("Allocated %d scratchpad buffers.", num_bufs);
Note:
See TracChangeset
for help on using the changeset viewer.