Lines Matching +full:3 +full:v

16 static void set_val(u32 v, int where, int size, u32 *val)  in set_val()  argument
18 int shift = (where & 3) * 8; in set_val()
20 pr_debug("set_val %04x: %08x\n", (unsigned)(where & ~3), v); in set_val()
21 v >>= shift; in set_val()
23 v &= 0xff; in set_val()
25 v &= 0xffff; in set_val()
26 *val = v; in set_val()
33 u32 v; in handle_ea_bar() local
35 /* Entries are 16-byte aligned; bits[2,3] select word in entry */ in handle_ea_bar()
48 v = readl(addr); in handle_ea_bar()
49 v &= ~0xf; in handle_ea_bar()
50 v |= 2; /* EA entry-1. Base-L */ in handle_ea_bar()
51 set_val(v, where, size, val); in handle_ea_bar()
68 v = ~barl_rb & ~3; in handle_ea_bar()
69 v |= 0xc; /* EA entry-2. Offset-L */ in handle_ea_bar()
70 set_val(v, where, size, val); in handle_ea_bar()
79 v = readl(addr); /* EA entry-3. Base-H */ in handle_ea_bar()
80 set_val(v, where, size, val); in handle_ea_bar()
90 int where_a = where & ~3; in thunder_ecam_p2_config_read()
93 u32 v; in thunder_ecam_p2_config_read() local
112 v = readl(addr); in thunder_ecam_p2_config_read()
121 v |= node_bits; in thunder_ecam_p2_config_read()
122 set_val(v, where, size, val); in thunder_ecam_p2_config_read()
130 u32 v; in thunder_ecam_config_read() local
135 int where_a = where & ~3; in thunder_ecam_config_read()
143 v = readl(addr); in thunder_ecam_config_read()
146 cfg_type = (v >> 16) & 0x7f; in thunder_ecam_config_read()
204 v = readl(addr); in thunder_ecam_config_read()
205 has_msix = (v & 0xff00) != 0; in thunder_ecam_config_read()
208 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
209 set_val(v, where, size, val); in thunder_ecam_config_read()
218 v = readl(addr); in thunder_ecam_config_read()
219 if (v & 0xff00) in thunder_ecam_config_read()
220 pr_err("Bad MSIX cap header: %08x\n", v); in thunder_ecam_config_read()
221 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
222 set_val(v, where, size, val); 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()
234 set_val(v, where, size, val); in thunder_ecam_config_read()
238 /* EA entry-0. PP=0, BAR0 Size:3 */ in thunder_ecam_config_read()
243 /* EA entry-1. PP=0, BAR4 Size:3 */ in thunder_ecam_config_read()
248 /* EA entry-2. PP=0, BAR2, Size:3 */ in thunder_ecam_config_read()
253 /* EA entry-2. PP=4, VF_BAR0 (9), Size:3 */ in thunder_ecam_config_read()
258 /* EA entry-3. PP=4, VF_BAR4 (d), Size:3 */ in thunder_ecam_config_read()
275 v = readl(addr); in thunder_ecam_config_read()
276 if (v & 0xff00) in thunder_ecam_config_read()
277 pr_err("Bad PCIe cap header: %08x\n", v); in thunder_ecam_config_read()
278 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
279 set_val(v, where, size, val); 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()
287 set_val(v, where, size, val); 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()
299 set_val(v, where, size, val); in thunder_ecam_config_read()
304 v = 0x80ff0564; in thunder_ecam_config_read()
305 set_val(v, where, size, val); in thunder_ecam_config_read()
309 v = 0x00000002; /* Base-L 64-bit */ in thunder_ecam_config_read()
310 set_val(v, where, size, val); in thunder_ecam_config_read()
314 v = 0xfffffffe; /* MaxOffset-L 64-bit */ in thunder_ecam_config_read()
315 set_val(v, where, size, val); in thunder_ecam_config_read()
319 v = 0x00008430; /* NIC Base-H */ in thunder_ecam_config_read()
320 set_val(v, where, size, val); in thunder_ecam_config_read()
324 v = 0x0000000f; /* MaxOffset-H */ in thunder_ecam_config_read()
325 set_val(v, where, size, val); in thunder_ecam_config_read()