Lines Matching refs:dn
560 static int add_usable_mem_property(void *fdt, struct device_node *dn, in add_usable_mem_property() argument
569 of_node_get(dn); in add_usable_mem_property()
571 if (snprintf(path, NODE_PATH_LEN, "%pOF", dn) > (NODE_PATH_LEN - 1)) { in add_usable_mem_property()
573 NODE_PATH_LEN, dn); in add_usable_mem_property()
587 n_mem_addr_cells = of_n_addr_cells(dn); in add_usable_mem_property()
588 n_mem_size_cells = of_n_size_cells(dn); in add_usable_mem_property()
598 prop = of_get_property(dn, "reg", &len); in add_usable_mem_property()
636 of_node_put(dn); in add_usable_mem_property()
653 struct device_node *dn; in update_usable_mem_fdt() local
677 dn = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); in update_usable_mem_fdt()
678 if (dn) { in update_usable_mem_fdt()
679 ret = walk_drmem_lmbs(dn, &um_info, kdump_setup_usable_lmb); in update_usable_mem_fdt()
680 of_node_put(dn); in update_usable_mem_fdt()
699 for_each_node_by_type(dn, "memory") { in update_usable_mem_fdt()
700 ret = add_usable_mem_property(fdt, dn, &um_info); in update_usable_mem_fdt()
703 dn->full_name); in update_usable_mem_fdt()
704 of_node_put(dn); in update_usable_mem_fdt()
878 struct device_node *dn = NULL; in setup_purgatory_ppc64() local
910 dn = of_find_node_by_path("/ibm,opal"); in setup_purgatory_ppc64()
911 if (dn) { in setup_purgatory_ppc64()
914 of_property_read_u64(dn, "opal-base-address", &val); in setup_purgatory_ppc64()
920 of_property_read_u64(dn, "opal-entry-address", &val); in setup_purgatory_ppc64()
927 of_node_put(dn); in setup_purgatory_ppc64()
964 static int add_node_props(void *fdt, int node_offset, const struct device_node *dn) in add_node_props() argument
969 if (!dn) in add_node_props()
972 for_each_property_of_node(dn, pp) { in add_node_props()
991 struct device_node *cpus_node, *dn; in update_cpus_node() local
1024 for_each_node_by_type(dn, "cpu") { in update_cpus_node()
1025 cpus_subnode_offset = fdt_add_subnode(fdt, cpus_offset, dn->full_name); in update_cpus_node()
1027 pr_err("Unable to add %s subnode: %s\n", dn->full_name, in update_cpus_node()
1033 ret = add_node_props(fdt, cpus_subnode_offset, dn); in update_cpus_node()
1038 of_node_put(dn); in update_cpus_node()
1042 static int copy_property(void *fdt, int node_offset, const struct device_node *dn, in copy_property() argument
1048 prop = of_get_property(dn, propname, &len); in copy_property()
1061 struct device_node *dn; in update_pci_dma_nodes() local
1068 for_each_node_with_property(dn, dmapropname) { in update_pci_dma_nodes()
1069 pci_offset = fdt_subnode_offset(fdt, root_offset, of_node_full_name(dn)); in update_pci_dma_nodes()
1073 ret = copy_property(fdt, pci_offset, dn, "ibm,dma-window"); in update_pci_dma_nodes()
1076 ret = copy_property(fdt, pci_offset, dn, dmapropname); in update_pci_dma_nodes()