/arch/powerpc/platforms/pseries/ |
D | eeh.c | 135 struct device_node *dn = eeh_dev_to_of_node(edev); in eeh_gather_pci_data() local 141 n += scnprintf(buf+n, len-n, "%s\n", dn->full_name); in eeh_gather_pci_data() 142 printk(KERN_WARNING "EEH: of node=%s\n", dn->full_name); in eeh_gather_pci_data() 144 eeh_ops->read_config(dn, PCI_VENDOR_ID, 4, &cfg); in eeh_gather_pci_data() 148 eeh_ops->read_config(dn, PCI_COMMAND, 4, &cfg); in eeh_gather_pci_data() 159 eeh_ops->read_config(dn, PCI_SEC_STATUS, 2, &cfg); in eeh_gather_pci_data() 163 eeh_ops->read_config(dn, PCI_BRIDGE_CONTROL, 2, &cfg); in eeh_gather_pci_data() 171 eeh_ops->read_config(dn, cap, 4, &cfg); in eeh_gather_pci_data() 175 eeh_ops->read_config(dn, cap+4, 4, &cfg); in eeh_gather_pci_data() 188 eeh_ops->read_config(dn, cap+4*i, 4, &cfg); in eeh_gather_pci_data() [all …]
|
D | dlpar.c | 69 struct device_node *dn; in dlpar_parse_cc_node() local 72 dn = kzalloc(sizeof(*dn), GFP_KERNEL); in dlpar_parse_cc_node() 73 if (!dn) in dlpar_parse_cc_node() 81 dn->full_name = kasprintf(GFP_KERNEL, "/%s", name); in dlpar_parse_cc_node() 82 if (!dn->full_name) { in dlpar_parse_cc_node() 83 kfree(dn); in dlpar_parse_cc_node() 87 return dn; in dlpar_parse_cc_node() 90 static void dlpar_free_one_cc_node(struct device_node *dn) in dlpar_free_one_cc_node() argument 94 while (dn->properties) { in dlpar_free_one_cc_node() 95 prop = dn->properties; in dlpar_free_one_cc_node() [all …]
|
D | eeh_dev.c | 52 void * __devinit eeh_dev_init(struct device_node *dn, void *data) in eeh_dev_init() argument 65 PCI_DN(dn)->edev = edev; in eeh_dev_init() 66 edev->dn = dn; in eeh_dev_init() 81 struct device_node *dn = phb->dn; in eeh_dev_phb_init_dynamic() local 84 eeh_dev_init(dn, phb); in eeh_dev_phb_init_dynamic() 87 traverse_pci_devices(dn, eeh_dev_init, phb); in eeh_dev_phb_init_dynamic()
|
D | msi.c | 30 struct device_node *dn; in get_pdn() local 33 dn = pci_device_to_OF_node(pdev); in get_pdn() 34 if (!dn) { in get_pdn() 39 pdn = PCI_DN(dn); in get_pdn() 149 struct device_node *dn; in check_req() local 157 dn = pdn->node; in check_req() 159 req_msi = of_get_property(dn, prop_name, NULL); in check_req() 161 pr_debug("rtas_msi: No %s on %s\n", prop_name, dn->full_name); in check_req() 191 struct device_node *dn; in find_pe_total_msi() local 194 dn = of_node_get(pci_device_to_OF_node(dev)); in find_pe_total_msi() [all …]
|
D | pci_dlpar.c | 37 struct device_node *dn) in find_bus_among_children() argument 44 if (busdn == dn) in find_bus_among_children() 48 child = find_bus_among_children(pci_bus_b(tmp), dn); in find_bus_among_children() 56 pcibios_find_pci_bus(struct device_node *dn) in pcibios_find_pci_bus() argument 58 struct pci_dn *pdn = dn->data; in pcibios_find_pci_bus() 63 return find_bus_among_children(pdn->phb->bus, dn); in pcibios_find_pci_bus() 106 struct device_node *dn = pci_bus_to_OF_node(bus); in pcibios_add_pci_devices() local 108 eeh_add_device_tree_early(dn); in pcibios_add_pci_devices() 116 of_rescan_bus(dn, bus); in pcibios_add_pci_devices() 119 slotno = PCI_SLOT(PCI_DN(dn->child)->devfn); in pcibios_add_pci_devices() [all …]
|
D | mobility.c | 56 struct device_node *dn; in delete_dt_node() local 58 dn = of_find_node_by_phandle(phandle); in delete_dt_node() 59 if (!dn) in delete_dt_node() 62 dlpar_detach_node(dn); in delete_dt_node() 66 static int update_dt_property(struct device_node *dn, struct property **prop, in update_dt_property() argument 120 old_prop = of_find_property(dn, new_prop->name, NULL); in update_dt_property() 122 prom_update_property(dn, new_prop, old_prop); in update_dt_property() 124 prom_add_property(dn, new_prop); in update_dt_property() 135 struct device_node *dn; in update_dt_node() local 150 dn = of_find_node_by_phandle(phandle); in update_dt_node() [all …]
|
D | eeh_pseries.c | 142 static int pseries_eeh_set_option(struct device_node *dn, int option) in pseries_eeh_set_option() argument 149 edev = of_node_to_eeh_dev(dn); in pseries_eeh_set_option() 160 reg = of_get_property(dn, "reg", NULL); in pseries_eeh_set_option() 197 static int pseries_eeh_get_pe_addr(struct device_node *dn) in pseries_eeh_get_pe_addr() argument 203 edev = of_node_to_eeh_dev(dn); in pseries_eeh_get_pe_addr() 223 __func__, dn->full_name); in pseries_eeh_get_pe_addr() 236 __func__, dn->full_name); in pseries_eeh_get_pe_addr() 259 static int pseries_eeh_get_state(struct device_node *dn, int *state) in pseries_eeh_get_state() argument 268 edev = of_node_to_eeh_dev(dn); in pseries_eeh_get_state() 339 static int pseries_eeh_reset(struct device_node *dn, int option) in pseries_eeh_reset() argument [all …]
|
D | iommu.c | 459 struct device_node *dn, in iommu_table_setparms() argument 466 node = phb->dn; in iommu_table_setparms() 472 "missing tce entries !\n", dn->full_name); in iommu_table_setparms() 524 struct device_node *dn, in iommu_table_setparms_lpar() argument 530 of_parse_dma_window(dn, dma_window, &tbl->it_index, &offset, &size); in iommu_table_setparms_lpar() 542 struct device_node *dn; in pci_dma_bus_setup_pSeries() local 549 dn = pci_bus_to_OF_node(bus); in pci_dma_bus_setup_pSeries() 551 pr_debug("pci_dma_bus_setup_pSeries: setting up bus %s\n", dn->full_name); in pci_dma_bus_setup_pSeries() 559 pci = PCI_DN(dn); in pci_dma_bus_setup_pSeries() 566 while (isa_dn && isa_dn != dn) in pci_dma_bus_setup_pSeries() [all …]
|
D | pseries_energy.c | 73 struct device_node *dn = NULL; in cpu_to_drc_index() local 79 dn = of_find_node_by_path("/cpus"); in cpu_to_drc_index() 80 if (dn == NULL) in cpu_to_drc_index() 82 indexes = of_get_property(dn, "ibm,drc-indexes", NULL); in cpu_to_drc_index() 97 of_node_put(dn); in cpu_to_drc_index() 106 struct device_node *dn = NULL; in drc_index_to_cpu() local 111 dn = of_find_node_by_path("/cpus"); in drc_index_to_cpu() 112 if (dn == NULL) in drc_index_to_cpu() 114 indexes = of_get_property(dn, "ibm,drc-indexes", NULL); in drc_index_to_cpu() 131 of_node_put(dn); in drc_index_to_cpu()
|
D | eeh_cache.c | 177 struct device_node *dn; in __pci_addr_cache_insert_device() local 181 dn = pci_device_to_OF_node(dev); in __pci_addr_cache_insert_device() 182 if (!dn) { in __pci_addr_cache_insert_device() 187 edev = of_node_to_eeh_dev(dn); in __pci_addr_cache_insert_device() 190 dn->full_name); in __pci_addr_cache_insert_device() 199 pci_name(dev), dn->full_name); in __pci_addr_cache_insert_device() 289 struct device_node *dn; in pci_addr_cache_build() local 298 dn = pci_device_to_OF_node(dev); in pci_addr_cache_build() 299 if (!dn) in pci_addr_cache_build() 302 edev = of_node_to_eeh_dev(dn); in pci_addr_cache_build()
|
/arch/powerpc/kernel/ |
D | pci_dn.c | 39 void * __devinit update_dn_pci_info(struct device_node *dn, void *data) in update_dn_pci_info() argument 43 of_get_property(dn, "ibm,pci-config-space-type", NULL); in update_dn_pci_info() 50 dn->data = pdn; in update_dn_pci_info() 51 pdn->node = dn; in update_dn_pci_info() 56 regs = of_get_property(dn, "reg", NULL); in update_dn_pci_info() 88 struct device_node *dn, *nextdn; in traverse_pci_devices() local 92 for (dn = start->child; dn; dn = nextdn) { in traverse_pci_devices() 97 classp = of_get_property(dn, "class-code", NULL); in traverse_pci_devices() 100 if (pre && ((ret = pre(dn, data)) != NULL)) in traverse_pci_devices() 104 if (dn->child && ((class >> 8) == PCI_CLASS_BRIDGE_PCI || in traverse_pci_devices() [all …]
|
D | prom_parse.c | 10 void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop, in of_parse_dma_window() argument 22 prop = of_get_property(dn, "ibm,#dma-address-cells", NULL); in of_parse_dma_window() 24 prop = of_get_property(dn, "#address-cells", NULL); in of_parse_dma_window() 26 cells = prop ? *(u32 *)prop : of_n_addr_cells(dn); in of_parse_dma_window() 31 prop = of_get_property(dn, "ibm,#dma-size-cells", NULL); in of_parse_dma_window() 32 cells = prop ? *(u32 *)prop : of_n_size_cells(dn); in of_parse_dma_window()
|
D | rtas_pci.c | 49 static inline int config_access_valid(struct pci_dn *dn, int where) in config_access_valid() argument 53 if (where < 4096 && dn->pci_ext_config_space) in config_access_valid() 94 struct device_node *busdn, *dn; in rtas_pci_read_config() local 99 for (dn = busdn->child; dn; dn = dn->sibling) { in rtas_pci_read_config() 100 struct pci_dn *pdn = PCI_DN(dn); in rtas_pci_read_config() 102 && of_device_is_available(dn)) in rtas_pci_read_config() 138 struct device_node *busdn, *dn; in rtas_pci_write_config() local 143 for (dn = busdn->child; dn; dn = dn->sibling) { in rtas_pci_write_config() 144 struct pci_dn *pdn = PCI_DN(dn); in rtas_pci_write_config() 146 && of_device_is_available(dn)) in rtas_pci_write_config() [all …]
|
D | pci_32.c | 113 struct device_node *dn; in pcibios_make_OF_bus_map() local 129 struct device_node* node = hose->dn; in pcibios_make_OF_bus_map() 135 dn = of_find_node_by_path("/"); in pcibios_make_OF_bus_map() 136 map_prop = of_find_property(dn, "pci-OF-bus-map", NULL); in pcibios_make_OF_bus_map() 141 of_node_put(dn); in pcibios_make_OF_bus_map() 200 struct device_node *dn; in pci_create_OF_bus_map() local 205 dn = of_find_node_by_path("/"); in pci_create_OF_bus_map() 206 if (dn) { in pci_create_OF_bus_map() 211 prom_add_property(dn, of_prop); in pci_create_OF_bus_map() 212 of_node_put(dn); in pci_create_OF_bus_map()
|
/arch/powerpc/platforms/wsp/ |
D | setup.c | 19 int wsp_get_chip_id(struct device_node *dn) in wsp_get_chip_id() argument 25 dn = of_node_get(dn); in wsp_get_chip_id() 26 while (dn && !(p = of_get_property(dn, "ibm,wsp-chip-id", NULL))) in wsp_get_chip_id() 27 dn = of_get_next_parent(dn); in wsp_get_chip_id() 29 if (!dn) in wsp_get_chip_id() 33 of_node_put(dn); in wsp_get_chip_id()
|
D | ics.c | 34 struct device_node *dn; member 135 struct device_node *cpu_dn, *dn; in cpus_on_chip() local 150 dn = of_find_node_by_phandle(*prop); in cpus_on_chip() 153 chip = wsp_get_chip_id(dn); in cpus_on_chip() 157 of_node_put(dn); in cpus_on_chip() 375 static int wsp_ics_host_match(struct ics *ics, struct device_node *dn) in wsp_ics_host_match() argument 379 return of_device_is_compatible(dn, "ibm,ppc-xics"); in wsp_ics_host_match() 434 static struct wsp_ics *wsp_ics_find_dn_ics(struct device_node *dn) in wsp_ics_find_dn_ics() argument 439 iparent = of_irq_find_parent(dn); in wsp_ics_find_dn_ics() 446 if(ics_list[i].dn == iparent) in wsp_ics_find_dn_ics() [all …]
|
D | wsp.c | 89 struct device_node *dn; in wsp_halt() local 97 for_each_node_with_property(dn, "scom-controller") { in wsp_halt() 98 if (dn == mine) in wsp_halt() 100 m = scom_map(dn, 0, 1); in wsp_halt()
|
/arch/powerpc/platforms/cell/ |
D | axon_msi.c | 81 void axon_msi_debug_setup(struct device_node *dn, struct axon_msic *msic); 83 static inline void axon_msi_debug_setup(struct device_node *dn, in axon_msi_debug_setup() argument 156 struct device_node *dn, *tmp; in find_msi_translator() local 160 dn = of_node_get(pci_device_to_OF_node(dev)); in find_msi_translator() 161 if (!dn) { in find_msi_translator() 166 for (; dn; dn = of_get_next_parent(dn)) { in find_msi_translator() 167 ph = of_get_property(dn, "msi-translator", NULL); in find_msi_translator() 178 tmp = dn; in find_msi_translator() 179 dn = of_find_node_by_phandle(*ph); in find_msi_translator() 181 if (!dn) { in find_msi_translator() [all …]
|
D | setup.c | 102 if (!of_device_is_compatible(hose->dn, "pciex")) in cell_fixup_pcie_rootcomplex() 106 s = of_get_property(hose->dn, "model", NULL); in cell_fixup_pcie_rootcomplex() 129 np = phb->dn; in cell_setup_phb() 189 struct device_node *dn; in mpic_init_IRQ() local 192 for (dn = NULL; in mpic_init_IRQ() 193 (dn = of_find_node_by_name(dn, "interrupt-controller"));) { in mpic_init_IRQ() 194 if (!of_device_is_compatible(dn, "CBEA,platform-open-pic")) in mpic_init_IRQ() 200 mpic = mpic_alloc(dn, 0, MPIC_SECONDARY | MPIC_NO_RESET, in mpic_init_IRQ()
|
/arch/microblaze/kernel/ |
D | prom_parse.c | 11 void of_parse_dma_window(struct device_node *dn, const void *dma_window_prop, in of_parse_dma_window() argument 23 prop = of_get_property(dn, "ibm,#dma-address-cells", NULL); in of_parse_dma_window() 25 prop = of_get_property(dn, "#address-cells", NULL); in of_parse_dma_window() 27 cells = prop ? *(u32 *)prop : of_n_addr_cells(dn); in of_parse_dma_window() 32 prop = of_get_property(dn, "ibm,#dma-size-cells", NULL); in of_parse_dma_window() 33 cells = prop ? *(u32 *)prop : of_n_size_cells(dn); in of_parse_dma_window()
|
/arch/powerpc/include/asm/ |
D | eeh.h | 57 struct device_node *dn; /* Associated device node */ member 63 return edev->dn; in eeh_dev_to_of_node() 98 int (*set_option)(struct device_node *dn, int option); 99 int (*get_pe_addr)(struct device_node *dn); 100 int (*get_state)(struct device_node *dn, int *state); 101 int (*reset)(struct device_node *dn, int option); 102 int (*wait_state)(struct device_node *dn, int max_wait); 103 int (*get_log)(struct device_node *dn, int severity, char *drv_log, unsigned long len); 104 int (*configure_bridge)(struct device_node *dn); 105 int (*read_config)(struct device_node *dn, int where, int size, u32 *val); [all …]
|
D | pci-bridge.h | 26 struct device_node *dn; member 167 #define PCI_DN(dn) ((struct pci_dn *) (dn)->data) argument 169 extern void * update_dn_pci_info(struct device_node *dn, void *data); 182 static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn) in of_node_to_eeh_dev() argument 189 if (!dn || !PCI_DN(dn)) in of_node_to_eeh_dev() 192 return PCI_DN(dn)->edev; in of_node_to_eeh_dev() 197 extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn);
|
/arch/powerpc/sysdev/ |
D | scom.c | 88 struct device_node *dn; member 103 ent->map = scom_map(ent->dn, val, 1); in scom_addr_set() 146 static int scom_debug_init_one(struct dentry *root, struct device_node *dn, in scom_debug_init_one() argument 156 ent->dn = of_node_get(dn); in scom_debug_init_one() 160 ent->blob.data = dn->full_name; in scom_debug_init_one() 161 ent->blob.size = strlen(dn->full_name); in scom_debug_init_one() 165 of_node_put(dn); in scom_debug_init_one() 179 struct device_node *dn; in scom_debug_init() local 188 for_each_node_with_property(dn, "scom-controller") in scom_debug_init() 189 rc |= scom_debug_init_one(root, dn, i++); in scom_debug_init()
|
/arch/powerpc/platforms/pasemi/ |
D | cpufreq.c | 149 struct device_node *cpu, *dn; in pas_cpufreq_cpu_init() local 157 dn = of_find_compatible_node(NULL, NULL, "1682m-sdc"); in pas_cpufreq_cpu_init() 158 if (!dn) in pas_cpufreq_cpu_init() 159 dn = of_find_compatible_node(NULL, NULL, in pas_cpufreq_cpu_init() 161 if (!dn) in pas_cpufreq_cpu_init() 163 err = of_address_to_resource(dn, 0, &res); in pas_cpufreq_cpu_init() 164 of_node_put(dn); in pas_cpufreq_cpu_init() 173 dn = of_find_compatible_node(NULL, NULL, "1682m-gizmo"); in pas_cpufreq_cpu_init() 174 if (!dn) in pas_cpufreq_cpu_init() 175 dn = of_find_compatible_node(NULL, NULL, in pas_cpufreq_cpu_init() [all …]
|
/arch/x86/kernel/ |
D | devicetree.c | 146 struct device_node *dn; in dtb_setup_hpet() local 150 dn = of_find_compatible_node(NULL, NULL, "intel,ce4100-hpet"); in dtb_setup_hpet() 151 if (!dn) in dtb_setup_hpet() 153 ret = of_address_to_resource(dn, 0, &r); in dtb_setup_hpet() 165 struct device_node *dn; in dtb_lapic_setup() local 169 dn = of_find_compatible_node(NULL, NULL, "intel,ce4100-lapic"); in dtb_lapic_setup() 170 if (!dn) in dtb_lapic_setup() 173 ret = of_address_to_resource(dn, 0, &r); in dtb_lapic_setup() 193 static void __init dtb_add_ioapic(struct device_node *dn) in dtb_add_ioapic() argument 198 ret = of_address_to_resource(dn, 0, &r); in dtb_add_ioapic() [all …]
|