• Home
  • Raw
  • Download

Lines Matching refs:miter

14 static bool sg_dwiter_next(struct sg_mapping_iter *miter)  in sg_dwiter_next()  argument
16 if (sg_miter_next(miter)) { in sg_dwiter_next()
17 miter->consumed = 0; in sg_dwiter_next()
23 static bool sg_dwiter_is_at_end(struct sg_mapping_iter *miter) in sg_dwiter_is_at_end() argument
25 return miter->length == miter->consumed && !sg_dwiter_next(miter); in sg_dwiter_is_at_end()
28 static uint32_t sg_dwiter_read_buffer(struct sg_mapping_iter *miter) in sg_dwiter_read_buffer() argument
35 len = min(miter->length - miter->consumed, left); in sg_dwiter_read_buffer()
36 memcpy(addr, miter->addr + miter->consumed, len); in sg_dwiter_read_buffer()
37 miter->consumed += len; in sg_dwiter_read_buffer()
42 } while (sg_dwiter_next(miter)); in sg_dwiter_read_buffer()
57 static bool sg_dwiter_get_next_block(struct sg_mapping_iter *miter, uint32_t **ptr) in sg_dwiter_get_next_block() argument
61 if (sg_dwiter_is_at_end(miter)) in sg_dwiter_get_next_block()
64 len = miter->length - miter->consumed; in sg_dwiter_get_next_block()
67 miter->addr + miter->consumed))) { in sg_dwiter_get_next_block()
68 *ptr = miter->addr + miter->consumed; in sg_dwiter_get_next_block()
69 miter->consumed += 4; in sg_dwiter_get_next_block()
93 uint32_t cb710_sg_dwiter_read_next_block(struct sg_mapping_iter *miter) in cb710_sg_dwiter_read_next_block() argument
97 if (likely(sg_dwiter_get_next_block(miter, &ptr))) in cb710_sg_dwiter_read_next_block()
100 return sg_dwiter_read_buffer(miter); in cb710_sg_dwiter_read_next_block()
104 static void sg_dwiter_write_slow(struct sg_mapping_iter *miter, uint32_t data) in sg_dwiter_write_slow() argument
110 len = min(miter->length - miter->consumed, left); in sg_dwiter_write_slow()
111 memcpy(miter->addr, addr, len); in sg_dwiter_write_slow()
112 miter->consumed += len; in sg_dwiter_write_slow()
117 } while (sg_dwiter_next(miter)); in sg_dwiter_write_slow()
133 void cb710_sg_dwiter_write_next_block(struct sg_mapping_iter *miter, uint32_t data) in cb710_sg_dwiter_write_next_block() argument
137 if (likely(sg_dwiter_get_next_block(miter, &ptr))) { in cb710_sg_dwiter_write_next_block()
143 sg_dwiter_write_slow(miter, data); in cb710_sg_dwiter_write_next_block()