Lines Matching refs:ranges

255  * of_range_to_resource - Create a resource from a ranges entry
257 * @index: the 'ranges' index to convert to a resource
414 const __be32 *ranges;
420 * Normally, an absence of a "ranges" property means we are
425 * /ht nodes with no "ranges" property and a lot of perfectly
427 * "ranges" as equivalent to an empty "ranges" property which means
435 * This quirk also applies for 'dma-ranges' which frequently exist in
436 * child nodes without 'dma-ranges' in the parent nodes. --RobH
438 ranges = of_get_property(parent, rprop, &rlen);
439 if (ranges == NULL && !of_empty_ranges_quirk(parent) &&
440 strcmp(rprop, "dma-ranges")) {
441 pr_debug("no ranges; cannot translate\n");
444 if (ranges == NULL || rlen == 0) {
447 pr_debug("empty ranges; 1:1 translation\n");
451 pr_debug("walking ranges...\n");
453 /* Now walk through the ranges */
456 for (; rlen >= rone; rlen -= rone, ranges += rone) {
457 offset = bus->map(addr, ranges, na, ns, pna, bus->flag_cells);
465 memcpy(addr, ranges + na, 4 * pna);
536 * For indirectIO device which has no ranges property, get
580 in_addr, "ranges", &host);
626 in_addr, "dma-ranges", &host);
751 parser->dma = !strcmp(name, "dma-ranges");
766 return parser_init(parser, node, "ranges");
773 return parser_init(parser, node, "dma-ranges");
843 in_addr, "ranges", &host);
865 * Look in bottom up direction for the first "dma-ranges" property
868 * dma-ranges format:
873 * It returns -ENODEV if "dma-ranges" property was not found for this
879 const __be32 *ranges = NULL;
887 ranges = of_get_property(node, "dma-ranges", &len);
889 /* Ignore empty ranges, they imply no translation required */
890 if (ranges && len > 0)
893 /* Once we find 'dma-ranges', then a missing one is an error */
894 if (found_dma_ranges && !ranges)
902 if (!node || !ranges) {
903 pr_debug("no dma-ranges found for node(%pOF)\n", np);
924 * Record all info in the generic DMA ranges array for struct device,
925 * returning an error if we don't find any parsable ranges.
958 const __be32 *ranges;
965 ranges = of_get_property(np, "dma-ranges", &len);
966 if (ranges && len) {