Lines Matching defs:ranges

253  * of_range_to_resource - Create a resource from a ranges entry
255 * @index: the 'ranges' index to convert to a resource
420 const __be32 *ranges;
426 * Normally, an absence of a "ranges" property means we are
431 * /ht nodes with no "ranges" property and a lot of perfectly
433 * "ranges" as equivalent to an empty "ranges" property which means
441 * This quirk also applies for 'dma-ranges' which frequently exist in
442 * child nodes without 'dma-ranges' in the parent nodes. --RobH
444 ranges = of_get_property(parent, rprop, &rlen);
445 if (ranges == NULL && !of_empty_ranges_quirk(parent) &&
446 strcmp(rprop, "dma-ranges")) {
447 pr_debug("no ranges; cannot translate\n");
450 if (ranges == NULL || rlen == 0) {
454 pr_debug("empty ranges; 1:1 translation\n");
458 pr_debug("walking ranges...\n");
460 /* Now walk through the ranges */
463 for (; rlen >= rone; rlen -= rone, ranges += rone) {
464 offset = bus->map(addr, ranges, na, ns, pna, bus->flag_cells);
472 memcpy(addr, ranges + na, 4 * pna);
545 * For indirectIO device which has no ranges property, get
591 in_addr, "ranges", &host);
637 in_addr, "dma-ranges", &host);
762 parser->dma = !strcmp(name, "dma-ranges");
777 return parser_init(parser, node, "ranges");
784 return parser_init(parser, node, "dma-ranges");
856 in_addr, "ranges", &host);
878 * Look in bottom up direction for the first "dma-ranges" property
881 * dma-ranges format:
886 * It returns -ENODEV if "dma-ranges" property was not found for this
892 const __be32 *ranges = NULL;
900 ranges = of_get_property(node, "dma-ranges", &len);
902 /* Ignore empty ranges, they imply no translation required */
903 if (ranges && len > 0)
906 /* Once we find 'dma-ranges', then a missing one is an error */
907 if (found_dma_ranges && !ranges)
915 if (!node || !ranges) {
916 pr_debug("no dma-ranges found for node(%pOF)\n", np);
937 * Record all info in the generic DMA ranges array for struct device,
938 * returning an error if we don't find any parsable ranges.
971 const __be32 *ranges;
978 ranges = of_get_property(np, "dma-ranges", &len);
979 if (ranges && len) {