MCPcopy Create free account
hub / github.com/F-Stack/f-stack / arm_tmr_start

Function arm_tmr_start

freebsd/arm/arm/generic_timer.c:254–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254static int
255arm_tmr_start(struct eventtimer *et, sbintime_t first,
256 sbintime_t period __unused)
257{
258 struct arm_tmr_softc *sc;
259 int counts, ctrl;
260
261 sc = (struct arm_tmr_softc *)et->et_priv;
262
263 if (first != 0) {
264 counts = ((uint32_t)et->et_frequency * first) >> 32;
265 ctrl = get_ctrl(sc->physical);
266 ctrl &= ~GT_CTRL_INT_MASK;
267 ctrl |= GT_CTRL_ENABLE;
268 set_tval(counts, sc->physical);
269 set_ctrl(ctrl, sc->physical);
270 return (0);
271 }
272
273 return (EINVAL);
274
275}
276
277static void
278arm_tmr_disable(bool physical)

Callers

nothing calls this directly

Calls 3

get_ctrlFunction · 0.85
set_tvalFunction · 0.85
set_ctrlFunction · 0.85

Tested by

no test coverage detected