move gic to new devtree interface
[lunaix-os.git] / lunaix-os / includes / hal / devtreem.h
1 #ifndef __LUNAIX_DEVTREE_TOP_H
2 #define __LUNAIX_DEVTREE_TOP_H
3
4 struct device_def;
5 struct device;
6
7 #ifdef CONFIG_USE_DEVICETREE
8
9 #include "devtree.h"
10 #include <lunaix/ds/hashtable.h>
11 #include <lunaix/ds/list.h>
12 #include <klibc/hash.h>
13
14 typedef struct dtn* devtree_link_t;
15
16 struct dtm_driver_info
17 {
18     struct list_node node;
19     const char* pattern;
20 };
21
22 struct dtm_driver_record
23 {
24     struct hlist_node node;
25     struct list_head infos;
26     struct device_def* def;
27 };
28
29 void
30 dtm_register_entry(struct device_def* def, const char* pattern);
31
32 #else
33
34 #include <lunaix/types.h>
35
36 typedef void* devtree_link_t;
37
38 static inline void
39 dtm_register_entry(struct device_def* def, const char* pattern)
40 {
41     return;
42 }
43
44 #endif
45
46 #endif /* __LUNAIX_DEVTREE_TOP_H */