• Home
  • Raw
  • Download

Lines Matching full:dn

33 static void pnv_php_register(struct device_node *dn);
34 static void pnv_php_unregister_one(struct device_node *dn);
35 static void pnv_php_unregister(struct device_node *dn);
89 static struct pnv_php_slot *pnv_php_match(struct device_node *dn, in pnv_php_match() argument
94 if (php_slot->dn == dn) { in pnv_php_match()
100 target = pnv_php_match(dn, tmp); in pnv_php_match()
108 struct pnv_php_slot *pnv_php_find_slot(struct device_node *dn) in pnv_php_find_slot() argument
115 php_slot = pnv_php_match(dn, tmp); in pnv_php_find_slot()
131 static void pnv_php_rmv_pdns(struct device_node *dn) in pnv_php_rmv_pdns() argument
135 for_each_child_of_node(dn, child) { in pnv_php_rmv_pdns()
155 struct device_node *dn; in pnv_php_detach_device_nodes() local
157 for_each_child_of_node(parent, dn) { in pnv_php_detach_device_nodes()
158 pnv_php_detach_device_nodes(dn); in pnv_php_detach_device_nodes()
160 of_node_put(dn); in pnv_php_detach_device_nodes()
161 of_detach_node(dn); in pnv_php_detach_device_nodes()
167 pnv_php_rmv_pdns(php_slot->dn); in pnv_php_rmv_devtree()
175 pnv_php_detach_device_nodes(php_slot->dn); in pnv_php_rmv_devtree()
181 php_slot->dn->child = NULL; in pnv_php_rmv_devtree()
212 struct device_node *dn) in pnv_php_populate_changeset() argument
217 for_each_child_of_node(dn, child) { in pnv_php_populate_changeset()
234 static void *pnv_php_add_one_pdn(struct device_node *dn, void *data) in pnv_php_add_one_pdn() argument
239 pdn = pci_add_device_node_info(hose, dn); in pnv_php_add_one_pdn()
250 pci_traverse_device_nodes(slot->dn, pnv_php_add_one_pdn, hose); in pnv_php_add_pdns()
268 ret = pnv_pci_get_device_tree(php_slot->dn->phandle, fdt1, 0x10000); in pnv_php_add_devtree()
281 dt = of_fdt_unflatten_tree(fdt, php_slot->dn, NULL); in pnv_php_add_devtree()
290 pnv_php_reverse_nodes(php_slot->dn); in pnv_php_add_devtree()
291 ret = pnv_php_populate_changeset(&php_slot->ocs, php_slot->dn); in pnv_php_add_devtree()
293 pnv_php_reverse_nodes(php_slot->dn); in pnv_php_add_devtree()
299 php_slot->dn->child = NULL; in pnv_php_add_devtree()
317 php_slot->dn->child = NULL; in pnv_php_add_devtree()
340 if (be64_to_cpu(msg.params[1]) != php_slot->dn->phandle || in pnv_php_set_slot_power_state()
520 pnv_php_register(php_slot->dn); in pnv_php_enable()
586 pnv_php_unregister(php_slot->dn); in pnv_php_disable_slot()
619 static struct pnv_php_slot *pnv_php_alloc_slot(struct device_node *dn) in pnv_php_alloc_slot() argument
627 ret = of_property_read_string(dn, "ibm,slot-label", &label); in pnv_php_alloc_slot()
631 if (pnv_pci_get_slot_id(dn, &id)) in pnv_php_alloc_slot()
634 bus = pci_find_bus_by_node(dn); in pnv_php_alloc_slot()
648 if (dn->child && PCI_DN(dn->child)) in pnv_php_alloc_slot()
649 php_slot->slot_no = PCI_SLOT(PCI_DN(dn->child)->devfn); in pnv_php_alloc_slot()
655 php_slot->dn = dn; in pnv_php_alloc_slot()
671 struct device_node *dn = php_slot->dn; in pnv_php_register_slot() local
676 parent = pnv_php_find_slot(php_slot->dn); in pnv_php_register_slot()
691 while ((dn = of_get_parent(dn))) { in pnv_php_register_slot()
692 if (!PCI_DN(dn)) { in pnv_php_register_slot()
693 of_node_put(dn); in pnv_php_register_slot()
697 parent = pnv_php_find_slot(dn); in pnv_php_register_slot()
699 of_node_put(dn); in pnv_php_register_slot()
703 of_node_put(dn); in pnv_php_register_slot()
853 ret = of_property_read_u32(php_slot->dn, "ibm,slot-broken-pdc", in pnv_php_init_irq()
931 static int pnv_php_register_one(struct device_node *dn) in pnv_php_register_one() argument
938 ret = of_property_read_u32(dn, "ibm,slot-pluggable", &prop32); in pnv_php_register_one()
942 ret = of_property_read_u32(dn, "ibm,reset-by-firmware", &prop32); in pnv_php_register_one()
946 php_slot = pnv_php_alloc_slot(dn); in pnv_php_register_one()
959 ret = of_property_read_u32(dn, "ibm,slot-surprise-pluggable", &prop32); in pnv_php_register_one()
966 pnv_php_unregister_one(php_slot->dn); in pnv_php_register_one()
972 static void pnv_php_register(struct device_node *dn) in pnv_php_register() argument
980 for_each_child_of_node(dn, child) { in pnv_php_register()
986 static void pnv_php_unregister_one(struct device_node *dn) in pnv_php_unregister_one() argument
990 php_slot = pnv_php_find_slot(dn); in pnv_php_unregister_one()
1000 static void pnv_php_unregister(struct device_node *dn) in pnv_php_unregister() argument
1005 for_each_child_of_node(dn, child) { in pnv_php_unregister()
1013 struct device_node *dn; in pnv_php_init() local
1016 for_each_compatible_node(dn, NULL, "ibm,ioda2-phb") in pnv_php_init()
1017 pnv_php_register(dn); in pnv_php_init()
1019 for_each_compatible_node(dn, NULL, "ibm,ioda3-phb") in pnv_php_init()
1020 pnv_php_register(dn); in pnv_php_init()
1022 for_each_compatible_node(dn, NULL, "ibm,ioda2-npu2-opencapi-phb") in pnv_php_init()
1023 pnv_php_register_one(dn); /* slot directly under the PHB */ in pnv_php_init()
1029 struct device_node *dn; in pnv_php_exit() local
1031 for_each_compatible_node(dn, NULL, "ibm,ioda2-phb") in pnv_php_exit()
1032 pnv_php_unregister(dn); in pnv_php_exit()
1034 for_each_compatible_node(dn, NULL, "ibm,ioda3-phb") in pnv_php_exit()
1035 pnv_php_unregister(dn); in pnv_php_exit()
1037 for_each_compatible_node(dn, NULL, "ibm,ioda2-npu2-opencapi-phb") in pnv_php_exit()
1038 pnv_php_unregister_one(dn); /* slot directly under the PHB */ in pnv_php_exit()