• Home
  • Raw
  • Download

Lines Matching refs:desc

47 static int altera_validate(Altera_desc *desc, const char *fn)  in altera_validate()  argument
49 if (!desc) { in altera_validate()
54 if ((desc->family < min_altera_type) || in altera_validate()
55 (desc->family > max_altera_type)) { in altera_validate()
56 printf("%s: Invalid family type, %d\n", fn, desc->family); in altera_validate()
60 if ((desc->iface < min_altera_iface_type) || in altera_validate()
61 (desc->iface > max_altera_iface_type)) { in altera_validate()
62 printf("%s: Invalid Interface type, %d\n", fn, desc->iface); in altera_validate()
66 if (!desc->size) { in altera_validate()
75 altera_desc_to_fpga(Altera_desc *desc, const char *fn) in altera_desc_to_fpga() argument
79 if (altera_validate(desc, fn)) { in altera_desc_to_fpga()
85 if (desc->family == altera_fpga[i].family) in altera_desc_to_fpga()
90 printf("%s: Unsupported family type, %d\n", fn, desc->family); in altera_desc_to_fpga()
97 int altera_load(Altera_desc *desc, const void *buf, size_t bsize) in altera_load() argument
99 const struct altera_fpga *fpga = altera_desc_to_fpga(desc, __func__); in altera_load()
107 return fpga->load(desc, buf, bsize); in altera_load()
111 int altera_dump(Altera_desc *desc, const void *buf, size_t bsize) in altera_dump() argument
113 const struct altera_fpga *fpga = altera_desc_to_fpga(desc, __func__); in altera_dump()
121 return fpga->dump(desc, buf, bsize); in altera_dump()
125 int altera_info(Altera_desc *desc) in altera_info() argument
127 const struct altera_fpga *fpga = altera_desc_to_fpga(desc, __func__); in altera_info()
135 switch (desc->iface) { in altera_info()
159 printf("Unsupported interface type, %d\n", desc->iface); in altera_info()
164 desc->size, desc->cookie, desc->cookie); in altera_info()
166 if (desc->iface_fns) { in altera_info()
167 printf("Device Function Table @ 0x%p\n", desc->iface_fns); in altera_info()
169 fpga->info(desc); in altera_info()