Lines Matching refs:regs
25 int mec_hal_htimer_init(struct mec_htmr_regs *regs, struct mec_htimer_context *ctx, in mec_hal_htimer_init() argument
35 switch ((uintptr_t)regs) { in mec_hal_htimer_init()
37 ctx->regs = regs; in mec_hal_htimer_init()
42 ctx->regs = regs; in mec_hal_htimer_init()
52 regs->PRELOAD = 0; in mec_hal_htimer_init()
53 regs->CTRL = 0; in mec_hal_htimer_init()
58 regs->CTRL |= MEC_BIT(MEC_HTMR_CTRL_RES_Pos); in mec_hal_htimer_init()
72 regs->PRELOAD = ctx->preload; in mec_hal_htimer_init()
96 void mec_hal_htimer_stop(struct mec_htmr_regs *regs) in mec_hal_htimer_stop() argument
98 regs->PRELOAD = 0; in mec_hal_htimer_stop()
109 struct mec_htmr_regs *regs = ctx->regs; in mec_hal_htimer_halt() local
111 ctx->count = (uint16_t)(regs->COUNT & 0xffffu); in mec_hal_htimer_halt()
112 regs->PRELOAD = 0; in mec_hal_htimer_halt()
120 struct mec_htmr_regs *regs = ctx->regs; in mec_hal_htimer_unhalt() local
122 regs->PRELOAD = ctx->count; in mec_hal_htimer_unhalt()
128 struct mec_htmr_regs *regs = ctx->regs; in mec_hal_htimer_restart() local
130 regs->PRELOAD = 0; in mec_hal_htimer_restart()
131 regs->PRELOAD = new_count; in mec_hal_htimer_restart()