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 int)(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()
47 v = readl(addr); in handle_ea_bar()
48 v &= ~0xf; in handle_ea_bar()
49 v |= 2; /* EA entry-1. Base-L */ in handle_ea_bar()
50 set_val(v, where, size, val); in handle_ea_bar()
66 v = ~barl_rb & ~3; in handle_ea_bar()
67 v |= 0xc; /* EA entry-2. Offset-L */ in handle_ea_bar()
68 set_val(v, where, size, val); in handle_ea_bar()
76 v = readl(addr); /* EA entry-3. Base-H */ in handle_ea_bar()
77 set_val(v, where, size, val); in handle_ea_bar()
87 int where_a = where & ~3; in thunder_ecam_p2_config_read()
90 u32 v; in thunder_ecam_p2_config_read() local
107 v = readl(addr); in thunder_ecam_p2_config_read()
116 v |= node_bits; in thunder_ecam_p2_config_read()
117 set_val(v, where, size, val); in thunder_ecam_p2_config_read()
125 u32 v; in thunder_ecam_config_read() local
130 int where_a = where & ~3; in thunder_ecam_config_read()
136 v = readl(addr); in thunder_ecam_config_read()
139 cfg_type = (v >> 16) & 0x7f; in thunder_ecam_config_read()
192 v = readl(addr); in thunder_ecam_config_read()
193 has_msix = (v & 0xff00) != 0; in thunder_ecam_config_read()
196 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
197 set_val(v, where, size, val); in thunder_ecam_config_read()
205 v = readl(addr); in thunder_ecam_config_read()
206 if (v & 0xff00) in thunder_ecam_config_read()
207 pr_err("Bad MSIX cap header: %08x\n", v); 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()
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()
221 set_val(v, where, size, val); in thunder_ecam_config_read()
225 /* EA entry-0. PP=0, BAR0 Size:3 */ in thunder_ecam_config_read()
230 /* EA entry-1. PP=0, BAR4 Size:3 */ in thunder_ecam_config_read()
235 /* EA entry-2. PP=0, BAR2, Size:3 */ in thunder_ecam_config_read()
240 /* EA entry-2. PP=4, VF_BAR0 (9), Size:3 */ in thunder_ecam_config_read()
245 /* EA entry-3. PP=4, VF_BAR4 (d), Size:3 */ in thunder_ecam_config_read()
261 v = readl(addr); in thunder_ecam_config_read()
262 if (v & 0xff00) in thunder_ecam_config_read()
263 pr_err("Bad PCIe cap header: %08x\n", v); in thunder_ecam_config_read()
264 v |= 0xbc00; /* next capability is EA at 0xbc */ in thunder_ecam_config_read()
265 set_val(v, where, size, val); 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()
273 set_val(v, where, size, val); 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()
285 set_val(v, where, size, val); in thunder_ecam_config_read()
290 v = 0x80ff0564; in thunder_ecam_config_read()
291 set_val(v, where, size, val); in thunder_ecam_config_read()
295 v = 0x00000002; /* Base-L 64-bit */ in thunder_ecam_config_read()
296 set_val(v, where, size, val); in thunder_ecam_config_read()
300 v = 0xfffffffe; /* MaxOffset-L 64-bit */ in thunder_ecam_config_read()
301 set_val(v, where, size, val); in thunder_ecam_config_read()
305 v = 0x00008430; /* NIC Base-H */ in thunder_ecam_config_read()
306 set_val(v, where, size, val); in thunder_ecam_config_read()
310 v = 0x0000000f; /* MaxOffset-H */ in thunder_ecam_config_read()
311 set_val(v, where, size, val); in thunder_ecam_config_read()