soc/intel/xeon_sp/spr: Drop microcode constraints
[coreboot2.git] / src / include / device / path.h
blobf8c43901c5c1dab9516c45bb0e49065a6252c844
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef DEVICE_PATH_H
4 #define DEVICE_PATH_H
6 #include <stdint.h>
8 enum device_path_type {
9 DEVICE_PATH_NONE = 0,
10 DEVICE_PATH_ROOT,
11 DEVICE_PATH_PCI,
12 DEVICE_PATH_PNP,
13 DEVICE_PATH_I2C,
14 DEVICE_PATH_APIC,
15 DEVICE_PATH_DOMAIN,
16 DEVICE_PATH_CPU_CLUSTER,
17 DEVICE_PATH_CPU,
18 DEVICE_PATH_CPU_BUS,
19 DEVICE_PATH_IOAPIC,
20 DEVICE_PATH_GENERIC,
21 DEVICE_PATH_SPI,
22 DEVICE_PATH_USB,
23 DEVICE_PATH_MMIO,
24 DEVICE_PATH_GPIO,
25 DEVICE_PATH_MDIO,
26 DEVICE_PATH_GICC_V3,
29 * When adding path types to this table, please also update the
30 * DEVICE_PATH_NAMES macro below.
34 #define DEVICE_PATH_NAMES { \
35 "DEVICE_PATH_NONE", \
36 "DEVICE_PATH_ROOT", \
37 "DEVICE_PATH_PCI", \
38 "DEVICE_PATH_PNP", \
39 "DEVICE_PATH_I2C", \
40 "DEVICE_PATH_APIC", \
41 "DEVICE_PATH_DOMAIN", \
42 "DEVICE_PATH_CPU_CLUSTER", \
43 "DEVICE_PATH_CPU", \
44 "DEVICE_PATH_CPU_BUS", \
45 "DEVICE_PATH_IOAPIC", \
46 "DEVICE_PATH_GENERIC", \
47 "DEVICE_PATH_SPI", \
48 "DEVICE_PATH_USB", \
49 "DEVICE_PATH_MMIO", \
50 "DEVICE_PATH_GPIO", \
51 "DEVICE_PATH_MDIO", \
52 "DEVICE_PATH_GICC_V3", \
55 struct domain_path {
56 unsigned int domain;
59 struct pci_path {
60 unsigned int devfn;
63 struct pnp_path {
64 unsigned int port;
65 unsigned int device;
68 struct i2c_path {
69 unsigned int device;
70 unsigned int mode_10bit;
73 struct spi_path {
74 unsigned int cs;
77 struct apic_path {
78 unsigned int initial_lapicid;
79 unsigned int apic_id;
80 unsigned int package_id;
81 unsigned int node_id;
82 unsigned int core_id;
83 unsigned int thread_id;
84 unsigned char core_type;
87 struct ioapic_path {
88 unsigned int ioapic_id;
91 struct cpu_cluster_path {
92 unsigned int cluster;
95 struct cpu_path {
96 unsigned int id;
99 struct cpu_bus_path {
100 unsigned int id;
103 struct generic_path {
104 unsigned int id;
105 unsigned int subid;
108 struct usb_path {
109 unsigned int port_type;
110 unsigned int port_id;
113 struct mmio_path {
114 uintptr_t addr;
117 struct gpio_path {
118 unsigned int id;
121 struct mdio_path {
122 unsigned int addr;
125 struct gicc_v3_path {
126 unsigned long long mpidr;
127 unsigned int vgic_mi;
128 unsigned int pi_gsiv;
131 struct device_path {
132 enum device_path_type type;
133 union {
134 struct pci_path pci;
135 struct pnp_path pnp;
136 struct i2c_path i2c;
137 struct apic_path apic;
138 struct ioapic_path ioapic;
139 struct domain_path domain;
140 struct cpu_cluster_path cpu_cluster;
141 struct cpu_path cpu;
142 struct cpu_bus_path cpu_bus;
143 struct generic_path generic;
144 struct spi_path spi;
145 struct usb_path usb;
146 struct mmio_path mmio;
147 struct gpio_path gpio;
148 struct mdio_path mdio;
149 struct gicc_v3_path gicc_v3;
153 #define DEVICE_PATH_MAX 40
154 #define BUS_PATH_MAX (DEVICE_PATH_MAX+10)
156 extern const char *dev_path_name(enum device_path_type type);
158 #endif /* DEVICE_PATH_H */