Lines Matching defs:ranges

280  * of_range_to_resource - Create a resource from a ranges entry
282 * @index: the 'ranges' index to convert to a resource
455 const __be32 *ranges;
461 * Normally, an absence of a "ranges" property means we are
466 * /ht nodes with no "ranges" property and a lot of perfectly
468 * "ranges" as equivalent to an empty "ranges" property which means
476 * This quirk also applies for 'dma-ranges' which frequently exist in
477 * child nodes without 'dma-ranges' in the parent nodes. --RobH
479 ranges = of_get_property(parent, rprop, &rlen);
480 if (ranges == NULL && !of_empty_ranges_quirk(parent) &&
481 strcmp(rprop, "dma-ranges")) {
482 pr_debug("no ranges; cannot translate\n");
485 if (ranges == NULL || rlen == 0) {
488 pr_debug("empty ranges; 1:1 translation\n");
492 pr_debug("walking ranges...\n");
494 /* Now walk through the ranges */
497 for (; rlen >= rone; rlen -= rone, ranges += rone) {
498 offset = bus->map(addr, ranges, na, ns, pna);
506 memcpy(addr, ranges + na, 4 * pna);
582 * For indirectIO device which has no ranges property, get
629 in_addr, "ranges", &host);
675 in_addr, "dma-ranges", &host);
805 parser->dma = !strcmp(name, "dma-ranges");
820 return parser_init(parser, node, "ranges");
827 return parser_init(parser, node, "dma-ranges");
901 in_addr, "ranges", &host);
923 * Look in bottom up direction for the first "dma-ranges" property
926 * dma-ranges format:
931 * It returns -ENODEV if "dma-ranges" property was not found for this
937 const __be32 *ranges = NULL;
946 ranges = of_get_property(node, "dma-ranges", &len);
948 /* Ignore empty ranges, they imply no translation required */
949 if (ranges && len > 0)
952 /* Once we find 'dma-ranges', then a missing one is an error */
953 if (found_dma_ranges && !ranges) {
962 if (!node || !ranges) {
963 pr_debug("no dma-ranges found for node(%pOF)\n", np);
990 * Record all info in the generic DMA ranges array for struct device,
991 * returning an error if we don't find any parsable ranges.
1027 const __be32 *ranges;
1034 ranges = of_get_property(np, "dma-ranges", &len);
1035 if (ranges && len) {