| 252 | } |
| 253 | |
| 254 | static int |
| 255 | arm_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 | |
| 277 | static void |
| 278 | arm_tmr_disable(bool physical) |