diff options
Diffstat (limited to 'include/asm-sparc/prom.h')
-rw-r--r-- | include/asm-sparc/prom.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index c5e3d26eabd3..f9cf44c07164 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -35,6 +35,8 @@ struct property { | |||
35 | int length; | 35 | int length; |
36 | void *value; | 36 | void *value; |
37 | struct property *next; | 37 | struct property *next; |
38 | unsigned long _flags; | ||
39 | unsigned int unique_id; | ||
38 | }; | 40 | }; |
39 | 41 | ||
40 | struct device_node { | 42 | struct device_node { |
@@ -58,8 +60,15 @@ struct device_node { | |||
58 | struct kref kref; | 60 | struct kref kref; |
59 | unsigned long _flags; | 61 | unsigned long _flags; |
60 | void *data; | 62 | void *data; |
63 | unsigned int unique_id; | ||
61 | }; | 64 | }; |
62 | 65 | ||
66 | /* flag descriptions */ | ||
67 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ | ||
68 | |||
69 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | ||
70 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | ||
71 | |||
63 | static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) | 72 | static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) |
64 | { | 73 | { |
65 | dn->pde = de; | 74 | dn->pde = de; |
@@ -88,6 +97,7 @@ extern struct property *of_find_property(struct device_node *np, | |||
88 | extern int of_device_is_compatible(struct device_node *device, const char *); | 97 | extern int of_device_is_compatible(struct device_node *device, const char *); |
89 | extern void *of_get_property(struct device_node *node, const char *name, | 98 | extern void *of_get_property(struct device_node *node, const char *name, |
90 | int *lenp); | 99 | int *lenp); |
100 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | ||
91 | extern int of_getintprop_default(struct device_node *np, | 101 | extern int of_getintprop_default(struct device_node *np, |
92 | const char *name, | 102 | const char *name, |
93 | int def); | 103 | int def); |