Lines Matching refs:fn
160 static int virtex2_slave_pre(xilinx_virtex2_slave_fns *fn, int cookie) in virtex2_slave_pre() argument
165 __func__, __LINE__, fn); in virtex2_slave_pre()
167 if (!fn) { in virtex2_slave_pre()
182 &fn, fn, fn->pre, fn->pgm, fn->init, fn->err); in virtex2_slave_pre()
191 fn->clk, fn->cs, fn->wr, fn->rdata, fn->wdata, in virtex2_slave_pre()
192 fn->busy, fn->abort, fn->post); in virtex2_slave_pre()
200 if (*fn->pre) in virtex2_slave_pre()
201 (*fn->pre)(cookie); in virtex2_slave_pre()
209 (*fn->pgm)(true, true, cookie); in virtex2_slave_pre()
216 (*fn->abort)(cookie); in virtex2_slave_pre()
219 } while (!(*fn->init)(cookie)); in virtex2_slave_pre()
221 (*fn->pgm)(false, true, cookie); in virtex2_slave_pre()
223 if (fn->clk) in virtex2_slave_pre()
224 (*fn->clk)(true, true, cookie); in virtex2_slave_pre()
235 (*fn->abort)(cookie); in virtex2_slave_pre()
238 } while ((*fn->init)(cookie) && (*fn->busy)(cookie)); in virtex2_slave_pre()
240 if (fn->wr) in virtex2_slave_pre()
241 (*fn->wr)(true, true, cookie); in virtex2_slave_pre()
242 if (fn->cs) in virtex2_slave_pre()
243 (*fn->cs)(true, true, cookie); in virtex2_slave_pre()
249 static int virtex2_slave_post(xilinx_virtex2_slave_fns *fn, in virtex2_slave_post() argument
260 if (fn->cs) in virtex2_slave_post()
261 (*fn->cs)(false, true, cookie); in virtex2_slave_post()
262 if (fn->wr) in virtex2_slave_post()
263 (*fn->wr)(false, true, cookie); in virtex2_slave_post()
277 if ((*fn->done)(cookie) == FPGA_SUCCESS && in virtex2_slave_post()
278 !((*fn->init)(cookie))) { in virtex2_slave_post()
286 (*fn->abort)(cookie); in virtex2_slave_post()
290 if (fn->wbulkdata) { in virtex2_slave_post()
292 (*fn->wbulkdata)(&dummy, 1, true, cookie); in virtex2_slave_post()
294 (*fn->wdata)(0xff, true, cookie); in virtex2_slave_post()
296 (*fn->clk)(false, true, cookie); in virtex2_slave_post()
298 (*fn->clk)(true, true, cookie); in virtex2_slave_post()
309 if (*fn->post) in virtex2_slave_post()
310 (*fn->post)(cookie); in virtex2_slave_post()
323 xilinx_virtex2_slave_fns *fn = desc->iface_fns; in virtex2_ssm_load() local
328 ret_val = virtex2_slave_pre(fn, cookie); in virtex2_ssm_load()
338 (*fn->abort)(cookie); in virtex2_ssm_load()
343 if ((*fn->done)(cookie) == FPGA_SUCCESS) { in virtex2_ssm_load()
350 if ((*fn->init)(cookie)) { in virtex2_ssm_load()
355 (*fn->abort)(cookie); in virtex2_ssm_load()
360 (*fn->wdata)(data[bytecount++], true, cookie); in virtex2_ssm_load()
366 (*fn->clk)(false, true, cookie); in virtex2_ssm_load()
368 (*fn->clk)(true, true, cookie); in virtex2_ssm_load()
372 while ((*fn->busy)(cookie)) { in virtex2_ssm_load()
377 (*fn->abort)(cookie); in virtex2_ssm_load()
389 return virtex2_slave_post(fn, cookie); in virtex2_ssm_load()
398 xilinx_virtex2_slave_fns *fn = desc->iface_fns; in virtex2_ssm_dump() local
400 if (fn) { in virtex2_ssm_dump()
407 (*fn->cs)(true, true, cookie); in virtex2_ssm_dump()
408 (*fn->clk)(true, true, cookie); in virtex2_ssm_dump()
413 (*fn->abort)(cookie); in virtex2_ssm_dump()
420 (*fn->clk)(false, true, cookie); in virtex2_ssm_dump()
421 (*fn->clk)(true, true, cookie); in virtex2_ssm_dump()
422 (*fn->rdata)(&data[bytecount++], cookie); in virtex2_ssm_dump()
432 (*fn->cs)(false, false, cookie); in virtex2_ssm_dump()
433 (*fn->clk)(false, true, cookie); in virtex2_ssm_dump()
434 (*fn->clk)(true, true, cookie); in virtex2_ssm_dump()
450 xilinx_virtex2_slave_fns *fn = desc->iface_fns; in virtex2_ss_load() local
454 ret_val = virtex2_slave_pre(fn, cookie); in virtex2_ss_load()
458 if (fn->wbulkdata) { in virtex2_ss_load()
460 (*fn->wbulkdata)(data, bsize, true, cookie); in virtex2_ss_load()
473 (*fn->abort) (cookie); in virtex2_ss_load()
478 if ((*fn->done)(cookie) == FPGA_SUCCESS) { in virtex2_ss_load()
485 if ((*fn->init)(cookie)) { in virtex2_ss_load()
490 (*fn->abort)(cookie); in virtex2_ss_load()
497 (*fn->wdata)(curr_bit, true, cookie); in virtex2_ss_load()
499 (*fn->clk)(false, true, cookie); in virtex2_ss_load()
501 (*fn->clk)(true, true, cookie); in virtex2_ss_load()
513 return virtex2_slave_post(fn, cookie); in virtex2_ss_load()