Lines Matching defs:node

137  * based on finding a device tree node with a "device_type" property value
138 * of "tod". If such a node describing tod is not found, for backward
139 * compatibility, a node with a "name" property value of "eeprom" and
141 * node matching either of the above criteria will result in no tod module
210 * Get System clock frequency from root node if it exists.
231 cmn_err(CE_PANIC, "map_wellknown_devices: no i/o bus node");
265 * associated with a node which has a "device_type"
272 cmn_err(CE_CONT, "node %x '%s' prop too "
278 cmn_err(CE_CONT, "node %x '%s' get failed\n",
285 * ...else fall thru and process the node...
354 get_portid(pnode_t node, pnode_t *cmpp)
364 if (GETPROP(node, "portid", (caddr_t)&portid) != -1)
366 if (GETPROP(node, "upa-portid", (caddr_t)&portid) != -1)
368 if (GETPROP(node, "device_type", (caddr_t)&dev_type) == -1)
372 * For a virtual cpu node that is a CMP core, the "portid"
373 * is in the parent node.
374 * For a virtual cpu node that is a CMT strand, the "portid" is
375 * in its grandparent node.
379 cpu_parent = node = prom_parentnode(node);
381 if (node == OBP_NONODE || node == OBP_BADNODE)
383 if (GETPROP(node, "portid", (caddr_t)&portid) != -1) {
388 node = prom_parentnode(node);
441 fill_cpu(pnode_t node)
455 if ((portid = get_portid(node, &cmpnode)) == -1) {
459 if (GETPROP(node, "cpuid", (caddr_t)&cpuid) == -1) {
464 cmn_err(CE_PANIC, "cpu node %x: cpuid %d out of range", node,
471 cpunode->nodeid = node;
482 * For the CMT case, the parent "core" node contains
484 * cpu node.
488 node = cmpnode;
492 (void) GETPROP(node, (cmpnode ? "compatible" : "name"), namebuf);
495 proplen = GETPROPLEN(node, (cmpnode ? "compatible" : "name"));
510 (void) GETPROP(node, "implementation#",
512 (void) GETPROP(node, "mask#", (caddr_t)&cpunode->version);
518 if (GETPROP(node, "clock-frequency", (caddr_t)&clk_freq) == -1) {
520 * If we didn't find it in the CPU node, look in the root node.
537 (void) GETPROP(node, "#itlb-entries", (caddr_t)&tlbsize);
541 (void) GETPROP(node, "#dtlb-entries", (caddr_t)&tlbsize);
552 (void) GETPROP(node, "l3-cache-size", (caddr_t)&size);
554 (void) GETPROP(node, "l2-cache-size", (caddr_t)&size);
559 (void) GETPROP(node, "l3-cache-line-size", (caddr_t)&size);
561 (void) GETPROP(node, "l2-cache-line-size",
567 (void) GETPROP(node, "l2-cache-associativity", (caddr_t)&size);
574 (void) GETPROP(node, "ecache-size", (caddr_t)&size);
579 (void) GETPROP(node, "ecache-line-size", (caddr_t)&size);
584 (void) GETPROP(node, "ecache-associativity", (caddr_t)&size);
592 if (GETPROPLEN(node, "msram") != -1) {
596 if (GETPROPLEN(node, "msram-observed") != -1) {
601 cpu_fiximp(node);
636 * For a virtual cpu node that is a CMP core, the "portid"
637 * is in the parent node.
638 * For a virtual cpu node that is a CMT strand, the "portid" is
639 * in its grandparent node.
659 * A hotplug version of fill_cpu(). (Doesn't assume that there's a node
699 * For the CMT case, the parent "core" node contains
701 * cpu node.
1053 have_sbus(pnode_t node)
1058 size = GETPROPLEN(node, "upa-portid");
1061 if (GETPROP(node, "upa-portid", (caddr_t)&portid) == -1)
1080 have_pci(pnode_t node)
1086 size = GETPROPLEN(node, "portid");
1087 if (size == -1) size = GETPROPLEN(node, "upa-portid");
1093 if (GETPROP(node, "portid", (caddr_t)&portid) == -1)
1094 if (GETPROP(node, "upa-portid", (caddr_t)&portid) == -1)
1105 (void) prom_getprop(node, OBP_COMPATIBLE, compatible);
1117 have_eeprom(pnode_t node)
1124 * property value of "mk48t59" in the "eeprom" node.
1129 if ((GETPROP(node, "model", buf) != -1) &&
1144 if ((size = GETPROPLEN(node, OBP_ADDRESS)) == -1)
1148 if (GETPROP(node, OBP_ADDRESS, (caddr_t)&eaddr) == -1)
1152 * If we have a chosen eeprom and it is not this node, keep looking.
1154 if (chosen_eeprom != NULL && chosen_eeprom != node) {
1171 if (GETPROPLEN(node, WATCHDOG_ENABLE) != -1)
1176 have_rtc(pnode_t node)
1183 * property value of "ds1287" in the "rtc" node.
1188 if (GETPROP(node, "model", buf) != -1) {
1201 if ((size = GETPROPLEN(node, OBP_ADDRESS)) == -1)
1205 if (GETPROP(node, OBP_ADDRESS, (caddr_t)&eaddr) == -1)
1214 if (GETPROPLEN(node, WATCHDOG_ENABLE) != -1)
1219 have_pmc(pnode_t node)
1225 * Watchdog property is in the root node.
1231 * unit 8 of SuperI/O. The address property of the node
1235 if (GETPROP(node, OBP_ADDRESS, (caddr_t)&vaddr) == -1) {
1246 have_auxio(pnode_t node)
1258 * node and stores the first entry in v_auxio_addr which
1261 if ((size = GETPROPLEN(node, OBP_ADDRESS)) == -1)
1273 if (GETPROP(node, OBP_ADDRESS, (caddr_t)addr) == -1)
1280 have_tod(pnode_t node)
1284 if (GETPROP(node, OBP_NAME, (caddr_t)tod_name) == -1)
1287 * This is a node with "device_type" property value of "tod".
1288 * Name of the tod module is the name from the node.