Lines Matching refs:bounce_buffer
14 static int addr_aligned(struct bounce_buffer *state) in addr_aligned()
34 int bounce_buffer_start(struct bounce_buffer *state, void *data, in bounce_buffer_start()
38 state->bounce_buffer = data; in bounce_buffer_start()
44 state->bounce_buffer = memalign(ARCH_DMA_MINALIGN, in bounce_buffer_start()
46 if (!state->bounce_buffer) in bounce_buffer_start()
50 memcpy(state->bounce_buffer, state->user_buffer, in bounce_buffer_start()
58 flush_dcache_range((unsigned long)state->bounce_buffer, in bounce_buffer_start()
59 (unsigned long)(state->bounce_buffer) + in bounce_buffer_start()
65 int bounce_buffer_stop(struct bounce_buffer *state) in bounce_buffer_stop()
69 invalidate_dcache_range((unsigned long)state->bounce_buffer, in bounce_buffer_stop()
70 (unsigned long)(state->bounce_buffer) + in bounce_buffer_stop()
74 if (state->bounce_buffer == state->user_buffer) in bounce_buffer_stop()
78 memcpy(state->user_buffer, state->bounce_buffer, state->len); in bounce_buffer_stop()
80 free(state->bounce_buffer); in bounce_buffer_stop()