Home | History | Annotate | Download | only in ic

Lines Matching refs:sc

44 #define READ4(sc, r) \
45 bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (r))
47 #define WRITE4(sc, r, v) \
48 bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (r), (v))
51 rng200_reset(struct rng200_softc *sc)
56 ctl = READ4(sc, RNG200_CONTROL);
58 WRITE4(sc, RNG200_CONTROL, ctl);
61 WRITE4(sc, RNG200_STATUS, 0xffffffff);
64 rbg = READ4(sc, RNG200_RBG_RESET);
65 rng = READ4(sc, RNG200_RNG_RESET);
66 WRITE4(sc, RNG200_RBG_RESET, rbg | RBG_RESET);
67 WRITE4(sc, RNG200_RNG_RESET, rng | RNG_RESET);
68 WRITE4(sc, RNG200_RNG_RESET, rng);
69 WRITE4(sc, RNG200_RBG_RESET, rbg);
72 WRITE4(sc, RNG200_CONTROL, ctl | RNG200_RBG_ENABLE);
78 struct rng200_softc * const sc = priv;
84 w = READ4(sc, RNG200_STATUS);
86 rng200_reset(sc);
88 w = READ4(sc, RNG200_COUNT);
94 data = READ4(sc, RNG200_DATA);
95 rnd_add_data_sync(&sc->sc_rndsource, &data,
103 rng200_attach(struct rng200_softc *sc)
106 rndsource_setcb(&sc->sc_rndsource, rng200_get, sc);
107 rnd_attach_source(&sc->sc_rndsource, sc->sc_name,
112 rng200_detach(struct rng200_softc *sc)
115 rnd_detach_source(&sc->sc_rndsource);