Matthew McClintock wrote: > +static struct property flat_dt_start_prop = { > + .name = "linux,devicetree-start", > + .length = sizeof(phys_addr_t), > + .value =&flat_dt_start, > +}; > + > +static struct property flat_dt_end_prop = { > + .name = "linux,devicetree-end", > + .length = sizeof(phys_addr_t), > + .value =&flat_dt_end, > +};
I think Segher was suggesting that you use "linux,device-tree-xxx". > + > +static int __init export_flat_device_tree_phys_addr(void) > +{ > + struct property *prop; > + struct device_node *node; > + > + node = of_find_node_by_path("/chosen"); > + if (!node) > + return -ENOENT; > + > + prop = of_find_property(node, "linux,devicetree-start", NULL); Does this work? prop = of_find_property(node, flat_dt_start_prop.name, NULL); > + if (prop) > + prom_remove_property(node, prop); > + > + prop = of_find_property(node, "linux,devicetree-end", NULL); > + if (prop) > + prom_remove_property(node, prop); > + > + flat_dt_start = virt_to_phys(initial_boot_params); > + flat_dt_end = virt_to_phys(initial_boot_params) > + + initial_boot_params->totalsize; This is better, I think: flat_dt_end = flat_dt_start + initial_boot_params->totalsize; -- Timur Tabi Linux kernel developer
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev