Lines Matching defs:node

644 	phandle node;
646 if ((node = *nodep) != 0
647 && (*nodep = call_prom("child", 1, 1, node)) != 0)
649 if ((*nodep = call_prom("peer", 1, 1, node)) != 0)
652 if ((node = call_prom("parent", 1, 1, node)) == 0)
654 if ((*nodep = call_prom("peer", 1, 1, node)) != 0)
659 static inline int __init prom_getprop(phandle node, const char *pname,
662 return call_prom("getprop", 4, 1, node, ADDR(pname),
666 static inline int __init prom_getproplen(phandle node, const char *pname)
668 return call_prom("getproplen", 2, 1, node, ADDR(pname));
697 static int __init prom_setprop(phandle node, const char *nodename,
703 return call_prom("setprop", 4, 1, node, ADDR(pname),
1227 phandle node;
1231 /* Pick up th first CPU node we can find */
1232 for (node = 0; prom_next_node(&node); ) {
1234 prom_getprop(node, "device_type", type, sizeof(type));
1243 plen = prom_getproplen(node, "ibm,ppc-interrupt-server#s");
1655 phandle node;
1664 * 1) top of RMO (first node)
1678 for (node = 0; prom_next_node(&node); ) {
1680 prom_getprop(node, "device_type", type, sizeof(type));
1685 * on the memory node, so check the name instead...
1687 prom_getprop(node, "name", type, sizeof(type));
1692 plen = prom_getprop(node, "reg", regbuf, sizeof(regbuf));
1694 prom_printf("memory node too large for buffer !\n");
1702 call_prom("package-to-path", 3, 1, node, prom_scratch,
1704 prom_debug(" node %s :\n", prom_scratch);
1984 phandle node;
2004 for (node = 0; prom_next_node(&node); ) {
2008 prom_getprop(node, "compatible",
2010 prom_getprop(node, "device_type", type, sizeof(type));
2011 prom_getprop(node, "model", model, sizeof(model));
2029 if (prom_getprop(node, "tce-table-minalign", &minalign,
2032 if (prom_getprop(node, "tce-table-minsize", &minsize,
2055 if (call_prom("package-to-path", 3, 1, node,
2061 prom_setprop(node, path, "linux,tce-base", &base, sizeof(base));
2062 prom_setprop(node, path, "linux,tce-size", &minsize, sizeof(minsize));
2065 prom_debug("\tnode = 0x%x\n", node);
2132 phandle node;
2168 for (node = 0; prom_next_node(&node); ) {
2173 prom_getprop(node, "device_type", type, sizeof(type));
2178 if (prom_getprop(node, "status", type, sizeof(type)) > 0)
2183 prom_getprop(node, "reg", &reg, sizeof(reg));
2197 call_prom("start-cpu", 3, 0, node,
2384 phandle node;
2409 for (node = 0; prom_next_node(&node); ) {
2411 prom_getprop(node, "device_type", type, sizeof(type));
2423 if (call_prom("package-to-path", 3, 1, node, path,
2436 prom_setprop(node, path, "linux,opened", NULL, 0);
2455 if (prom_getprop(node, "linux,boot-display", NULL, 0) !=
2461 if (prom_getprop(node, "width", &width, 4) == PROM_ERROR)
2464 if (prom_getprop(node, "height", &height, 4) == PROM_ERROR)
2467 if (prom_getprop(node, "linebytes", &pitch, 4) == PROM_ERROR)
2470 if (prom_getprop(node, "address", &addr, 4) == PROM_ERROR)
2539 static void __init scan_dt_build_strings(phandle node,
2554 if (call_prom("nextprop", 3, 1, node, prev_name, namep) != 1) {
2580 child = call_prom("child", 1, 1, node);
2587 static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start,
2599 /* get the node's full name */
2604 l = call_prom("package-to-path", 3, 1, node, namep, room);
2610 call_prom("package-to-path", 3, 1, node, namep, l);
2631 call_prom("package-to-path", 3, 1, node, path, sizeof(prom_scratch) - 1);
2637 if (call_prom("nextprop", 3, 1, node, prev_name,
2651 " <%s>, node %s\n", pname, path);
2657 l = call_prom("getproplen", 2, 1, node, pname);
2670 call_prom("getprop", 4, 1, node, pname, valp, l);
2681 prom_printf("WARNING: Can't find string index for <phandle> node %s\n", path);
2687 *(__be32 *)valp = cpu_to_be32(node);
2692 child = call_prom("child", 1, 1, node);
2881 * Pegasos and BriQ lacks the "ranges" property in the isa node
2983 * ethernet node.
2987 u32 node;
2992 node = call_prom("finddevice", 1, 1, ADDR("/builtin/ethernet"));
2993 if (!PHANDLE_VALID(node))
2997 rv = prom_getprop(node, "phy-handle", prop, sizeof(prop));
3003 * Now we need to add the missing phy node and linkage
3006 /* Check for an MDIO bus node - if missing then create one */
3007 node = call_prom("finddevice", 1, 1, ADDR("/builtin/mdio"));
3008 if (!PHANDLE_VALID(node)) {
3009 prom_printf("Adding Ethernet MDIO node\n");
3026 /* Check for a PHY device node - if missing then create one and
3027 * give it's phandle to the ethernet node */
3028 node = call_prom("finddevice", 1, 1,
3030 if (!PHANDLE_VALID(node)) {
3031 prom_printf("Adding Ethernet PHY node\n");
3054 u32 node;
3059 node = call_prom("finddevice", 1, 1, ADDR("/"));
3060 if (!PHANDLE_VALID(node))
3063 rv = prom_getprop(node, "model", prop, sizeof(prop));
3072 node = call_prom("finddevice", 1, 1, ADDR("/"));
3073 rv = prom_getprop(node, "device_type", prop, sizeof(prop));
3075 prom_setprop(node, "/", "device_type", "efika", sizeof("efika"));
3079 rv = prom_getprop(node, "CODEGEN,description", prop, sizeof(prop));
3081 prom_setprop(node, "/", "CODEGEN,description",
3086 node = call_prom("finddevice", 1, 1, ADDR("/builtin/bestcomm"));
3087 if (PHANDLE_VALID(node)) {
3088 len = prom_getproplen(node, "interrupts");
3091 prom_setprop(node, "/builtin/bestcom", "interrupts",
3097 node = call_prom("finddevice", 1, 1, ADDR("/builtin/sound"));
3098 if (PHANDLE_VALID(node)) {
3099 rv = prom_getprop(node, "interrupts", prop, sizeof(prop));
3102 prom_setprop(node, "/builtin/sound", "interrupts",
3125 phandle iob, node;
3127 /* Find the root pci node */
3133 /* check if interrupt-controller node set yet */
3142 node = call_prom("finddevice", 1, 1, ADDR(pci_name));
3145 for( ; prom_next_node(&node); ) {
3146 /* scan each node for one with an interrupt */
3147 if (!PHANDLE_VALID(node))
3150 rval = prom_getproplen(node, "interrupts");
3154 prom_getprop(node, "interrupts", &interrupts, sizeof(interrupts));
3158 /* found a node, update both interrupts and interrupt-parent */
3168 prom_setprop(node, pci_name, "interrupts", interrupts,
3170 prom_setprop(node, pci_name, "interrupt-parent", &parent,
3186 prom_printf("Changing device_type of SB600 node...\n");
3325 * Init interface to Open Firmware, get some node references,