Lines Matching refs:range

50 	u64		(*map)(__be32 *addr, const __be32 *range,
70 static u64 of_bus_default_map(__be32 *addr, const __be32 *range, in of_bus_default_map() argument
75 cp = of_read_number(range, na); in of_bus_default_map()
76 s = of_read_number(range + na + pna, ns); in of_bus_default_map()
167 static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_pci_map() argument
174 rf = of_bus_pci_get_flags(range); in of_bus_pci_map()
181 cp = of_read_number(range + 1, na - 1); in of_bus_pci_map()
182 s = of_read_number(range + na + pna, ns); in of_bus_pci_map()
224 int of_pci_range_to_resource(struct of_pci_range *range, in of_pci_range_to_resource() argument
228 res->flags = range->flags; in of_pci_range_to_resource()
237 err = pci_register_io_range(&np->fwnode, range->cpu_addr, in of_pci_range_to_resource()
238 range->size); in of_pci_range_to_resource()
241 port = pci_address_to_pio(range->cpu_addr); in of_pci_range_to_resource()
249 upper_32_bits(range->cpu_addr)) { in of_pci_range_to_resource()
254 res->start = range->cpu_addr; in of_pci_range_to_resource()
256 res->end = res->start + range->size - 1; in of_pci_range_to_resource()
284 static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns, in of_bus_isa_map() argument
290 if ((addr[0] ^ range[0]) & cpu_to_be32(1)) in of_bus_isa_map()
294 cp = of_read_number(range + 1, na - 1); in of_bus_isa_map()
295 s = of_read_number(range + na + pna, ns); in of_bus_isa_map()
728 parser->range = of_get_property(node, name, &rlen); in parser_init()
729 if (parser->range == NULL) in parser_init()
732 parser->end = parser->range + rlen / sizeof(__be32); in parser_init()
753 struct of_pci_range *range) in of_pci_range_parser_one() argument
760 if (!range) in of_pci_range_parser_one()
763 if (!parser->range || parser->range + np > parser->end) in of_pci_range_parser_one()
766 range->flags = parser->bus->get_flags(parser->range); in of_pci_range_parser_one()
772 range->bus_addr = of_read_number(parser->range + busflag_na, na - busflag_na); in of_pci_range_parser_one()
775 range->cpu_addr = of_translate_dma_address(parser->node, in of_pci_range_parser_one()
776 parser->range + na); in of_pci_range_parser_one()
778 range->cpu_addr = of_translate_address(parser->node, in of_pci_range_parser_one()
779 parser->range + na); in of_pci_range_parser_one()
780 range->size = of_read_number(parser->range + parser->pna + na, ns); in of_pci_range_parser_one()
782 parser->range += np; in of_pci_range_parser_one()
785 while (parser->range + np <= parser->end) { in of_pci_range_parser_one()
789 flags = parser->bus->get_flags(parser->range); in of_pci_range_parser_one()
790 bus_addr = of_read_number(parser->range + busflag_na, na - busflag_na); in of_pci_range_parser_one()
793 parser->range + na); in of_pci_range_parser_one()
796 parser->range + na); in of_pci_range_parser_one()
797 size = of_read_number(parser->range + parser->pna + na, ns); in of_pci_range_parser_one()
799 if (flags != range->flags) in of_pci_range_parser_one()
801 if (bus_addr != range->bus_addr + range->size || in of_pci_range_parser_one()
802 cpu_addr != range->cpu_addr + range->size) in of_pci_range_parser_one()
805 range->size += size; in of_pci_range_parser_one()
806 parser->range += np; in of_pci_range_parser_one()
809 return range; in of_pci_range_parser_one()
980 struct of_range range; in of_dma_get_range() local
1009 for_each_of_range(&parser, &range) { in of_dma_get_range()
1010 if (range.cpu_addr == OF_BAD_ADDR) { in of_dma_get_range()
1012 range.bus_addr, node); in of_dma_get_range()
1035 for_each_of_range(&parser, &range) { in of_dma_get_range()
1037 range.bus_addr, range.cpu_addr, range.size); in of_dma_get_range()
1038 if (range.cpu_addr == OF_BAD_ADDR) in of_dma_get_range()
1040 r->cpu_start = range.cpu_addr; in of_dma_get_range()
1041 r->dma_start = range.bus_addr; in of_dma_get_range()
1042 r->size = range.size; in of_dma_get_range()
1043 r->offset = range.cpu_addr - range.bus_addr; in of_dma_get_range()
1066 struct of_range range; in of_dma_get_max_cpu_address() local
1077 for_each_of_range(&parser, &range) in of_dma_get_max_cpu_address()
1078 if (range.cpu_addr + range.size > cpu_end) in of_dma_get_max_cpu_address()
1079 cpu_end = range.cpu_addr + range.size - 1; in of_dma_get_max_cpu_address()