Lines Matching refs:desc

23 static int xilinx_validate(xilinx_desc *desc, char *fn);
29 const fpga_desc * const desc = fpga_get_desc(devnum); in fpga_is_partial_data() local
30 xilinx_desc *desc_xilinx = desc->devdesc; in fpga_is_partial_data()
47 const fpga_desc *desc; in fpga_loadbitstream() local
52 desc = fpga_validate(devnum, dataptr, 0, (char *)__func__); in fpga_loadbitstream()
54 xdesc = desc->devdesc; in fpga_loadbitstream()
141 int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize, in xilinx_load() argument
144 if (!xilinx_validate (desc, (char *)__FUNCTION__)) { in xilinx_load()
149 if (!desc->operations || !desc->operations->load) { in xilinx_load()
154 return desc->operations->load(desc, buf, bsize, bstype); in xilinx_load()
158 int xilinx_loadfs(xilinx_desc *desc, const void *buf, size_t bsize, in xilinx_loadfs() argument
161 if (!xilinx_validate(desc, (char *)__func__)) { in xilinx_loadfs()
166 if (!desc->operations || !desc->operations->loadfs) { in xilinx_loadfs()
171 return desc->operations->loadfs(desc, buf, bsize, fpga_fsinfo); in xilinx_loadfs()
176 int xilinx_loads(xilinx_desc *desc, const void *buf, size_t bsize, in xilinx_loads() argument
179 if (!xilinx_validate(desc, (char *)__func__)) { in xilinx_loads()
184 if (!desc->operations || !desc->operations->loads) { in xilinx_loads()
189 return desc->operations->loads(desc, buf, bsize, fpga_sec_info); in xilinx_loads()
193 int xilinx_dump(xilinx_desc *desc, const void *buf, size_t bsize) in xilinx_dump() argument
195 if (!xilinx_validate (desc, (char *)__FUNCTION__)) { in xilinx_dump()
200 if (!desc->operations || !desc->operations->dump) { in xilinx_dump()
205 return desc->operations->dump(desc, buf, bsize); in xilinx_dump()
208 int xilinx_info(xilinx_desc *desc) in xilinx_info() argument
212 if (xilinx_validate (desc, (char *)__FUNCTION__)) { in xilinx_info()
214 switch (desc->family) { in xilinx_info()
235 printf ("Unknown family type, %d\n", desc->family); in xilinx_info()
239 switch (desc->iface) { in xilinx_info()
269 printf ("Unsupported interface type, %d\n", desc->iface); in xilinx_info()
274 desc->size, desc->cookie, desc->cookie); in xilinx_info()
275 if (desc->name) in xilinx_info()
276 printf("Device name: \t%s\n", desc->name); in xilinx_info()
278 if (desc->iface_fns) in xilinx_info()
279 printf ("Device Function Table @ 0x%p\n", desc->iface_fns); in xilinx_info()
283 if (desc->operations && desc->operations->info) in xilinx_info()
284 desc->operations->info(desc); in xilinx_info()
296 static int xilinx_validate(xilinx_desc *desc, char *fn) in xilinx_validate() argument
300 if (desc) { in xilinx_validate()
301 if ((desc->family > min_xilinx_type) && in xilinx_validate()
302 (desc->family < max_xilinx_type)) { in xilinx_validate()
303 if ((desc->iface > min_xilinx_iface_type) && in xilinx_validate()
304 (desc->iface < max_xilinx_iface_type)) { in xilinx_validate()
305 if (desc->size) { in xilinx_validate()
311 fn, desc->iface); in xilinx_validate()
313 printf ("%s: Invalid family type, %d\n", fn, desc->family); in xilinx_validate()