aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/prom.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64/prom.h')
-rw-r--r--include/asm-sparc64/prom.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h
index 6d1556c0c263..265614d497c4 100644
--- a/include/asm-sparc64/prom.h
+++ b/include/asm-sparc64/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
40struct device_node { 42struct 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
63static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) 72static 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,
88extern int of_device_is_compatible(struct device_node *device, const char *); 97extern int of_device_is_compatible(struct device_node *device, const char *);
89extern void *of_get_property(struct device_node *node, const char *name, 98extern void *of_get_property(struct device_node *node, const char *name,
90 int *lenp); 99 int *lenp);
100extern int of_set_property(struct device_node *node, const char *name, void *val, int len);
91extern int of_getintprop_default(struct device_node *np, 101extern int of_getintprop_default(struct device_node *np,
92 const char *name, 102 const char *name,
93 int def); 103 int def);