blob: 9df1d9fa67e92c46ca3ee4cf4e89223d1428fd91 [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 Biedermanb78c1972004-10-14 20:54:17 +00007 DEVICE_PATH_DEFAULT_CPU,
Eric Biedermane9a271e32003-09-02 03:36:25 +00008 DEVICE_PATH_PCI,
9 DEVICE_PATH_PNP,
10 DEVICE_PATH_I2C,
Eric Biedermanb78c1972004-10-14 20:54:17 +000011 DEVICE_PATH_APIC,
Eric Biederman216525d2004-10-16 02:48:37 +000012 DEVICE_PATH_PCI_DOMAIN,
13 DEVICE_APIC_CLUSTER,
14};
15
16struct pci_domain_path
17{
18 unsigned domain;
Eric Biedermane9a271e32003-09-02 03:36:25 +000019};
20
21struct pci_path
22{
Eric Biedermane9a271e32003-09-02 03:36:25 +000023 unsigned devfn;
24};
25
26struct pnp_path
27{
28 unsigned port;
29 unsigned device;
30};
31
32struct i2c_path
33{
34 unsigned device;
35};
36
Eric Biedermanb78c1972004-10-14 20:54:17 +000037struct apic_path
38{
39 unsigned apic_id;
40};
41
Eric Biederman216525d2004-10-16 02:48:37 +000042struct apic_cluster_path
43{
44 unsigned cluster;
45};
46
47
Eric Biedermane9a271e32003-09-02 03:36:25 +000048struct device_path {
49 enum device_path_type type;
50 union {
Eric Biederman216525d2004-10-16 02:48:37 +000051 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 Biedermane9a271e32003-09-02 03:36:25 +000057 } u;
58};
59
60
61#define DEVICE_PATH_MAX 30
62
63extern int path_eq(struct device_path *path1, struct device_path *path2);
64
65#endif /* DEVICE_PATH_H */