Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 1 | #ifndef DEVICE_PATH_H |
| 2 | #define DEVICE_PATH_H |
| 3 | |
| 4 | enum device_path_type { |
| 5 | DEVICE_PATH_NONE = 0, |
Eric Biederman | 83b991a | 2003-10-11 06:20:25 +0000 | [diff] [blame] | 6 | DEVICE_PATH_ROOT, |
Eric Biederman | b78c197 | 2004-10-14 20:54:17 +0000 | [diff] [blame] | 7 | DEVICE_PATH_DEFAULT_CPU, |
Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 8 | DEVICE_PATH_PCI, |
| 9 | DEVICE_PATH_PNP, |
| 10 | DEVICE_PATH_I2C, |
Eric Biederman | b78c197 | 2004-10-14 20:54:17 +0000 | [diff] [blame] | 11 | DEVICE_PATH_APIC, |
Eric Biederman | 216525d | 2004-10-16 02:48:37 +0000 | [diff] [blame^] | 12 | DEVICE_PATH_PCI_DOMAIN, |
| 13 | DEVICE_APIC_CLUSTER, |
| 14 | }; |
| 15 | |
| 16 | struct pci_domain_path |
| 17 | { |
| 18 | unsigned domain; |
Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 19 | }; |
| 20 | |
| 21 | struct pci_path |
| 22 | { |
Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 23 | unsigned devfn; |
| 24 | }; |
| 25 | |
| 26 | struct pnp_path |
| 27 | { |
| 28 | unsigned port; |
| 29 | unsigned device; |
| 30 | }; |
| 31 | |
| 32 | struct i2c_path |
| 33 | { |
| 34 | unsigned device; |
| 35 | }; |
| 36 | |
Eric Biederman | b78c197 | 2004-10-14 20:54:17 +0000 | [diff] [blame] | 37 | struct apic_path |
| 38 | { |
| 39 | unsigned apic_id; |
| 40 | }; |
| 41 | |
Eric Biederman | 216525d | 2004-10-16 02:48:37 +0000 | [diff] [blame^] | 42 | struct apic_cluster_path |
| 43 | { |
| 44 | unsigned cluster; |
| 45 | }; |
| 46 | |
| 47 | |
Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 48 | struct device_path { |
| 49 | enum device_path_type type; |
| 50 | union { |
Eric Biederman | 216525d | 2004-10-16 02:48:37 +0000 | [diff] [blame^] | 51 | struct pci_path pci; |
| 52 | struct pnp_path pnp; |
| 53 | struct i2c_path i2c; |
| 54 | struct apic_path apic; |
| 55 | struct pci_domain_path pci_domain; |
| 56 | struct apic_cluster_path apic_cluster; |
Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame] | 57 | } u; |
| 58 | }; |
| 59 | |
| 60 | |
| 61 | #define DEVICE_PATH_MAX 30 |
| 62 | |
| 63 | extern int path_eq(struct device_path *path1, struct device_path *path2); |
| 64 | |
| 65 | #endif /* DEVICE_PATH_H */ |