Home
last modified time | relevance | path

Searched refs:miter (Results 1 – 9 of 9) sorted by relevance

/linux-3.4.99/drivers/misc/cb710/
Dsgbuf2.c14 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()
[all …]
/linux-3.4.99/lib/
Dscatterlist.c333 void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, in sg_miter_start() argument
336 memset(miter, 0, sizeof(struct sg_mapping_iter)); in sg_miter_start()
338 miter->__sg = sgl; in sg_miter_start()
339 miter->__nents = nents; in sg_miter_start()
340 miter->__offset = 0; in sg_miter_start()
342 miter->__flags = flags; in sg_miter_start()
364 bool sg_miter_next(struct sg_mapping_iter *miter) in sg_miter_next() argument
369 if (!miter->__nents) in sg_miter_next()
372 sg_miter_stop(miter); in sg_miter_next()
375 while (miter->__offset == miter->__sg->length) { in sg_miter_next()
[all …]
/linux-3.4.99/include/linux/
Dcb710.h161 uint32_t cb710_sg_dwiter_read_next_block(struct sg_mapping_iter *miter);
162 void cb710_sg_dwiter_write_next_block(struct sg_mapping_iter *miter, uint32_t data);
179 static inline void cb710_sg_dwiter_write_from_io(struct sg_mapping_iter *miter, in cb710_sg_dwiter_write_from_io() argument
183 cb710_sg_dwiter_write_next_block(miter, ioread32(port)); in cb710_sg_dwiter_write_from_io()
201 static inline void cb710_sg_dwiter_read_to_io(struct sg_mapping_iter *miter, in cb710_sg_dwiter_read_to_io() argument
205 iowrite32(cb710_sg_dwiter_read_next_block(miter), port); in cb710_sg_dwiter_read_to_io()
Dscatterlist.h264 void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl,
266 bool sg_miter_next(struct sg_mapping_iter *miter);
267 void sg_miter_stop(struct sg_mapping_iter *miter);
/linux-3.4.99/drivers/mmc/host/
Djz4740_mmc.c137 struct sg_mapping_iter miter; member
240 struct sg_mapping_iter *miter = &host->miter; in jz4740_mmc_write_data() local
246 while (sg_miter_next(miter)) { in jz4740_mmc_write_data()
247 buf = miter->addr; in jz4740_mmc_write_data()
248 i = miter->length / 4; in jz4740_mmc_write_data()
278 data->bytes_xfered += miter->length; in jz4740_mmc_write_data()
280 sg_miter_stop(miter); in jz4740_mmc_write_data()
285 miter->consumed = (void *)buf - miter->addr; in jz4740_mmc_write_data()
286 data->bytes_xfered += miter->consumed; in jz4740_mmc_write_data()
287 sg_miter_stop(miter); in jz4740_mmc_write_data()
[all …]
Dcb710-mmc.c246 struct sg_mapping_iter *miter, size_t dw_count) in cb710_mmc_receive_pio() argument
255 cb710_sg_dwiter_write_from_io(miter, in cb710_mmc_receive_pio()
268 struct sg_mapping_iter miter; in cb710_mmc_receive() local
277 sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_TO_SG); in cb710_mmc_receive()
288 err = cb710_mmc_receive_pio(slot, &miter, 4); in cb710_mmc_receive()
301 err = cb710_mmc_receive_pio(slot, &miter, len); in cb710_mmc_receive()
306 sg_miter_stop(&miter); in cb710_mmc_receive()
312 struct sg_mapping_iter miter; in cb710_mmc_send() local
321 sg_miter_start(&miter, data->sg, data->sg_len, SG_MITER_FROM_SG); in cb710_mmc_send()
336 cb710_sg_dwiter_read_to_io(&miter, in cb710_mmc_send()
[all …]
/linux-3.4.99/drivers/memstick/host/
Dr592.c418 struct sg_mapping_iter miter; in r592_transfer_fifo_pio() local
434 sg_miter_start(&miter, &dev->req->sg, 1, SG_MITER_ATOMIC | in r592_transfer_fifo_pio()
438 while (sg_miter_next(&miter)) in r592_transfer_fifo_pio()
440 r592_write_fifo_pio(dev, miter.addr, miter.length); in r592_transfer_fifo_pio()
442 r592_read_fifo_pio(dev, miter.addr, miter.length); in r592_transfer_fifo_pio()
449 sg_miter_stop(&miter); in r592_transfer_fifo_pio()
/linux-3.4.99/drivers/usb/gadget/
Ddummy_hcd.c151 struct sg_mapping_iter miter; member
1241 struct sg_mapping_iter *miter = &urbp->miter; in dummy_perform_transfer() local
1266 sg_miter_start(miter, urb->sg, urb->num_sgs, flags); in dummy_perform_transfer()
1269 next_sg = sg_miter_next(miter); in dummy_perform_transfer()
1275 ubuf = miter->addr; in dummy_perform_transfer()
1276 this_sg = min_t(u32, len, miter->length); in dummy_perform_transfer()
1277 miter->consumed = this_sg; in dummy_perform_transfer()
1288 next_sg = sg_miter_next(miter); in dummy_perform_transfer()
1297 sg_miter_stop(miter); in dummy_perform_transfer()
/linux-3.4.99/drivers/crypto/
Dtalitos.c1200 struct sg_mapping_iter miter; in sg_copy_end_to_buffer() local
1207 sg_miter_start(&miter, sgl, nents, sg_flags); in sg_copy_end_to_buffer()
1211 while (sg_miter_next(&miter) && offset < total_buffer) { in sg_copy_end_to_buffer()
1215 if ((offset + miter.length) > skip) { in sg_copy_end_to_buffer()
1219 len = miter.length - ignore; in sg_copy_end_to_buffer()
1222 memcpy(buf + boffset, miter.addr + ignore, len); in sg_copy_end_to_buffer()
1225 len = miter.length; in sg_copy_end_to_buffer()
1228 memcpy(buf + boffset, miter.addr, len); in sg_copy_end_to_buffer()
1232 offset += miter.length; in sg_copy_end_to_buffer()
1235 sg_miter_stop(&miter); in sg_copy_end_to_buffer()