Lines Matching refs:fn

106 	xilinx_spartan3_slave_parallel_fns *fn = desc->iface_fns;  in spartan3_sp_load()  local
109 __FUNCTION__, fn); in spartan3_sp_load()
111 if (fn) { in spartan3_sp_load()
132 __FUNCTION__, &fn, fn, fn->pre, fn->pgm, fn->init, fn->err, in spartan3_sp_load()
133 fn->clk, fn->cs, fn->wr, fn->rdata, fn->wdata, fn->busy, in spartan3_sp_load()
134 fn->abort, fn->post); in spartan3_sp_load()
147 if (*fn->pre) { in spartan3_sp_load()
148 (*fn->pre) (cookie); in spartan3_sp_load()
152 (*fn->pgm) (true, true, cookie); /* Assert the program, commit */ in spartan3_sp_load()
156 (*fn->pgm) (false, true, cookie); /* Deassert the program, commit */ in spartan3_sp_load()
164 (*fn->abort) (cookie); /* abort the burn */ in spartan3_sp_load()
167 } while ((*fn->init) (cookie) && (*fn->busy) (cookie)); in spartan3_sp_load()
169 (*fn->wr) (true, true, cookie); /* Assert write, commit */ in spartan3_sp_load()
170 (*fn->cs) (true, true, cookie); /* Assert chip select, commit */ in spartan3_sp_load()
171 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan3_sp_load()
178 (*fn->wdata) (data[bytecount++], true, cookie); /* write the data */ in spartan3_sp_load()
180 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan3_sp_load()
182 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan3_sp_load()
186 while ((*fn->busy) (cookie)) { in spartan3_sp_load()
191 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan3_sp_load()
193 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan3_sp_load()
197 (*fn->abort) (cookie); /* abort the burn */ in spartan3_sp_load()
210 (*fn->cs) (false, true, cookie); /* Deassert the chip select */ in spartan3_sp_load()
211 (*fn->wr) (false, true, cookie); /* Deassert the write pin */ in spartan3_sp_load()
220 while ((*fn->done) (cookie) == FPGA_FAIL) { in spartan3_sp_load()
225 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan3_sp_load()
227 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan3_sp_load()
231 (*fn->abort) (cookie); /* abort the burn */ in spartan3_sp_load()
240 if (*fn->post) in spartan3_sp_load()
241 (*fn->post) (cookie); in spartan3_sp_load()
260 xilinx_spartan3_slave_parallel_fns *fn = desc->iface_fns; in spartan3_sp_dump() local
262 if (fn) { in spartan3_sp_dump()
269 (*fn->cs) (true, true, cookie); /* Assert chip select, commit */ in spartan3_sp_dump()
270 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan3_sp_dump()
276 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan3_sp_dump()
277 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan3_sp_dump()
278 (*fn->rdata) (&(data[bytecount++]), cookie); /* read the data */ in spartan3_sp_dump()
285 (*fn->cs) (false, false, cookie); /* Deassert the chip select */ in spartan3_sp_dump()
286 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan3_sp_dump()
287 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan3_sp_dump()
308 xilinx_spartan3_slave_serial_fns *fn = desc->iface_fns; in spartan3_ss_load() local
313 __FUNCTION__, fn); in spartan3_ss_load()
315 if (fn) { in spartan3_ss_load()
329 __FUNCTION__, &fn, fn, fn->pgm, fn->init, in spartan3_ss_load()
330 fn->clk, fn->wr, fn->done); in spartan3_ss_load()
338 if (*fn->pre) { in spartan3_ss_load()
339 (*fn->pre) (cookie); in spartan3_ss_load()
343 (*fn->pgm) (true, true, cookie); /* Assert the program, commit */ in spartan3_ss_load()
351 if (*fn->abort) in spartan3_ss_load()
352 (*fn->abort) (cookie); in spartan3_ss_load()
355 } while (!(*fn->init) (cookie)); in spartan3_ss_load()
359 (*fn->pgm) (false, true, cookie); /* Deassert the program, commit */ in spartan3_ss_load()
367 if (*fn->abort) in spartan3_ss_load()
368 (*fn->abort) (cookie); in spartan3_ss_load()
371 } while ((*fn->init) (cookie)); in spartan3_ss_load()
374 if(*fn->bwr) in spartan3_ss_load()
375 (*fn->bwr) (data, bsize, true, cookie); in spartan3_ss_load()
381 if ((*fn->done) (cookie) == 0 && (*fn->init) (cookie)) { in spartan3_ss_load()
383 if (*fn->abort) in spartan3_ss_load()
384 (*fn->abort) (cookie); in spartan3_ss_load()
391 (*fn->clk) (false, true, cookie); in spartan3_ss_load()
394 (*fn->wr) ((val & 0x80), true, cookie); in spartan3_ss_load()
397 (*fn->clk) (true, true, cookie); in spartan3_ss_load()
419 (*fn->wr) (true, true, cookie); in spartan3_ss_load()
421 while (! (*fn->done) (cookie)) { in spartan3_ss_load()
426 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan3_ss_load()
428 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan3_ss_load()
443 if (*fn->post) in spartan3_ss_load()
444 (*fn->post) (cookie); in spartan3_ss_load()