Lines Matching +full:reg +full:- +full:property

1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (C) 1996-2005 Paul Mackerras.
59 * we walk up the tree until we discover a "device_type" property
70 struct property *rprop; in sun4v_path_component()
73 rprop = of_find_property(dp, "reg", NULL); in sun4v_path_component()
77 regs = rprop->value; in sun4v_path_component()
78 if (!of_node_is_root(dp->parent)) { in sun4v_path_component()
81 (unsigned int) (regs->phys_addr >> 32UL), in sun4v_path_component()
82 (unsigned int) (regs->phys_addr & 0xffffffffUL)); in sun4v_path_component()
86 type = regs->phys_addr >> 60UL; in sun4v_path_component()
87 high_bits = (regs->phys_addr >> 32UL) & 0x0fffffffUL; in sun4v_path_component()
88 low_bits = (regs->phys_addr & 0xffffffffUL); in sun4v_path_component()
112 struct property *prop; in sun4u_path_component()
114 prop = of_find_property(dp, "reg", NULL); in sun4u_path_component()
118 regs = prop->value; in sun4u_path_component()
119 if (!of_node_is_root(dp->parent)) { in sun4u_path_component()
122 (unsigned int) (regs->phys_addr >> 32UL), in sun4u_path_component()
123 (unsigned int) (regs->phys_addr & 0xffffffffUL)); in sun4u_path_component()
127 prop = of_find_property(dp, "upa-portid", NULL); in sun4u_path_component()
138 *(u32 *)prop->value, in sun4u_path_component()
139 (unsigned int) (regs->phys_addr & mask)); in sun4u_path_component()
148 struct property *prop; in sbus_path_component()
150 prop = of_find_property(dp, "reg", NULL); in sbus_path_component()
154 regs = prop->value; in sbus_path_component()
157 regs->which_io, in sbus_path_component()
158 regs->phys_addr); in sbus_path_component()
166 struct property *prop; in pci_path_component()
169 prop = of_find_property(dp, "reg", NULL); in pci_path_component()
173 regs = prop->value; in pci_path_component()
174 devfn = (regs->phys_hi >> 8) & 0xff; in pci_path_component()
192 struct property *prop; in upa_path_component()
194 prop = of_find_property(dp, "reg", NULL); in upa_path_component()
198 regs = prop->value; in upa_path_component()
200 prop = of_find_property(dp, "upa-portid", NULL); in upa_path_component()
206 *(u32 *) prop->value, in upa_path_component()
207 (unsigned int) (regs->phys_addr & 0xffffffffUL)); in upa_path_component()
210 /* "name@reg" */
214 struct property *prop; in vdev_path_component()
217 prop = of_find_property(dp, "reg", NULL); in vdev_path_component()
221 regs = prop->value; in vdev_path_component()
231 struct property *prop; in ebus_path_component()
233 prop = of_find_property(dp, "reg", NULL); in ebus_path_component()
237 regs = prop->value; in ebus_path_component()
241 (unsigned int) (regs->phys_addr >> 32UL), in ebus_path_component()
242 (unsigned int) (regs->phys_addr & 0xffffffffUL)); in ebus_path_component()
249 struct property *prop; in i2c_path_component()
252 prop = of_find_property(dp, "reg", NULL); in i2c_path_component()
256 regs = prop->value; in i2c_path_component()
258 /* This actually isn't right... should look at the #address-cells in i2c_path_component()
259 * property of the i2c bus node etc. etc. in i2c_path_component()
269 struct property *prop; in usb_path_component()
272 prop = of_find_property(dp, "reg", NULL); in usb_path_component()
276 regs = prop->value; in usb_path_component()
278 if (prop->length == sizeof(u32) || regs[1] == 1) { in usb_path_component()
291 struct property *prop; in ieee1394_path_component()
294 prop = of_find_property(dp, "reg", NULL); in ieee1394_path_component()
298 regs = prop->value; in ieee1394_path_component()
311 struct device_node *parent = dp->parent; in __build_path_component()
344 if (of_node_is_type(parent, "virtual-devices")) { in __build_path_component()
378 return (tlb_type == spitfire ? "upa-portid" : "portid"); in get_mid_prop()
387 /* On hypervisor based platforms we interrogate the 'reg' in arch_find_n_match_cpu_physical_id()
388 * property. On everything else we look for a 'upa-portid', in arch_find_n_match_cpu_physical_id()
389 * 'portid', or 'cpuid' property. in arch_find_n_match_cpu_physical_id()
393 struct property *prop = of_find_property(cpun, "reg", NULL); in arch_find_n_match_cpu_physical_id()
397 pr_warn("CPU node missing reg property\n"); in arch_find_n_match_cpu_physical_id()
400 regs = prop->value; in arch_find_n_match_cpu_physical_id()
403 this_cpu_id = of_getintprop_default(cpun, mid_prop, -1); in arch_find_n_match_cpu_physical_id()
407 this_cpu_id = of_getintprop_default(cpun, mid_prop, -1); in arch_find_n_match_cpu_physical_id()
410 pr_warn("CPU node missing cpu ID property\n"); in arch_find_n_match_cpu_physical_id()
441 int cpuid = of_getintprop_default(dp, mid_prop, -1); in of_iterate_over_cpus()
447 cpuid = of_getintprop_default(dp, this_mid_prop, -1); in of_iterate_over_cpus()
451 "%s property", this_mid_prop); in of_iterate_over_cpus()
503 int portid = -1; in fill_in_one_cpu()
509 while (limit--) { in fill_in_one_cpu()
510 portid_parent = portid_parent->parent; in fill_in_one_cpu()
514 "portid", -1); in fill_in_one_cpu()
531 of_getintprop_default(dp, "clock-frequency", 0); in fill_in_one_cpu()
535 of_getintprop_default(dp, "l1-dcache-size", in fill_in_one_cpu()
538 of_getintprop_default(dp, "l1-dcache-line-size", in fill_in_one_cpu()
541 of_getintprop_default(dp, "l1-icache-size", in fill_in_one_cpu()
544 of_getintprop_default(dp, "l1-icache-line-size", in fill_in_one_cpu()
547 of_getintprop_default(dp, "l2-cache-size", 0); in fill_in_one_cpu()
549 of_getintprop_default(dp, "l2-cache-line-size", 0); in fill_in_one_cpu()
554 "l2-cache-size", in fill_in_one_cpu()
558 "l2-cache-line-size", 64); in fill_in_one_cpu()
565 of_getintprop_default(dp, "dcache-size", 16 * 1024); in fill_in_one_cpu()
567 of_getintprop_default(dp, "dcache-line-size", 32); in fill_in_one_cpu()
570 of_getintprop_default(dp, "icache-size", 16 * 1024); in fill_in_one_cpu()
572 of_getintprop_default(dp, "icache-line-size", 32); in fill_in_one_cpu()
575 of_getintprop_default(dp, "ecache-size", in fill_in_one_cpu()
578 of_getintprop_default(dp, "ecache-line-size", 64); in fill_in_one_cpu()
581 cpu_data(cpuid).proc_id = -1; in fill_in_one_cpu()