Lines Matching +full:0 +full:xbc
23 v &= 0xff; in set_val()
25 v &= 0xffff; in set_val()
36 int where_a = where & 0xc; in handle_ea_bar()
38 if (where_a == 0) { in handle_ea_bar()
42 if (where_a == 0x4) { in handle_ea_bar()
43 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
45 *val = ~0; in handle_ea_bar()
49 v &= ~0xf; in handle_ea_bar()
54 if (where_a == 0x8) { in handle_ea_bar()
58 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
60 *val = ~0; in handle_ea_bar()
63 barl_orig = readl(addr + 0); in handle_ea_bar()
64 writel(0xffffffff, addr + 0); in handle_ea_bar()
65 barl_rb = readl(addr + 0); in handle_ea_bar()
66 writel(barl_orig, addr + 0); in handle_ea_bar()
69 v |= 0xc; /* EA entry-2. Offset-L */ in handle_ea_bar()
73 if (where_a == 0xc) { in handle_ea_bar()
76 *val = ~0; in handle_ea_bar()
97 case 0xa8: in thunder_ecam_p2_config_read()
98 case 0xbc: in thunder_ecam_p2_config_read()
99 case 0xd0: in thunder_ecam_p2_config_read()
100 case 0xe4: in thunder_ecam_p2_config_read()
108 *val = ~0; in thunder_ecam_p2_config_read()
137 addr = bus->ops->map_bus(bus, devfn, 0xc); in thunder_ecam_config_read()
139 *val = ~0; in thunder_ecam_config_read()
146 cfg_type = (v >> 16) & 0x7f; in thunder_ecam_config_read()
150 *val = ~0; in thunder_ecam_config_read()
155 if (class_rev == 0xffffffff) in thunder_ecam_config_read()
158 if ((class_rev & 0xff) >= 8) { in thunder_ecam_config_read()
170 if (cfg_type == 0 && in thunder_ecam_config_read()
171 ((where >= 0x10 && where < 0x2c) || in thunder_ecam_config_read()
172 (where >= 0x1a4 && where < 0x1bc))) { in thunder_ecam_config_read()
174 *val = 0; in thunder_ecam_config_read()
178 addr = bus->ops->map_bus(bus, devfn, 0); in thunder_ecam_config_read()
180 *val = ~0; in thunder_ecam_config_read()
185 if (vendor_device == 0xffffffff) in thunder_ecam_config_read()
189 vendor_device & 0xffff, vendor_device >> 16, class_rev, in thunder_ecam_config_read()
193 if (cfg_type == 0) { in thunder_ecam_config_read()
195 bool is_nic = (vendor_device == 0xa01e177d); in thunder_ecam_config_read()
196 bool is_tns = (vendor_device == 0xa01f177d); in thunder_ecam_config_read()
198 addr = bus->ops->map_bus(bus, devfn, 0x70); in thunder_ecam_config_read()
200 *val = ~0; in thunder_ecam_config_read()
205 has_msix = (v & 0xff00) != 0; in thunder_ecam_config_read()
207 if (!has_msix && where_a == 0x70) { in thunder_ecam_config_read()
208 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
212 if (where_a == 0xb0) { in thunder_ecam_config_read()
215 *val = ~0; in thunder_ecam_config_read()
219 if (v & 0xff00) in thunder_ecam_config_read()
221 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
225 if (where_a == 0xbc) { in thunder_ecam_config_read()
227 v = 0x40014; /* EA last in chain, 4 entries */ in thunder_ecam_config_read()
229 v = 0x30014; /* EA last in chain, 3 entries */ in thunder_ecam_config_read()
231 v = 0x20014; /* EA last in chain, 2 entries */ in thunder_ecam_config_read()
233 v = 0x10014; /* EA last in chain, 1 entry */ in thunder_ecam_config_read()
237 if (where_a >= 0xc0 && where_a < 0xd0) in thunder_ecam_config_read()
238 /* EA entry-0. PP=0, BAR0 Size:3 */ in thunder_ecam_config_read()
239 return handle_ea_bar(0x80ff0003, in thunder_ecam_config_read()
240 0x10, bus, devfn, where, in thunder_ecam_config_read()
242 if (where_a >= 0xd0 && where_a < 0xe0 && has_msix) in thunder_ecam_config_read()
243 /* EA entry-1. PP=0, BAR4 Size:3 */ in thunder_ecam_config_read()
244 return handle_ea_bar(0x80ff0043, in thunder_ecam_config_read()
245 0x20, bus, devfn, where, in thunder_ecam_config_read()
247 if (where_a >= 0xe0 && where_a < 0xf0 && is_tns) in thunder_ecam_config_read()
248 /* EA entry-2. PP=0, BAR2, Size:3 */ in thunder_ecam_config_read()
249 return handle_ea_bar(0x80ff0023, in thunder_ecam_config_read()
250 0x18, bus, devfn, where, in thunder_ecam_config_read()
252 if (where_a >= 0xe0 && where_a < 0xf0 && is_nic) in thunder_ecam_config_read()
254 return handle_ea_bar(0x80ff0493, in thunder_ecam_config_read()
255 0x1a4, bus, devfn, where, in thunder_ecam_config_read()
257 if (where_a >= 0xf0 && where_a < 0x100 && is_nic) in thunder_ecam_config_read()
259 return handle_ea_bar(0x80ff04d3, in thunder_ecam_config_read()
260 0x1b4, bus, devfn, where, in thunder_ecam_config_read()
263 bool is_rsl_bridge = devfn == 0x08; in thunder_ecam_config_read()
264 bool is_rad_bridge = devfn == 0xa0; in thunder_ecam_config_read()
265 bool is_zip_bridge = devfn == 0xa8; in thunder_ecam_config_read()
266 bool is_dfa_bridge = devfn == 0xb0; in thunder_ecam_config_read()
267 bool is_nic_bridge = devfn == 0x10; in thunder_ecam_config_read()
269 if (where_a == 0x70) { in thunder_ecam_config_read()
272 *val = ~0; in thunder_ecam_config_read()
276 if (v & 0xff00) in thunder_ecam_config_read()
278 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
282 if (where_a == 0xbc) { in thunder_ecam_config_read()
284 v = 0x10014; /* EA last in chain, 1 entry */ in thunder_ecam_config_read()
286 v = 0x00014; /* EA last in chain, no entries */ in thunder_ecam_config_read()
290 if (where_a == 0xc0) { in thunder_ecam_config_read()
292 v = 0x0101; /* subordinate:secondary = 1:1 */ in thunder_ecam_config_read()
294 v = 0x0202; /* subordinate:secondary = 2:2 */ in thunder_ecam_config_read()
296 v = 0x0303; /* subordinate:secondary = 3:3 */ in thunder_ecam_config_read()
298 v = 0x0404; /* subordinate:secondary = 4:4 */ in thunder_ecam_config_read()
302 if (where_a == 0xc4 && is_nic_bridge) { in thunder_ecam_config_read()
304 v = 0x80ff0564; in thunder_ecam_config_read()
308 if (where_a == 0xc8 && is_nic_bridge) { in thunder_ecam_config_read()
309 v = 0x00000002; /* Base-L 64-bit */ in thunder_ecam_config_read()
313 if (where_a == 0xcc && is_nic_bridge) { in thunder_ecam_config_read()
314 v = 0xfffffffe; /* MaxOffset-L 64-bit */ in thunder_ecam_config_read()
318 if (where_a == 0xd0 && is_nic_bridge) { in thunder_ecam_config_read()
319 v = 0x00008430; /* NIC Base-H */ in thunder_ecam_config_read()
323 if (where_a == 0xd4 && is_nic_bridge) { in thunder_ecam_config_read()
324 v = 0x0000000f; /* MaxOffset-H */ in thunder_ecam_config_read()
340 if ((where >= 0x10 && where < 0x2c) || in thunder_ecam_config_write()
341 (where >= 0x1a4 && where < 0x1bc)) in thunder_ecam_config_write()