Lines Matching +full:string +full:- +full:array +full:- +full:property

1 #include <linux/string.h>
23 if (!strcmp(np->type, "pci") || !strcmp(np->type, "pciex")) { in of_bus_pci_match()
25 * PCI bridge lacks a ranges property. We in of_bus_pci_match()
27 * parent as-is, not with the PCI translate in of_bus_pci_match()
56 return -EINVAL; in of_bus_pci_map()
59 na - 1, ns)) in of_bus_pci_map()
60 return -EINVAL; in of_bus_pci_map()
66 for (i = 0; i < na - 1; i++) in of_bus_pci_map()
67 result[pna - 1 - i] += in of_bus_pci_map()
68 (addr[na - 1 - i] - in of_bus_pci_map()
69 range[na - 1 - i]); in of_bus_pci_map()
108 return !strcmp(np->type, "ambapp"); in of_bus_ambapp_match()
133 * Array of bus specific translators
140 .addr_prop_name = "assigned-addresses",
203 result[pna - 1 - i] = in build_one_resource()
204 addr[na - 1 - i]; in build_one_resource()
213 for (; rlen >= rone; rlen -= rone, ranges += rone) { in build_one_resource()
214 if (!bus->map(addr, ranges, na, ns, pna)) in build_one_resource()
223 /* If we have a ranges property in the parent, use it. */ in use_1to1_mapping()
229 * real bus nodes, and don't have a 'ranges' property. in use_1to1_mapping()
233 if (!strcmp(pp->name, "dma") || in use_1to1_mapping()
234 !strcmp(pp->name, "espdma") || in use_1to1_mapping()
235 !strcmp(pp->name, "ledma") || in use_1to1_mapping()
236 !strcmp(pp->name, "lebuffer")) in use_1to1_mapping()
257 bus = of_match_bus(p_op->dev.of_node); in build_device_resources()
258 bus->count_cells(op->dev.of_node, &na, &ns); in build_device_resources()
260 preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg); in build_device_resources()
264 /* Convert to num-cells. */ in build_device_resources()
267 /* Conver to num-entries. */ in build_device_resources()
270 op->resource = op->archdata.resource; in build_device_resources()
271 op->num_resources = num_reg; in build_device_resources()
273 struct resource *r = &op->resource[index]; in build_device_resources()
276 struct device_node *dp = op->dev.of_node; in build_device_resources()
277 struct device_node *pp = p_op->dev.of_node; in build_device_resources()
288 flags = bus->get_flags(reg, 0); in build_device_resources()
301 pp = dp->parent; in build_device_resources()
308 pbus->count_cells(dp, &pna, &pns); in build_device_resources()
314 flags = pbus->get_flags(addr, flags); in build_device_resources()
325 printk("%s reg[%d] -> %llx\n", in build_device_resources()
326 op->dev.of_node->full_name, index, in build_device_resources()
330 r->start = result & 0xffffffff; in build_device_resources()
331 r->end = result + size - 1; in build_device_resources()
332 r->flags = flags | ((result >> 32ULL) & 0xffUL); in build_device_resources()
334 r->name = op->dev.of_node->name; in build_device_resources()
349 sd = &op->dev.archdata; in scan_one_device()
350 sd->op = op; in scan_one_device()
352 op->dev.of_node = dp; in scan_one_device()
356 op->archdata.num_irqs = len / sizeof(struct linux_prom_irqs); in scan_one_device()
357 for (i = 0; i < op->archdata.num_irqs; i++) in scan_one_device()
358 op->archdata.irqs[i] = in scan_one_device()
365 op->archdata.num_irqs = len / sizeof(unsigned int); in scan_one_device()
366 for (i = 0; i < op->archdata.num_irqs; i++) in scan_one_device()
367 op->archdata.irqs[i] = in scan_one_device()
370 op->archdata.num_irqs = 0; in scan_one_device()
376 op->dev.parent = parent; in scan_one_device()
377 op->dev.bus = &platform_bus_type; in scan_one_device()
379 dev_set_name(&op->dev, "root"); in scan_one_device()
381 dev_set_name(&op->dev, "%08x", dp->phandle); in scan_one_device()
385 dp->full_name); in scan_one_device()
399 scan_tree(dp->child, &op->dev); in scan_tree()
401 dp = dp->sibling; in scan_tree()
414 scan_tree(root->child, &parent->dev); in scan_of_devices()