Lines Matching refs:cookie

160 static int virtex2_slave_pre(xilinx_virtex2_slave_fns *fn, int cookie)  in virtex2_slave_pre()  argument
195 printf("Initializing FPGA Device %d...\n", cookie); 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()
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()
241 (*fn->wr)(true, true, cookie); in virtex2_slave_pre()
243 (*fn->cs)(true, true, cookie); in virtex2_slave_pre()
250 int cookie) in virtex2_slave_post() argument
261 (*fn->cs)(false, true, cookie); 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()
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()
304 printf("Initialization of FPGA device %d complete\n", cookie); in virtex2_slave_post()
310 (*fn->post)(cookie); in virtex2_slave_post()
314 cookie); in virtex2_slave_post()
326 int cookie = desc->cookie; 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()
403 int cookie = desc->cookie; in virtex2_ssm_dump() local
405 printf("Starting Dump of FPGA Device %d...\n", cookie); 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()
452 int cookie = desc->cookie; in virtex2_ss_load() local
454 ret_val = virtex2_slave_pre(fn, cookie); 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()