/* * of_range_count - Get the number of "ranges" or "dma-ranges" entries * @parser: Parser state initialized by of_range_parser_init() * * Returns the number of entries or 0 if none. * * Note that calling this within or after the for_each_of_range() iterator will * be inaccurate giving the number of entries remaining.
*/ staticinlineint of_range_count(conststruct of_range_parser *parser)
{ if (!parser || !parser->node || !parser->range || parser->range == parser->end) return 0; return (parser->end - parser->range) / (parser->na + parser->pna + parser->ns);
}
/* Translate a DMA address from device space to CPU space */ extern u64 of_translate_dma_address(struct device_node *dev, const __be32 *in_addr); externconst __be32 *of_translate_dma_region(struct device_node *dev, const __be32 *addr,
phys_addr_t *start, size_t *length);
/* Extract an address from a device, returns the region size and * the address space flags too. The PCI version uses a BAR number * instead of an absolute index
*/ externconst __be32 *__of_get_address(struct device_node *dev, int index, int bar_no,
u64 *size, unsignedint *flags);
int of_property_read_reg(struct device_node *np, int idx, u64 *addr, u64 *size);
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.