Lines Matching refs:fn
102 xilinx_spartan2_slave_parallel_fns *fn = desc->iface_fns; in spartan2_sp_load() local
105 __FUNCTION__, fn); in spartan2_sp_load()
107 if (fn) { in spartan2_sp_load()
128 __FUNCTION__, &fn, fn, fn->pre, fn->pgm, fn->init, fn->err, in spartan2_sp_load()
129 fn->clk, fn->cs, fn->wr, fn->rdata, fn->wdata, fn->busy, in spartan2_sp_load()
130 fn->abort, fn->post); in spartan2_sp_load()
143 if (*fn->pre) { in spartan2_sp_load()
144 (*fn->pre) (cookie); in spartan2_sp_load()
148 (*fn->pgm) (true, true, cookie); /* Assert the program, commit */ in spartan2_sp_load()
152 (*fn->pgm) (false, true, cookie); /* Deassert the program, commit */ in spartan2_sp_load()
160 (*fn->abort) (cookie); /* abort the burn */ in spartan2_sp_load()
163 } while ((*fn->init) (cookie) && (*fn->busy) (cookie)); in spartan2_sp_load()
165 (*fn->wr) (true, true, cookie); /* Assert write, commit */ in spartan2_sp_load()
166 (*fn->cs) (true, true, cookie); /* Assert chip select, commit */ in spartan2_sp_load()
167 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan2_sp_load()
174 (*fn->wdata) (data[bytecount++], true, cookie); /* write the data */ in spartan2_sp_load()
176 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan2_sp_load()
178 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan2_sp_load()
182 while ((*fn->busy) (cookie)) { in spartan2_sp_load()
187 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan2_sp_load()
189 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan2_sp_load()
193 (*fn->abort) (cookie); /* abort the burn */ in spartan2_sp_load()
206 (*fn->cs) (false, true, cookie); /* Deassert the chip select */ in spartan2_sp_load()
207 (*fn->wr) (false, true, cookie); /* Deassert the write pin */ in spartan2_sp_load()
216 while ((*fn->done) (cookie) == FPGA_FAIL) { in spartan2_sp_load()
219 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan2_sp_load()
221 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan2_sp_load()
225 (*fn->abort) (cookie); /* abort the burn */ in spartan2_sp_load()
234 if (*fn->post) in spartan2_sp_load()
235 (*fn->post) (cookie); in spartan2_sp_load()
254 xilinx_spartan2_slave_parallel_fns *fn = desc->iface_fns; in spartan2_sp_dump() local
256 if (fn) { in spartan2_sp_dump()
263 (*fn->cs) (true, true, cookie); /* Assert chip select, commit */ in spartan2_sp_dump()
264 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan2_sp_dump()
270 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan2_sp_dump()
271 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan2_sp_dump()
272 (*fn->rdata) (&(data[bytecount++]), cookie); /* read the data */ in spartan2_sp_dump()
279 (*fn->cs) (false, false, cookie); /* Deassert the chip select */ in spartan2_sp_dump()
280 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan2_sp_dump()
281 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan2_sp_dump()
302 xilinx_spartan2_slave_serial_fns *fn = desc->iface_fns; in spartan2_ss_load() local
307 __FUNCTION__, fn); in spartan2_ss_load()
309 if (fn) { in spartan2_ss_load()
323 __FUNCTION__, &fn, fn, fn->pgm, fn->init, in spartan2_ss_load()
324 fn->clk, fn->wr, fn->done); in spartan2_ss_load()
332 if (*fn->pre) { in spartan2_ss_load()
333 (*fn->pre) (cookie); in spartan2_ss_load()
337 (*fn->pgm) (true, true, cookie); /* Assert the program, commit */ in spartan2_ss_load()
347 } while (!(*fn->init) (cookie)); in spartan2_ss_load()
351 (*fn->pgm) (false, true, cookie); /* Deassert the program, commit */ in spartan2_ss_load()
361 } while ((*fn->init) (cookie)); in spartan2_ss_load()
368 if ((*fn->done) (cookie) == 0 && (*fn->init) (cookie)) { in spartan2_ss_load()
376 (*fn->clk) (false, true, cookie); in spartan2_ss_load()
379 (*fn->wr) ((val & 0x80), true, cookie); in spartan2_ss_load()
382 (*fn->clk) (true, true, cookie); in spartan2_ss_load()
403 (*fn->wr) (true, true, cookie); in spartan2_ss_load()
405 while (! (*fn->done) (cookie)) { in spartan2_ss_load()
408 (*fn->clk) (false, true, cookie); /* Deassert the clock pin */ in spartan2_ss_load()
410 (*fn->clk) (true, true, cookie); /* Assert the clock pin */ in spartan2_ss_load()
425 if (*fn->post) in spartan2_ss_load()
426 (*fn->post) (cookie); in spartan2_ss_load()