Lines Matching refs:desc
22 static int xilinx_validate(xilinx_desc *desc, char *fn);
28 const fpga_desc * const desc = fpga_get_desc(devnum); in fpga_is_partial_data() local
29 xilinx_desc *desc_xilinx = desc->devdesc; in fpga_is_partial_data()
46 const fpga_desc *desc; in fpga_loadbitstream() local
51 desc = fpga_validate(devnum, dataptr, 0, (char *)__func__); in fpga_loadbitstream()
53 xdesc = desc->devdesc; in fpga_loadbitstream()
140 int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize, in xilinx_load() argument
143 if (!xilinx_validate (desc, (char *)__FUNCTION__)) { in xilinx_load()
148 if (!desc->operations || !desc->operations->load) { in xilinx_load()
153 return desc->operations->load(desc, buf, bsize, bstype); in xilinx_load()
157 int xilinx_loadfs(xilinx_desc *desc, const void *buf, size_t bsize, in xilinx_loadfs() argument
160 if (!xilinx_validate(desc, (char *)__func__)) { in xilinx_loadfs()
165 if (!desc->operations || !desc->operations->loadfs) { in xilinx_loadfs()
170 return desc->operations->loadfs(desc, buf, bsize, fpga_fsinfo); in xilinx_loadfs()
175 int xilinx_loads(xilinx_desc *desc, const void *buf, size_t bsize, in xilinx_loads() argument
178 if (!xilinx_validate(desc, (char *)__func__)) { in xilinx_loads()
183 if (!desc->operations || !desc->operations->loads) { in xilinx_loads()
188 return desc->operations->loads(desc, buf, bsize, fpga_sec_info); in xilinx_loads()
192 int xilinx_dump(xilinx_desc *desc, const void *buf, size_t bsize) in xilinx_dump() argument
194 if (!xilinx_validate (desc, (char *)__FUNCTION__)) { in xilinx_dump()
199 if (!desc->operations || !desc->operations->dump) { in xilinx_dump()
204 return desc->operations->dump(desc, buf, bsize); in xilinx_dump()
207 int xilinx_info(xilinx_desc *desc) in xilinx_info() argument
211 if (xilinx_validate (desc, (char *)__FUNCTION__)) { in xilinx_info()
213 switch (desc->family) { in xilinx_info()
231 printf ("Unknown family type, %d\n", desc->family); in xilinx_info()
235 switch (desc->iface) { in xilinx_info()
262 printf ("Unsupported interface type, %d\n", desc->iface); in xilinx_info()
267 desc->size, desc->cookie, desc->cookie); in xilinx_info()
268 if (desc->name) in xilinx_info()
269 printf("Device name: \t%s\n", desc->name); in xilinx_info()
271 if (desc->iface_fns) in xilinx_info()
272 printf ("Device Function Table @ 0x%p\n", desc->iface_fns); in xilinx_info()
276 if (desc->operations && desc->operations->info) in xilinx_info()
277 desc->operations->info(desc); in xilinx_info()
289 static int xilinx_validate(xilinx_desc *desc, char *fn) in xilinx_validate() argument
293 if (desc) { in xilinx_validate()
294 if ((desc->family > min_xilinx_type) && in xilinx_validate()
295 (desc->family < max_xilinx_type)) { in xilinx_validate()
296 if ((desc->iface > min_xilinx_iface_type) && in xilinx_validate()
297 (desc->iface < max_xilinx_iface_type)) { in xilinx_validate()
298 if (desc->size) { in xilinx_validate()
304 fn, desc->iface); in xilinx_validate()
306 printf ("%s: Invalid family type, %d\n", fn, desc->family); in xilinx_validate()