diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-07 15:18:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-07 15:18:52 -0500 |
commit | 02550d61f49266930e674286379d3601006b2893 (patch) | |
tree | 2d30df688b7f428908028dd20e83b22bc799dee7 /include | |
parent | 2d51daaa615e4724f24e43fa01e705c40551080a (diff) | |
parent | c89810acbcf48c7004e912b2b4b862480b2d00e1 (diff) |
Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6
devicetree/next changes queued for v3.3 merge window
* tag 'devicetree-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6:
ARM: prom.h: Fix build error by removing unneeded header file
irq: check domain hwirq range for DT translate
dt: add empty of_get_node/of_put_node functions
of/pdt: fix section mismatch warning
i2c-designware: add OF binding support
dt/i2c: Enumerate some of the known trivial i2c devices
dt: reform for_each_property to for_each_property_of_node
ARM/of: allow *machine_desc.dt_compat to be const
of/base: Take NULL string into account for property with multiple strings
OF/device-tree: Add some entries to vendor-prefixes.txt
Fix up trivial add-add conflicts in include/linux/of.h
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/of.h | 33 | ||||
-rw-r--r-- | include/linux/of_fdt.h | 4 |
2 files changed, 18 insertions, 19 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index ea44fd72af5f..a75a831e2057 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -72,6 +72,20 @@ struct of_phandle_args { | |||
72 | uint32_t args[MAX_PHANDLE_ARGS]; | 72 | uint32_t args[MAX_PHANDLE_ARGS]; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | #if defined(CONFIG_SPARC) || !defined(CONFIG_OF) | ||
76 | /* Dummy ref counting routines - to be implemented later */ | ||
77 | static inline struct device_node *of_node_get(struct device_node *node) | ||
78 | { | ||
79 | return node; | ||
80 | } | ||
81 | static inline void of_node_put(struct device_node *node) | ||
82 | { | ||
83 | } | ||
84 | #else | ||
85 | extern struct device_node *of_node_get(struct device_node *node); | ||
86 | extern void of_node_put(struct device_node *node); | ||
87 | #endif | ||
88 | |||
75 | #ifdef CONFIG_OF | 89 | #ifdef CONFIG_OF |
76 | 90 | ||
77 | /* Pointer for first entry in chain of all nodes. */ | 91 | /* Pointer for first entry in chain of all nodes. */ |
@@ -102,21 +116,6 @@ static inline void of_node_set_flag(struct device_node *n, unsigned long flag) | |||
102 | 116 | ||
103 | extern struct device_node *of_find_all_nodes(struct device_node *prev); | 117 | extern struct device_node *of_find_all_nodes(struct device_node *prev); |
104 | 118 | ||
105 | #if defined(CONFIG_SPARC) | ||
106 | /* Dummy ref counting routines - to be implemented later */ | ||
107 | static inline struct device_node *of_node_get(struct device_node *node) | ||
108 | { | ||
109 | return node; | ||
110 | } | ||
111 | static inline void of_node_put(struct device_node *node) | ||
112 | { | ||
113 | } | ||
114 | |||
115 | #else | ||
116 | extern struct device_node *of_node_get(struct device_node *node); | ||
117 | extern void of_node_put(struct device_node *node); | ||
118 | #endif | ||
119 | |||
120 | /* | 119 | /* |
121 | * OF address retrieval & translation | 120 | * OF address retrieval & translation |
122 | */ | 121 | */ |
@@ -226,8 +225,8 @@ extern int of_device_is_available(const struct device_node *device); | |||
226 | extern const void *of_get_property(const struct device_node *node, | 225 | extern const void *of_get_property(const struct device_node *node, |
227 | const char *name, | 226 | const char *name, |
228 | int *lenp); | 227 | int *lenp); |
229 | #define for_each_property(pp, properties) \ | 228 | #define for_each_property_of_node(dn, pp) \ |
230 | for (pp = properties; pp != NULL; pp = pp->next) | 229 | for (pp = dn->properties; pp != NULL; pp = pp->next) |
231 | 230 | ||
232 | extern int of_n_addr_cells(struct device_node *np); | 231 | extern int of_n_addr_cells(struct device_node *np); |
233 | extern int of_n_size_cells(struct device_node *np); | 232 | extern int of_n_size_cells(struct device_node *np); |
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index c84d900fbbb3..ed136ad698ce 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h | |||
@@ -71,7 +71,7 @@ extern int of_fdt_is_compatible(struct boot_param_header *blob, | |||
71 | unsigned long node, | 71 | unsigned long node, |
72 | const char *compat); | 72 | const char *compat); |
73 | extern int of_fdt_match(struct boot_param_header *blob, unsigned long node, | 73 | extern int of_fdt_match(struct boot_param_header *blob, unsigned long node, |
74 | const char **compat); | 74 | const char *const *compat); |
75 | extern void of_fdt_unflatten_tree(unsigned long *blob, | 75 | extern void of_fdt_unflatten_tree(unsigned long *blob, |
76 | struct device_node **mynodes); | 76 | struct device_node **mynodes); |
77 | 77 | ||
@@ -88,7 +88,7 @@ extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname, | |||
88 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, | 88 | extern void *of_get_flat_dt_prop(unsigned long node, const char *name, |
89 | unsigned long *size); | 89 | unsigned long *size); |
90 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); | 90 | extern int of_flat_dt_is_compatible(unsigned long node, const char *name); |
91 | extern int of_flat_dt_match(unsigned long node, const char **matches); | 91 | extern int of_flat_dt_match(unsigned long node, const char *const *matches); |
92 | extern unsigned long of_get_flat_dt_root(void); | 92 | extern unsigned long of_get_flat_dt_root(void); |
93 | 93 | ||
94 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, | 94 | extern int early_init_dt_scan_chosen(unsigned long node, const char *uname, |