Lines Matching refs:scratchpad
106 if (!ctrl->scratchpad) in xhci_scratchpad_free()
111 free((void *)(uintptr_t)ctrl->scratchpad->sp_array[0]); in xhci_scratchpad_free()
112 free(ctrl->scratchpad->sp_array); in xhci_scratchpad_free()
113 free(ctrl->scratchpad); in xhci_scratchpad_free()
114 ctrl->scratchpad = NULL; in xhci_scratchpad_free()
352 struct xhci_scratchpad *scratchpad; in xhci_scratchpad_alloc() local
362 scratchpad = malloc(sizeof(*scratchpad)); in xhci_scratchpad_alloc()
363 if (!scratchpad) in xhci_scratchpad_alloc()
365 ctrl->scratchpad = scratchpad; in xhci_scratchpad_alloc()
367 scratchpad->sp_array = xhci_malloc(num_sp * sizeof(u64)); in xhci_scratchpad_alloc()
368 if (!scratchpad->sp_array) in xhci_scratchpad_alloc()
371 cpu_to_le64((uintptr_t)scratchpad->sp_array); in xhci_scratchpad_alloc()
393 scratchpad->sp_array[i] = cpu_to_le64(ptr); in xhci_scratchpad_alloc()
399 free(scratchpad->sp_array); in xhci_scratchpad_alloc()
402 free(scratchpad); in xhci_scratchpad_alloc()
403 ctrl->scratchpad = NULL; in xhci_scratchpad_alloc()