blob: f55827b9c02a474eed1efc345671262167c687bd [file] [log] [blame]
Eric Biedermane9a271e32003-09-02 03:36:25 +00001#ifndef DEVICE_PATH_H
2#define DEVICE_PATH_H
3
4enum device_path_type {
5 DEVICE_PATH_NONE = 0,
Eric Biederman83b991a2003-10-11 06:20:25 +00006 DEVICE_PATH_ROOT,
Eric Biedermane9a271e32003-09-02 03:36:25 +00007 DEVICE_PATH_PCI,
8 DEVICE_PATH_PNP,
9 DEVICE_PATH_I2C,
Eric Biedermanb78c1972004-10-14 20:54:17 +000010 DEVICE_PATH_APIC,
Eric Biederman216525d2004-10-16 02:48:37 +000011 DEVICE_PATH_PCI_DOMAIN,
Eric Biederman7003ba42004-10-16 06:20:29 +000012 DEVICE_PATH_APIC_CLUSTER,
Eric Biedermana9e632c2004-11-18 22:38:08 +000013 DEVICE_PATH_CPU,
14 DEVICE_PATH_CPU_BUS,
Eric Biederman216525d2004-10-16 02:48:37 +000015};
16
17struct pci_domain_path
18{
19 unsigned domain;
Eric Biedermane9a271e32003-09-02 03:36:25 +000020};
21
22struct pci_path
23{
Eric Biedermane9a271e32003-09-02 03:36:25 +000024 unsigned devfn;
25};
26
27struct pnp_path
28{
29 unsigned port;
30 unsigned device;
31};
32
33struct i2c_path
34{
35 unsigned device;
36};
37
Eric Biedermanb78c1972004-10-14 20:54:17 +000038struct apic_path
39{
40 unsigned apic_id;
41};
42
Eric Biederman216525d2004-10-16 02:48:37 +000043struct apic_cluster_path
44{
45 unsigned cluster;
46};
47
Eric Biedermana9e632c2004-11-18 22:38:08 +000048struct cpu_path
49{
50 unsigned id;
51};
52
53struct cpu_bus_path
54{
55 unsigned id;
56};
57
Eric Biederman216525d2004-10-16 02:48:37 +000058
Eric Biedermane9a271e32003-09-02 03:36:25 +000059struct device_path {
60 enum device_path_type type;
61 union {
Eric Biedermana9e632c2004-11-18 22:38:08 +000062 struct pci_path pci;
63 struct pnp_path pnp;
64 struct i2c_path i2c;
65 struct apic_path apic;
66 struct pci_domain_path pci_domain;
Eric Biederman216525d2004-10-16 02:48:37 +000067 struct apic_cluster_path apic_cluster;
Eric Biedermana9e632c2004-11-18 22:38:08 +000068 struct cpu_path cpu;
69 struct cpu_bus_path cpu_bus;
Eric Biedermane9a271e32003-09-02 03:36:25 +000070 } u;
71};
72
73
74#define DEVICE_PATH_MAX 30
75
76extern int path_eq(struct device_path *path1, struct device_path *path2);
77
78#endif /* DEVICE_PATH_H */