···11-#ifndef _PPC64_PSERIES_RECONFIG_H22-#define _PPC64_PSERIES_RECONFIG_H33-#ifdef __KERNEL__44-55-#include <linux/notifier.h>66-77-/*88- * Use this API if your code needs to know about OF device nodes being99- * added or removed on pSeries systems.1010- */1111-1212-#define PSERIES_RECONFIG_ADD 0x00011313-#define PSERIES_RECONFIG_REMOVE 0x00021414-#define PSERIES_DRCONF_MEM_ADD 0x00031515-#define PSERIES_DRCONF_MEM_REMOVE 0x00041616-#define PSERIES_UPDATE_PROPERTY 0x00051717-1818-/**1919- * pSeries_reconfig_notify - Notifier value structure for OFDT property updates2020- *2121- * @node: Device tree node which owns the property being updated2222- * @property: Updated property2323- */2424-struct pSeries_reconfig_prop_update {2525- struct device_node *node;2626- struct property *property;2727-};2828-2929-#ifdef CONFIG_PPC_PSERIES3030-extern int pSeries_reconfig_notifier_register(struct notifier_block *);3131-extern void pSeries_reconfig_notifier_unregister(struct notifier_block *);3232-extern int pSeries_reconfig_notify(unsigned long action, void *p);3333-/* Not the best place to put this, will be fixed when we move some3434- * of the rtas suspend-me stuff to pseries */3535-extern void pSeries_coalesce_init(void);3636-#else /* !CONFIG_PPC_PSERIES */3737-static inline int pSeries_reconfig_notifier_register(struct notifier_block *nb)3838-{3939- return 0;4040-}4141-static inline void pSeries_reconfig_notifier_unregister(struct notifier_block *nb) { }4242-static inline void pSeries_coalesce_init(void) { }4343-#endif /* CONFIG_PPC_PSERIES */4444-4545-4646-#endif /* __KERNEL__ */4747-#endif /* _PPC64_PSERIES_RECONFIG_H */
+16
arch/powerpc/include/asm/prom.h
···58585959extern void of_instantiate_rtc(void);60606161+/* The of_drconf_cell struct defines the layout of the LMB array6262+ * specified in the device tree property6363+ * ibm,dynamic-reconfiguration-memory/ibm,dynamic-memory6464+ */6565+struct of_drconf_cell {6666+ u64 base_addr;6767+ u32 drc_index;6868+ u32 reserved;6969+ u32 aa_index;7070+ u32 flags;7171+};7272+7373+#define DRCONF_MEM_ASSIGNED 0x000000087474+#define DRCONF_MEM_AI_INVALID 0x000000407575+#define DRCONF_MEM_RESERVED 0x000000807676+6177/* These includes are put at the bottom because they may contain things6278 * that are overridden by this file. Ideally they shouldn't be included6379 * by this file, but there are a bunch of .c files that currently depend
+5
arch/powerpc/include/asm/rtas.h
···353353 return 1;354354 return 0;355355}356356+357357+/* Not the best place to put pSeries_coalesce_init, will be fixed when we358358+ * move some of the rtas suspend-me stuff to pseries */359359+extern void pSeries_coalesce_init(void);356360#else357361static inline int page_is_rtas_user_buf(unsigned long pfn) { return 0;}362362+static inline void pSeries_coalesce_init(void) { }358363#endif359364360365extern int call_rtas(const char *, int, int, unsigned long *, ...);
+7-7
arch/powerpc/kernel/machine_kexec.c
···218218 * be sure what's in them, so remove them. */219219 prop = of_find_property(node, "linux,crashkernel-base", NULL);220220 if (prop)221221- prom_remove_property(node, prop);221221+ of_remove_property(node, prop);222222223223 prop = of_find_property(node, "linux,crashkernel-size", NULL);224224 if (prop)225225- prom_remove_property(node, prop);225225+ of_remove_property(node, prop);226226227227 if (crashk_res.start != 0) {228228- prom_add_property(node, &crashk_base_prop);228228+ of_add_property(node, &crashk_base_prop);229229 crashk_size = resource_size(&crashk_res);230230- prom_add_property(node, &crashk_size_prop);230230+ of_add_property(node, &crashk_size_prop);231231 }232232233233 /*234234 * memory_limit is required by the kexec-tools to limit the235235 * crash regions to the actual memory used.236236 */237237- prom_update_property(node, &memory_limit_prop);237237+ of_update_property(node, &memory_limit_prop);238238}239239240240static int __init kexec_setup(void)···249249 /* remove any stale properties so ours can be found */250250 prop = of_find_property(node, kernel_end_prop.name, NULL);251251 if (prop)252252- prom_remove_property(node, prop);252252+ of_remove_property(node, prop);253253254254 /* information needed by userspace when using default_machine_kexec */255255 kernel_end = __pa(_end);256256- prom_add_property(node, &kernel_end_prop);256256+ of_add_property(node, &kernel_end_prop);257257258258 export_crashk_values(node);259259
+4-4
arch/powerpc/kernel/machine_kexec_64.c
···389389 /* remove any stale propertys so ours can be found */390390 prop = of_find_property(node, htab_base_prop.name, NULL);391391 if (prop)392392- prom_remove_property(node, prop);392392+ of_remove_property(node, prop);393393 prop = of_find_property(node, htab_size_prop.name, NULL);394394 if (prop)395395- prom_remove_property(node, prop);395395+ of_remove_property(node, prop);396396397397 htab_base = __pa(htab_address);398398- prom_add_property(node, &htab_base_prop);399399- prom_add_property(node, &htab_size_prop);398398+ of_add_property(node, &htab_base_prop);399399+ of_add_property(node, &htab_size_prop);400400401401 of_node_put(node);402402 return 0;
···399399 return result;400400}401401402402-struct of_drconf_cell {403403- u64 base_addr;404404- u32 drc_index;405405- u32 reserved;406406- u32 aa_index;407407- u32 flags;408408-};409409-410410-#define DRCONF_MEM_ASSIGNED 0x00000008411411-#define DRCONF_MEM_AI_INVALID 0x00000040412412-#define DRCONF_MEM_RESERVED 0x00000080413413-414402/*415403 * Read the next memblock list entry from the ibm,dynamic-memory property416404 * and return the information in the provided of_drconf_cell structure.
+3-3
arch/powerpc/platforms/85xx/p1022_ds.c
···539539 };540540541541 /*542542- * prom_update_property() is called before542542+ * of_update_property() is called before543543 * kmalloc() is available, so the 'new' object544544 * should be allocated in the global area.545545 * The easiest way is to do that is to···548548 */549549 pr_info("p1022ds: disabling %s node",550550 np2->full_name);551551- prom_update_property(np2, &nor_status);551551+ of_update_property(np2, &nor_status);552552 of_node_put(np2);553553 }554554···564564565565 pr_info("p1022ds: disabling %s node",566566 np2->full_name);567567- prom_update_property(np2, &nand_status);567567+ of_update_property(np2, &nand_status);568568 of_node_put(np2);569569 }570570
+3-3
arch/powerpc/platforms/ps3/os-area.c
···280280281281 if (tmp) {282282 pr_debug("%s:%d found %s\n", __func__, __LINE__, prop->name);283283- prom_remove_property(node, tmp);283283+ of_remove_property(node, tmp);284284 }285285286286- result = prom_add_property(node, prop);286286+ result = of_add_property(node, prop);287287288288 if (result)289289- pr_debug("%s:%d prom_set_property failed\n", __func__,289289+ pr_debug("%s:%d of_set_property failed\n", __func__,290290 __LINE__);291291}292292
+6-28
arch/powerpc/platforms/pseries/dlpar.c
···1313#include <linux/kernel.h>1414#include <linux/kref.h>1515#include <linux/notifier.h>1616-#include <linux/proc_fs.h>1716#include <linux/spinlock.h>1817#include <linux/cpu.h>1918#include <linux/slab.h>1919+#include <linux/of.h>2020#include "offline_states.h"21212222#include <asm/prom.h>2323#include <asm/machdep.h>2424#include <asm/uaccess.h>2525#include <asm/rtas.h>2626-#include <asm/pSeries_reconfig.h>27262827struct cc_workarea {2928 u32 drc_index;···254255255256int dlpar_attach_node(struct device_node *dn)256257{257257-#ifdef CONFIG_PROC_DEVICETREE258258- struct proc_dir_entry *ent;259259-#endif260258 int rc;261259262260 of_node_set_flag(dn, OF_DYNAMIC);···262266 if (!dn->parent)263267 return -ENOMEM;264268265265- rc = pSeries_reconfig_notify(PSERIES_RECONFIG_ADD, dn);269269+ rc = of_attach_node(dn);266270 if (rc) {267271 printk(KERN_ERR "Failed to add device node %s\n",268272 dn->full_name);269273 return rc;270274 }271271-272272- of_attach_node(dn);273273-274274-#ifdef CONFIG_PROC_DEVICETREE275275- ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde);276276- if (ent)277277- proc_device_tree_add_node(dn, ent);278278-#endif279275280276 of_node_put(dn->parent);281277 return 0;···275287276288int dlpar_detach_node(struct device_node *dn)277289{278278-#ifdef CONFIG_PROC_DEVICETREE279279- struct device_node *parent = dn->parent;280280- struct property *prop = dn->properties;290290+ int rc;281291282282- while (prop) {283283- remove_proc_entry(prop->name, dn->pde);284284- prop = prop->next;285285- }292292+ rc = of_detach_node(dn);293293+ if (rc)294294+ return rc;286295287287- if (dn->pde)288288- remove_proc_entry(dn->pde->name, parent->pde);289289-#endif290290-291291- pSeries_reconfig_notify(PSERIES_RECONFIG_REMOVE, dn);292292- of_detach_node(dn);293296 of_node_put(dn); /* Must decrement the refcount */294294-295297 return 0;296298}297299
+4-4
arch/powerpc/platforms/pseries/hotplug-cpu.c
···2323#include <linux/delay.h>2424#include <linux/sched.h> /* for idle_task_exit */2525#include <linux/cpu.h>2626+#include <linux/of.h>2627#include <asm/prom.h>2728#include <asm/rtas.h>2829#include <asm/firmware.h>2930#include <asm/machdep.h>3031#include <asm/vdso_datapage.h>3131-#include <asm/pSeries_reconfig.h>3232#include <asm/xics.h>3333#include "plpar_wrappers.h"3434#include "offline_states.h"···333333 int err = 0;334334335335 switch (action) {336336- case PSERIES_RECONFIG_ADD:336336+ case OF_RECONFIG_ATTACH_NODE:337337 err = pseries_add_processor(node);338338 break;339339- case PSERIES_RECONFIG_REMOVE:339339+ case OF_RECONFIG_DETACH_NODE:340340 pseries_remove_processor(node);341341 break;342342 }···399399400400 /* Processors can be added/removed only on LPAR */401401 if (firmware_has_feature(FW_FEATURE_LPAR)) {402402- pSeries_reconfig_notifier_register(&pseries_smp_nb);402402+ of_reconfig_notifier_register(&pseries_smp_nb);403403 cpu_maps_update_begin();404404 if (cede_offline_enabled && parse_cede_parameters() == 0) {405405 default_offline_state = CPU_STATE_INACTIVE;
+43-17
arch/powerpc/platforms/pseries/hotplug-memory.c
···16161717#include <asm/firmware.h>1818#include <asm/machdep.h>1919-#include <asm/pSeries_reconfig.h>2019#include <asm/sparsemem.h>21202221static unsigned long get_memblock_size(void)···186187 return (ret < 0) ? -EINVAL : 0;187188}188189189189-static int pseries_drconf_memory(unsigned long *base, unsigned int action)190190+static int pseries_update_drconf_memory(struct of_prop_reconfig *pr)190191{192192+ struct of_drconf_cell *new_drmem, *old_drmem;191193 unsigned long memblock_size;192192- int rc;194194+ u32 entries;195195+ u32 *p;196196+ int i, rc = -EINVAL;193197194198 memblock_size = get_memblock_size();195199 if (!memblock_size)196200 return -EINVAL;197201198198- if (action == PSERIES_DRCONF_MEM_ADD) {199199- rc = memblock_add(*base, memblock_size);200200- rc = (rc < 0) ? -EINVAL : 0;201201- } else if (action == PSERIES_DRCONF_MEM_REMOVE) {202202- rc = pseries_remove_memblock(*base, memblock_size);203203- } else {204204- rc = -EINVAL;202202+ p = (u32 *)of_get_property(pr->dn, "ibm,dynamic-memory", NULL);203203+ if (!p)204204+ return -EINVAL;205205+206206+ /* The first int of the property is the number of lmb's described207207+ * by the property. This is followed by an array of of_drconf_cell208208+ * entries. Get the niumber of entries and skip to the array of209209+ * of_drconf_cell's.210210+ */211211+ entries = *p++;212212+ old_drmem = (struct of_drconf_cell *)p;213213+214214+ p = (u32 *)pr->prop->value;215215+ p++;216216+ new_drmem = (struct of_drconf_cell *)p;217217+218218+ for (i = 0; i < entries; i++) {219219+ if ((old_drmem[i].flags & DRCONF_MEM_ASSIGNED) &&220220+ (!(new_drmem[i].flags & DRCONF_MEM_ASSIGNED))) {221221+ rc = pseries_remove_memblock(old_drmem[i].base_addr,222222+ memblock_size);223223+ break;224224+ } else if ((!(old_drmem[i].flags & DRCONF_MEM_ASSIGNED)) &&225225+ (new_drmem[i].flags & DRCONF_MEM_ASSIGNED)) {226226+ rc = memblock_add(old_drmem[i].base_addr,227227+ memblock_size);228228+ rc = (rc < 0) ? -EINVAL : 0;229229+ break;230230+ }205231 }206232207233 return rc;208234}209235210236static int pseries_memory_notifier(struct notifier_block *nb,211211- unsigned long action, void *node)237237+ unsigned long action, void *node)212238{239239+ struct of_prop_reconfig *pr;213240 int err = 0;214241215242 switch (action) {216216- case PSERIES_RECONFIG_ADD:243243+ case OF_RECONFIG_ATTACH_NODE:217244 err = pseries_add_memory(node);218245 break;219219- case PSERIES_RECONFIG_REMOVE:246246+ case OF_RECONFIG_DETACH_NODE:220247 err = pseries_remove_memory(node);221248 break;222222- case PSERIES_DRCONF_MEM_ADD:223223- case PSERIES_DRCONF_MEM_REMOVE:224224- err = pseries_drconf_memory(node, action);249249+ case OF_RECONFIG_UPDATE_PROPERTY:250250+ pr = (struct of_prop_reconfig *)node;251251+ if (!strcmp(pr->prop->name, "ibm,dynamic-memory"))252252+ err = pseries_update_drconf_memory(pr);225253 break;226254 }227255 return notifier_from_errno(err);···261235static int __init pseries_memory_hotplug_init(void)262236{263237 if (firmware_has_feature(FW_FEATURE_LPAR))264264- pSeries_reconfig_notifier_register(&pseries_mem_nb);238238+ of_reconfig_notifier_register(&pseries_mem_nb);265239266240 return 0;267241}
+5-5
arch/powerpc/platforms/pseries/iommu.c
···3636#include <linux/dma-mapping.h>3737#include <linux/crash_dump.h>3838#include <linux/memory.h>3939+#include <linux/of.h>3940#include <asm/io.h>4041#include <asm/prom.h>4142#include <asm/rtas.h>4243#include <asm/iommu.h>4344#include <asm/pci-bridge.h>4445#include <asm/machdep.h>4545-#include <asm/pSeries_reconfig.h>4646#include <asm/firmware.h>4747#include <asm/tce.h>4848#include <asm/ppc-pci.h>···760760 __remove_ddw(np, ddw_avail, liobn);761761762762delprop:763763- ret = prom_remove_property(np, win64);763763+ ret = of_remove_property(np, win64);764764 if (ret)765765 pr_warning("%s: failed to remove direct window property: %d\n",766766 np->full_name, ret);···10701070 goto out_free_window;10711071 }1072107210731073- ret = prom_add_property(pdn, win64);10731073+ ret = of_add_property(pdn, win64);10741074 if (ret) {10751075 dev_err(&dev->dev, "unable to add dma window property for %s: %d",10761076 pdn->full_name, ret);···12941294 struct direct_window *window;1295129512961296 switch (action) {12971297- case PSERIES_RECONFIG_REMOVE:12971297+ case OF_RECONFIG_DETACH_NODE:12981298 if (pci && pci->iommu_table)12991299 iommu_free_table(pci->iommu_table, np->full_name);13001300···13571357 }135813581359135913601360- pSeries_reconfig_notifier_register(&iommu_reconfig_nb);13601360+ of_reconfig_notifier_register(&iommu_reconfig_nb);13611361 register_memory_notifier(&iommu_mem_nb);1362136213631363 set_pci_dma_ops(&dma_iommu_ops);
···10281028}10291029EXPORT_SYMBOL(of_parse_phandle_with_args);1030103010311031+#if defined(CONFIG_OF_DYNAMIC)10321032+static int of_property_notify(int action, struct device_node *np,10331033+ struct property *prop)10341034+{10351035+ struct of_prop_reconfig pr;10361036+10371037+ pr.dn = np;10381038+ pr.prop = prop;10391039+ return of_reconfig_notify(action, &pr);10401040+}10411041+#else10421042+static int of_property_notify(int action, struct device_node *np,10431043+ struct property *prop)10441044+{10451045+ return 0;10461046+}10471047+#endif10481048+10311049/**10321032- * prom_add_property - Add a property to a node10501050+ * of_add_property - Add a property to a node10331051 */10341034-int prom_add_property(struct device_node *np, struct property *prop)10521052+int of_add_property(struct device_node *np, struct property *prop)10351053{10361054 struct property **next;10371055 unsigned long flags;10561056+ int rc;10571057+10581058+ rc = of_property_notify(OF_RECONFIG_ADD_PROPERTY, np, prop);10591059+ if (rc)10601060+ return rc;1038106110391062 prop->next = NULL;10401063 write_lock_irqsave(&devtree_lock, flags);···10831060}1084106110851062/**10861086- * prom_remove_property - Remove a property from a node.10631063+ * of_remove_property - Remove a property from a node.10871064 *10881065 * Note that we don't actually remove it, since we have given out10891066 * who-knows-how-many pointers to the data using get-property.10901067 * Instead we just move the property to the "dead properties"10911068 * list, so it won't be found any more.10921069 */10931093-int prom_remove_property(struct device_node *np, struct property *prop)10701070+int of_remove_property(struct device_node *np, struct property *prop)10941071{10951072 struct property **next;10961073 unsigned long flags;10971074 int found = 0;10751075+ int rc;10761076+10771077+ rc = of_property_notify(OF_RECONFIG_REMOVE_PROPERTY, np, prop);10781078+ if (rc)10791079+ return rc;1098108010991081 write_lock_irqsave(&devtree_lock, flags);11001082 next = &np->properties;···11291101}1130110211311103/*11321132- * prom_update_property - Update a property in a node, if the property does11041104+ * of_update_property - Update a property in a node, if the property does11331105 * not exist, add it.11341106 *11351107 * Note that we don't actually remove it, since we have given out···11371109 * Instead we just move the property to the "dead properties" list,11381110 * and add the new property to the property list11391111 */11401140-int prom_update_property(struct device_node *np,11411141- struct property *newprop)11121112+int of_update_property(struct device_node *np, struct property *newprop)11421113{11431114 struct property **next, *oldprop;11441115 unsigned long flags;11451145- int found = 0;11161116+ int rc, found = 0;11171117+11181118+ rc = of_property_notify(OF_RECONFIG_UPDATE_PROPERTY, np, newprop);11191119+ if (rc)11201120+ return rc;1146112111471122 if (!newprop->name)11481123 return -EINVAL;1149112411501125 oldprop = of_find_property(np, newprop->name, NULL);11511126 if (!oldprop)11521152- return prom_add_property(np, newprop);11271127+ return of_add_property(np, newprop);1153112811541129 write_lock_irqsave(&devtree_lock, flags);11551130 next = &np->properties;···11911160 * device tree nodes.11921161 */1193116211631163+static BLOCKING_NOTIFIER_HEAD(of_reconfig_chain);11641164+11651165+int of_reconfig_notifier_register(struct notifier_block *nb)11661166+{11671167+ return blocking_notifier_chain_register(&of_reconfig_chain, nb);11681168+}11691169+11701170+int of_reconfig_notifier_unregister(struct notifier_block *nb)11711171+{11721172+ return blocking_notifier_chain_unregister(&of_reconfig_chain, nb);11731173+}11741174+11751175+int of_reconfig_notify(unsigned long action, void *p)11761176+{11771177+ int rc;11781178+11791179+ rc = blocking_notifier_call_chain(&of_reconfig_chain, action, p);11801180+ return notifier_to_errno(rc);11811181+}11821182+11831183+#ifdef CONFIG_PROC_DEVICETREE11841184+static void of_add_proc_dt_entry(struct device_node *dn)11851185+{11861186+ struct proc_dir_entry *ent;11871187+11881188+ ent = proc_mkdir(strrchr(dn->full_name, '/') + 1, dn->parent->pde);11891189+ if (ent)11901190+ proc_device_tree_add_node(dn, ent);11911191+}11921192+#else11931193+static void of_add_proc_dt_entry(struct device_node *dn)11941194+{11951195+ return;11961196+}11971197+#endif11981198+11941199/**11951200 * of_attach_node - Plug a device node into the tree and global list.11961201 */11971197-void of_attach_node(struct device_node *np)12021202+int of_attach_node(struct device_node *np)11981203{11991204 unsigned long flags;12051205+ int rc;12061206+12071207+ rc = of_reconfig_notify(OF_RECONFIG_ATTACH_NODE, np);12081208+ if (rc)12091209+ return rc;1200121012011211 write_lock_irqsave(&devtree_lock, flags);12021212 np->sibling = np->parent->child;···12451173 np->parent->child = np;12461174 allnodes = np;12471175 write_unlock_irqrestore(&devtree_lock, flags);11761176+11771177+ of_add_proc_dt_entry(np);11781178+ return 0;12481179}11801180+11811181+#ifdef CONFIG_PROC_DEVICETREE11821182+static void of_remove_proc_dt_entry(struct device_node *dn)11831183+{11841184+ struct device_node *parent = dn->parent;11851185+ struct property *prop = dn->properties;11861186+11871187+ while (prop) {11881188+ remove_proc_entry(prop->name, dn->pde);11891189+ prop = prop->next;11901190+ }11911191+11921192+ if (dn->pde)11931193+ remove_proc_entry(dn->pde->name, parent->pde);11941194+}11951195+#else11961196+static void of_remove_proc_dt_entry(struct device_node *dn)11971197+{11981198+ return;11991199+}12001200+#endif1249120112501202/**12511203 * of_detach_node - "Unplug" a node from the device tree.···12771181 * The caller must hold a reference to the node. The memory associated with12781182 * the node is not freed until its refcount goes to zero.12791183 */12801280-void of_detach_node(struct device_node *np)11841184+int of_detach_node(struct device_node *np)12811185{12821186 struct device_node *parent;12831187 unsigned long flags;11881188+ int rc = 0;11891189+11901190+ rc = of_reconfig_notify(OF_RECONFIG_DETACH_NODE, np);11911191+ if (rc)11921192+ return rc;1284119312851194 write_lock_irqsave(&devtree_lock, flags);1286119511961196+ if (of_node_check_flag(np, OF_DETACHED)) {11971197+ /* someone already detached it */11981198+ write_unlock_irqrestore(&devtree_lock, flags);11991199+ return rc;12001200+ }12011201+12871202 parent = np->parent;12881288- if (!parent)12891289- goto out_unlock;12031203+ if (!parent) {12041204+ write_unlock_irqrestore(&devtree_lock, flags);12051205+ return rc;12061206+ }1290120712911208 if (allnodes == np)12921209 allnodes = np->allnext;···13241215 }1325121613261217 of_node_set_flag(np, OF_DETACHED);13271327-13281328-out_unlock:13291218 write_unlock_irqrestore(&devtree_lock, flags);12191219+12201220+ of_remove_proc_dt_entry(np);12211221+ return rc;13301222}13311223#endif /* defined(CONFIG_OF_DYNAMIC) */13321224
+21-8
include/linux/of.h
···2222#include <linux/mod_devicetable.h>2323#include <linux/spinlock.h>2424#include <linux/topology.h>2525+#include <linux/notifier.h>25262627#include <asm/byteorder.h>2728#include <asm/errno.h>···268267269268extern int of_machine_is_compatible(const char *compat);270269271271-extern int prom_add_property(struct device_node* np, struct property* prop);272272-extern int prom_remove_property(struct device_node *np, struct property *prop);273273-extern int prom_update_property(struct device_node *np,274274- struct property *newprop);270270+extern int of_add_property(struct device_node *np, struct property *prop);271271+extern int of_remove_property(struct device_node *np, struct property *prop);272272+extern int of_update_property(struct device_node *np, struct property *newprop);275273276276-#if defined(CONFIG_OF_DYNAMIC)277274/* For updating the device tree at runtime */278278-extern void of_attach_node(struct device_node *);279279-extern void of_detach_node(struct device_node *);280280-#endif275275+#define OF_RECONFIG_ATTACH_NODE 0x0001276276+#define OF_RECONFIG_DETACH_NODE 0x0002277277+#define OF_RECONFIG_ADD_PROPERTY 0x0003278278+#define OF_RECONFIG_REMOVE_PROPERTY 0x0004279279+#define OF_RECONFIG_UPDATE_PROPERTY 0x0005280280+281281+struct of_prop_reconfig {282282+ struct device_node *dn;283283+ struct property *prop;284284+};285285+286286+extern int of_reconfig_notifier_register(struct notifier_block *);287287+extern int of_reconfig_notifier_unregister(struct notifier_block *);288288+extern int of_reconfig_notify(unsigned long, void *);289289+290290+extern int of_attach_node(struct device_node *);291291+extern int of_detach_node(struct device_node *);281292282293#define of_match_ptr(_ptr) (_ptr)283294