Lines Matching refs:bounce_buffer
13 static int addr_aligned(struct bounce_buffer *state) in addr_aligned()
33 int bounce_buffer_start(struct bounce_buffer *state, void *data, in bounce_buffer_start()
37 state->bounce_buffer = data; in bounce_buffer_start()
43 state->bounce_buffer = memalign(ARCH_DMA_MINALIGN, in bounce_buffer_start()
45 if (!state->bounce_buffer) in bounce_buffer_start()
49 memcpy(state->bounce_buffer, state->user_buffer, in bounce_buffer_start()
57 flush_dcache_range((unsigned long)state->bounce_buffer, in bounce_buffer_start()
58 (unsigned long)(state->bounce_buffer) + in bounce_buffer_start()
64 int bounce_buffer_stop(struct bounce_buffer *state) in bounce_buffer_stop()
68 invalidate_dcache_range((unsigned long)state->bounce_buffer, in bounce_buffer_stop()
69 (unsigned long)(state->bounce_buffer) + in bounce_buffer_stop()
73 if (state->bounce_buffer == state->user_buffer) in bounce_buffer_stop()
77 memcpy(state->user_buffer, state->bounce_buffer, state->len); in bounce_buffer_stop()
79 free(state->bounce_buffer); in bounce_buffer_stop()