/* * The FPGA can be mapped in any of the generally available areas, * so we attempt to scan for it using the fixed SRSTR read magic. * * Once the FPGA is located, the rest of the mapping data for the other * components can be determined dynamically from its section mapping * registers.
*/ staticvoid __iomem *sdk7786_fpga_probe(void)
{ unsignedlong area; void __iomem *base;
/* * Iterate over all of the areas where the FPGA could be mapped. * The possible range is anywhere from area 0 through 6, area 7 * is reserved.
*/ for (area = PA_AREA0; area < PA_AREA7; area += SZ_64M) {
base = ioremap(area + FPGA_REGS_OFFSET, FPGA_REGS_SIZE); if (!base) { /* Failed to remap this area, move along. */ continue;
}
if (ioread16(base + SRSTR) == SRSTR_MAGIC) return base; /* Found it! */
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.