Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/broadcom/bcm2835/bcm2835_rng.c
Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | for (cnt = sizeof(sc->sc_buf) / sizeof(uint32_t); cnt > 0; | ||||
bcm2835_rng_read_multi4(sc, RNG_DATA, dest, | bcm2835_rng_read_multi4(sc, RNG_DATA, dest, | ||||
num_words); | num_words); | ||||
dest += num_words; | dest += num_words; | ||||
nread += num_words; | nread += num_words; | ||||
} | } | ||||
cnt = nread * sizeof(uint32_t); | cnt = nread * sizeof(uint32_t); | ||||
if (cnt > 0) | if (cnt > 0) | ||||
random_harvest_queue(sc->sc_buf, cnt, cnt * NBBY / 2, | random_harvest_queue(sc->sc_buf, cnt, RANDOM_PURE_BROADCOM); | ||||
RANDOM_PURE_BROADCOM); | |||||
callout_reset(&sc->sc_rngto, RNG_CALLOUT_TICKS, bcm2835_rng_harvest, sc); | callout_reset(&sc->sc_rngto, RNG_CALLOUT_TICKS, bcm2835_rng_harvest, sc); | ||||
} | } | ||||
static int | static int | ||||
sysctl_bcm2835_rng_2xspeed(SYSCTL_HANDLER_ARGS) | sysctl_bcm2835_rng_2xspeed(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
struct bcm2835_rng_softc *sc = arg1; | struct bcm2835_rng_softc *sc = arg1; | ||||
▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines |