Lines Matching +full:0 +full:x1a4
25 v &= 0xff; in set_val()
27 v &= 0xffff; in set_val()
38 int where_a = where & 0xc; in handle_ea_bar()
40 if (where_a == 0) { in handle_ea_bar()
44 if (where_a == 0x4) { in handle_ea_bar()
45 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
50 v &= ~0xf; in handle_ea_bar()
55 if (where_a == 0x8) { in handle_ea_bar()
59 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 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()
96 case 0xa8: in thunder_ecam_p2_config_read()
97 case 0xbc: in thunder_ecam_p2_config_read()
98 case 0xd0: in thunder_ecam_p2_config_read()
99 case 0xe4: in thunder_ecam_p2_config_read()
134 addr = bus->ops->map_bus(bus, devfn, 0xc); in thunder_ecam_config_read()
141 cfg_type = (v >> 16) & 0x7f; in thunder_ecam_config_read()
148 if (class_rev == 0xffffffff) in thunder_ecam_config_read()
151 if ((class_rev & 0xff) >= 8) { in thunder_ecam_config_read()
163 if (cfg_type == 0 && in thunder_ecam_config_read()
164 ((where >= 0x10 && where < 0x2c) || in thunder_ecam_config_read()
165 (where >= 0x1a4 && where < 0x1bc))) { in thunder_ecam_config_read()
167 *val = 0; in thunder_ecam_config_read()
171 addr = bus->ops->map_bus(bus, devfn, 0); in thunder_ecam_config_read()
176 if (vendor_device == 0xffffffff) in thunder_ecam_config_read()
180 vendor_device & 0xffff, vendor_device >> 16, class_rev, in thunder_ecam_config_read()
184 if (cfg_type == 0) { in thunder_ecam_config_read()
186 bool is_nic = (vendor_device == 0xa01e177d); in thunder_ecam_config_read()
187 bool is_tns = (vendor_device == 0xa01f177d); in thunder_ecam_config_read()
189 addr = bus->ops->map_bus(bus, devfn, 0x70); in thunder_ecam_config_read()
195 has_msix = (v & 0xff00) != 0; in thunder_ecam_config_read()
197 if (!has_msix && where_a == 0x70) { in thunder_ecam_config_read()
198 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
202 if (where_a == 0xb0) { in thunder_ecam_config_read()
208 if (v & 0xff00) in thunder_ecam_config_read()
210 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
214 if (where_a == 0xbc) { in thunder_ecam_config_read()
216 v = 0x40014; /* EA last in chain, 4 entries */ in thunder_ecam_config_read()
218 v = 0x30014; /* EA last in chain, 3 entries */ in thunder_ecam_config_read()
220 v = 0x20014; /* EA last in chain, 2 entries */ in thunder_ecam_config_read()
222 v = 0x10014; /* EA last in chain, 1 entry */ in thunder_ecam_config_read()
226 if (where_a >= 0xc0 && where_a < 0xd0) in thunder_ecam_config_read()
227 /* EA entry-0. PP=0, BAR0 Size:3 */ in thunder_ecam_config_read()
228 return handle_ea_bar(0x80ff0003, in thunder_ecam_config_read()
229 0x10, bus, devfn, where, in thunder_ecam_config_read()
231 if (where_a >= 0xd0 && where_a < 0xe0 && has_msix) in thunder_ecam_config_read()
232 /* EA entry-1. PP=0, BAR4 Size:3 */ in thunder_ecam_config_read()
233 return handle_ea_bar(0x80ff0043, in thunder_ecam_config_read()
234 0x20, bus, devfn, where, in thunder_ecam_config_read()
236 if (where_a >= 0xe0 && where_a < 0xf0 && is_tns) in thunder_ecam_config_read()
237 /* EA entry-2. PP=0, BAR2, Size:3 */ in thunder_ecam_config_read()
238 return handle_ea_bar(0x80ff0023, in thunder_ecam_config_read()
239 0x18, bus, devfn, where, in thunder_ecam_config_read()
241 if (where_a >= 0xe0 && where_a < 0xf0 && is_nic) in thunder_ecam_config_read()
243 return handle_ea_bar(0x80ff0493, in thunder_ecam_config_read()
244 0x1a4, bus, devfn, where, in thunder_ecam_config_read()
246 if (where_a >= 0xf0 && where_a < 0x100 && is_nic) in thunder_ecam_config_read()
248 return handle_ea_bar(0x80ff04d3, in thunder_ecam_config_read()
249 0x1b4, bus, devfn, where, in thunder_ecam_config_read()
252 bool is_rsl_bridge = devfn == 0x08; in thunder_ecam_config_read()
253 bool is_rad_bridge = devfn == 0xa0; in thunder_ecam_config_read()
254 bool is_zip_bridge = devfn == 0xa8; in thunder_ecam_config_read()
255 bool is_dfa_bridge = devfn == 0xb0; in thunder_ecam_config_read()
256 bool is_nic_bridge = devfn == 0x10; in thunder_ecam_config_read()
258 if (where_a == 0x70) { in thunder_ecam_config_read()
264 if (v & 0xff00) in thunder_ecam_config_read()
266 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
270 if (where_a == 0xbc) { in thunder_ecam_config_read()
272 v = 0x10014; /* EA last in chain, 1 entry */ in thunder_ecam_config_read()
274 v = 0x00014; /* EA last in chain, no entries */ in thunder_ecam_config_read()
278 if (where_a == 0xc0) { in thunder_ecam_config_read()
280 v = 0x0101; /* subordinate:secondary = 1:1 */ in thunder_ecam_config_read()
282 v = 0x0202; /* subordinate:secondary = 2:2 */ in thunder_ecam_config_read()
284 v = 0x0303; /* subordinate:secondary = 3:3 */ in thunder_ecam_config_read()
286 v = 0x0404; /* subordinate:secondary = 4:4 */ in thunder_ecam_config_read()
290 if (where_a == 0xc4 && is_nic_bridge) { in thunder_ecam_config_read()
292 v = 0x80ff0564; in thunder_ecam_config_read()
296 if (where_a == 0xc8 && is_nic_bridge) { in thunder_ecam_config_read()
297 v = 0x00000002; /* Base-L 64-bit */ in thunder_ecam_config_read()
301 if (where_a == 0xcc && is_nic_bridge) { in thunder_ecam_config_read()
302 v = 0xfffffffe; /* MaxOffset-L 64-bit */ in thunder_ecam_config_read()
306 if (where_a == 0xd0 && is_nic_bridge) { in thunder_ecam_config_read()
307 v = 0x00008430; /* NIC Base-H */ in thunder_ecam_config_read()
311 if (where_a == 0xd4 && is_nic_bridge) { in thunder_ecam_config_read()
312 v = 0x0000000f; /* MaxOffset-H */ in thunder_ecam_config_read()
328 if ((where >= 0x10 && where < 0x2c) || in thunder_ecam_config_write()
329 (where >= 0x1a4 && where < 0x1bc)) in thunder_ecam_config_write()