/** * cb710_sg_dwiter_write_from_io - transfer data to mapped buffer from 32-bit IO port * @miter: sg mapping iter * @port: PIO port - IO or MMIO address * @count: number of 32-bit words to transfer * * Description: * Reads @count 32-bit words from register @port and stores it in * buffer iterated by @miter. Data that would overflow the buffer * is silently ignored. Iterator is advanced by 4*@count bytes * or to the buffer's end whichever is closer. * * Context: * IRQ disabled if the SG_MITER_ATOMIC is set. Don't care otherwise.
*/ staticinlinevoid cb710_sg_dwiter_write_from_io(struct sg_mapping_iter *miter, void __iomem *port, size_t count)
{ while (count-- > 0)
cb710_sg_dwiter_write_next_block(miter, ioread32(port));
}
/** * cb710_sg_dwiter_read_to_io - transfer data to 32-bit IO port from mapped buffer * @miter: sg mapping iter * @port: PIO port - IO or MMIO address * @count: number of 32-bit words to transfer * * Description: * Writes @count 32-bit words to register @port from buffer iterated * through @miter. If buffer ends before @count words are written * missing data is replaced by zeroes. @miter is advanced by 4*@count * bytes or to the buffer's end whichever is closer. * * Context: * IRQ disabled if the SG_MITER_ATOMIC is set. Don't care otherwise.
*/ staticinlinevoid cb710_sg_dwiter_read_to_io(struct sg_mapping_iter *miter, void __iomem *port, size_t count)
{ while (count-- > 0)
iowrite32(cb710_sg_dwiter_read_next_block(miter), port);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.