/* * We need to check how many words are available in the RNG FIFO. If * there aren't any, we need to wait for some to become available.
*/ while ((num_words = bcm74110_rng_fifo_count(fc_addr)) == 0) { if (!wait) return 0; /* * As a precaution, limit how long we wait. If the FIFO doesn't * refill within the allotted time, return 0 (=no data) to the * caller.
*/ if (likely(underrun_count < FIFO_DELAY_MAX_COUNT))
usleep_range(FIFO_DELAY_MIN_US, FIFO_DELAY_MAX_US); else return 0;
underrun_count++;
} if (num_words > max_words)
num_words = max_words;
/* Bail early if we run out of random numbers unexpectedly */ for (i = 0; i < num_words && bcm74110_rng_fifo_count(fc_addr) > 0; i++)
((u32 *)buf)[i] = readl_relaxed(fd_addr);
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.