- Major update of the dynamic device tree so it can handle
[coreboot.git] / src / include / device / path.h
1 #ifndef DEVICE_PATH_H
2 #define DEVICE_PATH_H
3
4 enum device_path_type {
5         DEVICE_PATH_NONE = 0,
6         DEVICE_PATH_PCI,
7         DEVICE_PATH_PNP,
8         DEVICE_PATH_I2C,
9 };
10
11 struct pci_path
12 {
13         unsigned devfn;
14 };
15
16 struct pnp_path
17 {
18         unsigned port;
19         unsigned device;
20 };
21
22 struct i2c_path
23 {
24         unsigned device;
25 };
26
27 struct device_path {
28         enum device_path_type type;
29         union {
30                 struct pci_path pci;
31                 struct pnp_path pnp;
32                 struct i2c_path i2c;
33         } u;
34 };
35
36
37 #define DEVICE_PATH_MAX 30
38
39 extern int path_eq(struct device_path *path1, struct device_path *path2);
40
41 #endif /* DEVICE_PATH_H */