Lines Matching refs:scratchpad
105 if (!ctrl->scratchpad) in xhci_scratchpad_free()
110 free((void *)(uintptr_t)ctrl->scratchpad->sp_array[0]); in xhci_scratchpad_free()
111 free(ctrl->scratchpad->sp_array); in xhci_scratchpad_free()
112 free(ctrl->scratchpad); in xhci_scratchpad_free()
113 ctrl->scratchpad = NULL; in xhci_scratchpad_free()
351 struct xhci_scratchpad *scratchpad; in xhci_scratchpad_alloc() local
361 scratchpad = malloc(sizeof(*scratchpad)); in xhci_scratchpad_alloc()
362 if (!scratchpad) in xhci_scratchpad_alloc()
364 ctrl->scratchpad = scratchpad; in xhci_scratchpad_alloc()
366 scratchpad->sp_array = xhci_malloc(num_sp * sizeof(u64)); in xhci_scratchpad_alloc()
367 if (!scratchpad->sp_array) in xhci_scratchpad_alloc()
370 cpu_to_le64((uintptr_t)scratchpad->sp_array); in xhci_scratchpad_alloc()
389 scratchpad->sp_array[i] = cpu_to_le64(ptr); in xhci_scratchpad_alloc()
395 free(scratchpad->sp_array); in xhci_scratchpad_alloc()
398 free(scratchpad); in xhci_scratchpad_alloc()
399 ctrl->scratchpad = NULL; in xhci_scratchpad_alloc()