Lines Matching defs:sc
97 struct beeper_softc *sc = (void *)self;
100 sc->sc_iot = ea->ea_memtag;
104 if (bus_space_map(sc->sc_iot, ea->ea_vaddrs[0], 0,
105 BUS_SPACE_MAP_PROMADDRESS, &sc->sc_ioh)) {
109 } else if (ebus_bus_map(sc->sc_iot, 0,
111 &sc->sc_ioh) != 0) {
117 timeout_set(&sc->sc_to, beeper_stop, sc);
118 pckbd_hookup_bell(beeper_bell, sc);
127 struct beeper_softc *sc = vsc;
131 bus_space_write_4(sc->sc_iot, sc->sc_ioh, BEEP_REG, 0);
132 sc->sc_bellactive = 0;
133 sc->sc_belltimeout = 0;
140 struct beeper_softc *sc = vsc;
144 if (sc->sc_bellactive) {
145 if (sc->sc_belltimeout == 0)
146 timeout_del(&sc->sc_to);
149 beeper_stop(sc);
153 if (!sc->sc_bellactive) {
154 sc->sc_bellactive = 1;
155 sc->sc_belltimeout = 1;
156 bus_space_write_4(sc->sc_iot, sc->sc_ioh, BEEP_REG, 1);
157 timeout_add_msec(&sc->sc_to, period);