c = kcalloc(bar_count, sizeof(struct chameleon_bar),
GFP_KERNEL); if (!c) return -ENOMEM;
chameleon_parse_bar(*base, c, bar_count);
*base += BAR_DESC_SIZE(bar_count);
} else {
c = kzalloc(sizeof(struct chameleon_bar), GFP_KERNEL); if (!c) return -ENOMEM;
bar_count = 1;
c->addr = mapbase;
}
*cb = c;
return bar_count;
}
int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase, void __iomem *base)
{ struct chameleon_fpga_header *header; struct chameleon_bar *cb; void __iomem *p = base; int num_cells = 0;
uint32_t dtype; int bar_count; int ret;
u32 hsize;
u32 table_size;
hsize = sizeof(struct chameleon_fpga_header);
header = kzalloc(hsize, GFP_KERNEL); if (!header) return -ENOMEM;
/* Extract header information */
memcpy_fromio(header, p, hsize); /* We only support chameleon v2 at the moment */
header->magic = le16_to_cpu(header->magic); if (header->magic != CHAMELEONV2_MAGIC) {
pr_err("Unsupported chameleon version 0x%x\n",
header->magic);
ret = -ENODEV; goto free_header;
}
p += hsize;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.