X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fbouncebuf.h;h=7427bd12e27c29d114e605387bd7f024505a5f0e;hb=5fac11e6d5ab350429b8c8ddf47d3d3877ca89d1;hp=5ffa99bc131f8b69be7fabf6e8377d992e3265d0;hpb=3be2bdf5dc69b3142c1162a59bc67191c9077567;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/bouncebuf.h b/include/bouncebuf.h index 5ffa99b..7427bd1 100644 --- a/include/bouncebuf.h +++ b/include/bouncebuf.h @@ -1,9 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * Generic bounce buffer implementation * * Copyright (C) 2012 Marek Vasut - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __INCLUDE_BOUNCEBUF_H__ @@ -63,6 +62,21 @@ struct bounce_buffer { */ int bounce_buffer_start(struct bounce_buffer *state, void *data, size_t len, unsigned int flags); + +/** + * bounce_buffer_start() -- Start the bounce buffer session with external align check function + * state: stores state passed between bounce_buffer_{start,stop} + * data: pointer to buffer to be aligned + * len: length of the buffer + * flags: flags describing the transaction, see above. + * alignment: alignment of the newly allocated bounce buffer + * addr_is_aligned: function for checking the alignment instead of the default one + */ +int bounce_buffer_start_extalign(struct bounce_buffer *state, void *data, + size_t len, unsigned int flags, + size_t alignment, + int (*addr_is_aligned)(struct bounce_buffer *state)); + /** * bounce_buffer_stop() -- Finish the bounce buffer session * state: stores state passed between bounce_buffer_{start,stop}