Lines Matching refs:scratchpad
108 if (!ctrl->scratchpad) in xhci_scratchpad_free()
113 free(xhci_bus_to_virt(ctrl, le64_to_cpu(ctrl->scratchpad->sp_array[0]))); in xhci_scratchpad_free()
114 free(ctrl->scratchpad->sp_array); in xhci_scratchpad_free()
115 free(ctrl->scratchpad); in xhci_scratchpad_free()
116 ctrl->scratchpad = NULL; in xhci_scratchpad_free()
357 struct xhci_scratchpad *scratchpad; in xhci_scratchpad_alloc() local
368 scratchpad = malloc(sizeof(*scratchpad)); in xhci_scratchpad_alloc()
369 if (!scratchpad) in xhci_scratchpad_alloc()
371 ctrl->scratchpad = scratchpad; in xhci_scratchpad_alloc()
373 scratchpad->sp_array = xhci_malloc(num_sp * sizeof(u64)); in xhci_scratchpad_alloc()
374 if (!scratchpad->sp_array) in xhci_scratchpad_alloc()
377 val_64 = xhci_virt_to_bus(ctrl, scratchpad->sp_array); in xhci_scratchpad_alloc()
400 scratchpad->sp_array[i] = cpu_to_le64(val_64); in xhci_scratchpad_alloc()
403 xhci_flush_cache((uintptr_t)scratchpad->sp_array, in xhci_scratchpad_alloc()
409 free(scratchpad->sp_array); in xhci_scratchpad_alloc()
412 free(scratchpad); in xhci_scratchpad_alloc()
413 ctrl->scratchpad = NULL; in xhci_scratchpad_alloc()