Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/amlogic/aml8726/aml8726_rng.c
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
aml8726_rng_harvest(void *arg) | aml8726_rng_harvest(void *arg) | ||||
{ | { | ||||
struct aml8726_rng_softc *sc = arg; | struct aml8726_rng_softc *sc = arg; | ||||
uint32_t rn[2]; | uint32_t rn[2]; | ||||
rn[0] = CSR_READ_4(sc, AML_RNG_0_REG); | rn[0] = CSR_READ_4(sc, AML_RNG_0_REG); | ||||
rn[1] = CSR_READ_4(sc, AML_RNG_1_REG); | rn[1] = CSR_READ_4(sc, AML_RNG_1_REG); | ||||
random_harvest(rn, sizeof(rn), sizeof(rn) * NBBY / 2, | random_harvest(rn, sizeof(rn), RANDOM_PURE_AML8726); | ||||
RANDOM_PURE_AML8726); | |||||
callout_reset(&sc->co, sc->ticks, aml8726_rng_harvest, sc); | callout_reset(&sc->co, sc->ticks, aml8726_rng_harvest, sc); | ||||
} | } | ||||
static int | static int | ||||
aml8726_rng_probe(device_t dev) | aml8726_rng_probe(device_t dev) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |