hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/of/of_private.h
....@@ -24,8 +24,16 @@
2424 const char *alias;
2525 struct device_node *np;
2626 int id;
27
- char stem[0];
27
+ char stem[];
2828 };
29
+
30
+#if defined(CONFIG_SPARC)
31
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2
32
+#else
33
+#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
34
+#endif
35
+
36
+#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
2937
3038 extern struct mutex of_mutex;
3139 extern struct list_head aliases_lookup;
....@@ -76,15 +84,11 @@
7684 int of_resolve_phandles(struct device_node *tree);
7785 #endif
7886
79
-#if defined(CONFIG_OF_DYNAMIC)
80
-void __of_free_phandle_cache_entry(phandle handle);
81
-#endif
87
+void __of_phandle_cache_inv_entry(phandle handle);
8288
8389 #if defined(CONFIG_OF_OVERLAY)
8490 void of_overlay_mutex_lock(void);
8591 void of_overlay_mutex_unlock(void);
86
-int of_free_phandle_cache(void);
87
-void of_populate_phandle_cache(void);
8892 #else
8993 static inline void of_overlay_mutex_lock(void) {};
9094 static inline void of_overlay_mutex_unlock(void) {};
....@@ -150,4 +154,19 @@
150154 #define for_each_transaction_entry_reverse(_oft, _te) \
151155 list_for_each_entry_reverse(_te, &(_oft)->te_list, node)
152156
157
+extern int of_bus_n_addr_cells(struct device_node *np);
158
+extern int of_bus_n_size_cells(struct device_node *np);
159
+
160
+struct bus_dma_region;
161
+#if defined(CONFIG_OF_ADDRESS) && defined(CONFIG_HAS_DMA)
162
+int of_dma_get_range(struct device_node *np,
163
+ const struct bus_dma_region **map);
164
+#else
165
+static inline int of_dma_get_range(struct device_node *np,
166
+ const struct bus_dma_region **map)
167
+{
168
+ return -ENODEV;
169
+}
170
+#endif
171
+
153172 #endif /* _LINUX_OF_PRIVATE_H */