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()
48 v &= ~0xf; in handle_ea_bar()
53 if (where_a == 0x8) { in handle_ea_bar()
57 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
61 barl_orig = readl(addr + 0); in handle_ea_bar()
62 writel(0xffffffff, addr + 0); in handle_ea_bar()
63 barl_rb = readl(addr + 0); in handle_ea_bar()
64 writel(barl_orig, addr + 0); in handle_ea_bar()
67 v |= 0xc; /* EA entry-2. Offset-L */ in handle_ea_bar()
71 if (where_a == 0xc) { in handle_ea_bar()
94 case 0xa8: in thunder_ecam_p2_config_read()
95 case 0xbc: in thunder_ecam_p2_config_read()
96 case 0xd0: in thunder_ecam_p2_config_read()
97 case 0xe4: in thunder_ecam_p2_config_read()
132 addr = bus->ops->map_bus(bus, devfn, 0xc); in thunder_ecam_config_read()
139 cfg_type = (v >> 16) & 0x7f; in thunder_ecam_config_read()
146 if (class_rev == 0xffffffff) in thunder_ecam_config_read()
149 if ((class_rev & 0xff) >= 8) { in thunder_ecam_config_read()
161 if (cfg_type == 0 && in thunder_ecam_config_read()
162 ((where >= 0x10 && where < 0x2c) || in thunder_ecam_config_read()
163 (where >= 0x1a4 && where < 0x1bc))) { in thunder_ecam_config_read()
165 *val = 0; in thunder_ecam_config_read()
169 addr = bus->ops->map_bus(bus, devfn, 0); in thunder_ecam_config_read()
174 if (vendor_device == 0xffffffff) in thunder_ecam_config_read()
178 vendor_device & 0xffff, vendor_device >> 16, class_rev, in thunder_ecam_config_read()
182 if (cfg_type == 0) { in thunder_ecam_config_read()
184 bool is_nic = (vendor_device == 0xa01e177d); in thunder_ecam_config_read()
185 bool is_tns = (vendor_device == 0xa01f177d); in thunder_ecam_config_read()
187 addr = bus->ops->map_bus(bus, devfn, 0x70); in thunder_ecam_config_read()
193 has_msix = (v & 0xff00) != 0; in thunder_ecam_config_read()
195 if (!has_msix && where_a == 0x70) { in thunder_ecam_config_read()
196 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
200 if (where_a == 0xb0) { in thunder_ecam_config_read()
206 if (v & 0xff00) in thunder_ecam_config_read()
208 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
212 if (where_a == 0xbc) { in thunder_ecam_config_read()
214 v = 0x40014; /* EA last in chain, 4 entries */ in thunder_ecam_config_read()
216 v = 0x30014; /* EA last in chain, 3 entries */ in thunder_ecam_config_read()
218 v = 0x20014; /* EA last in chain, 2 entries */ in thunder_ecam_config_read()
220 v = 0x10014; /* EA last in chain, 1 entry */ in thunder_ecam_config_read()
224 if (where_a >= 0xc0 && where_a < 0xd0) in thunder_ecam_config_read()
225 /* EA entry-0. PP=0, BAR0 Size:3 */ in thunder_ecam_config_read()
226 return handle_ea_bar(0x80ff0003, in thunder_ecam_config_read()
227 0x10, bus, devfn, where, in thunder_ecam_config_read()
229 if (where_a >= 0xd0 && where_a < 0xe0 && has_msix) in thunder_ecam_config_read()
230 /* EA entry-1. PP=0, BAR4 Size:3 */ in thunder_ecam_config_read()
231 return handle_ea_bar(0x80ff0043, in thunder_ecam_config_read()
232 0x20, bus, devfn, where, in thunder_ecam_config_read()
234 if (where_a >= 0xe0 && where_a < 0xf0 && is_tns) in thunder_ecam_config_read()
235 /* EA entry-2. PP=0, BAR2, Size:3 */ in thunder_ecam_config_read()
236 return handle_ea_bar(0x80ff0023, in thunder_ecam_config_read()
237 0x18, bus, devfn, where, in thunder_ecam_config_read()
239 if (where_a >= 0xe0 && where_a < 0xf0 && is_nic) in thunder_ecam_config_read()
241 return handle_ea_bar(0x80ff0493, in thunder_ecam_config_read()
242 0x1a4, bus, devfn, where, in thunder_ecam_config_read()
244 if (where_a >= 0xf0 && where_a < 0x100 && is_nic) in thunder_ecam_config_read()
246 return handle_ea_bar(0x80ff04d3, in thunder_ecam_config_read()
247 0x1b4, bus, devfn, where, in thunder_ecam_config_read()
250 bool is_rsl_bridge = devfn == 0x08; in thunder_ecam_config_read()
251 bool is_rad_bridge = devfn == 0xa0; in thunder_ecam_config_read()
252 bool is_zip_bridge = devfn == 0xa8; in thunder_ecam_config_read()
253 bool is_dfa_bridge = devfn == 0xb0; in thunder_ecam_config_read()
254 bool is_nic_bridge = devfn == 0x10; in thunder_ecam_config_read()
256 if (where_a == 0x70) { in thunder_ecam_config_read()
262 if (v & 0xff00) in thunder_ecam_config_read()
264 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
268 if (where_a == 0xbc) { in thunder_ecam_config_read()
270 v = 0x10014; /* EA last in chain, 1 entry */ in thunder_ecam_config_read()
272 v = 0x00014; /* EA last in chain, no entries */ in thunder_ecam_config_read()
276 if (where_a == 0xc0) { in thunder_ecam_config_read()
278 v = 0x0101; /* subordinate:secondary = 1:1 */ in thunder_ecam_config_read()
280 v = 0x0202; /* subordinate:secondary = 2:2 */ in thunder_ecam_config_read()
282 v = 0x0303; /* subordinate:secondary = 3:3 */ in thunder_ecam_config_read()
284 v = 0x0404; /* subordinate:secondary = 4:4 */ in thunder_ecam_config_read()
288 if (where_a == 0xc4 && is_nic_bridge) { in thunder_ecam_config_read()
290 v = 0x80ff0564; in thunder_ecam_config_read()
294 if (where_a == 0xc8 && is_nic_bridge) { in thunder_ecam_config_read()
295 v = 0x00000002; /* Base-L 64-bit */ in thunder_ecam_config_read()
299 if (where_a == 0xcc && is_nic_bridge) { in thunder_ecam_config_read()
300 v = 0xfffffffe; /* MaxOffset-L 64-bit */ in thunder_ecam_config_read()
304 if (where_a == 0xd0 && is_nic_bridge) { in thunder_ecam_config_read()
305 v = 0x00008430; /* NIC Base-H */ in thunder_ecam_config_read()
309 if (where_a == 0xd4 && is_nic_bridge) { in thunder_ecam_config_read()
310 v = 0x0000000f; /* MaxOffset-H */ in thunder_ecam_config_read()
326 if ((where >= 0x10 && where < 0x2c) || in thunder_ecam_config_write()
327 (where >= 0x1a4 && where < 0x1bc)) in thunder_ecam_config_write()