static void timer_enable(struct xlx_timer *xt)

{

    uint64_t count;



    D(printf("%s timer=%d down=%d\n", __func__,

              xt->nr, xt->regs[R_TCSR] & TCSR_UDT));



    ptimer_stop(xt->ptimer);



    if (xt->regs[R_TCSR] & TCSR_UDT)

        count = xt->regs[R_TLR];

    else

        count = ~0 - xt->regs[R_TLR];

    ptimer_set_count(xt->ptimer, count);

    ptimer_run(xt->ptimer, 1);

}

static void timer_enable(struct xlx_timer *xt)

{

    uint64_t count;



    D(printf("%s timer=%d down=%d\n", __func__,

              xt->nr, xt->regs[R_TCSR] & TCSR_UDT));



    ptimer_stop(xt->ptimer);



    if (xt->regs[R_TCSR] & TCSR_UDT)

        count = xt->regs[R_TLR];

    else

        count = ~0 - xt->regs[R_TLR];

    ptimer_set_count(xt->ptimer, count);

    ptimer_run(xt->ptimer, 1);

}

    ptimer_set_count(xt->ptimer, count);
static void FUNC_0(struct xlx_timer *VAR_0)

{

    uint64_t count;



    D(printf("%s timer=%d down=%d\n", __func__,

              VAR_0->nr, VAR_0->regs[R_TCSR] & TCSR_UDT));



    ptimer_stop(VAR_0->ptimer);



    if (VAR_0->regs[R_TCSR] & TCSR_UDT)

        count = VAR_0->regs[R_TLR];

    else

        count = ~0 - VAR_0->regs[R_TLR];

    ptimer_set_count(VAR_0->ptimer, count);

    ptimer_run(VAR_0->ptimer, 1);

}

static void FUNC_0(struct xlx_timer *VAR_0)
{ uint64_t count; D(printf("%s timer=%d down=%d\n", __func__,
VAR_0->nr, VAR_0->regs[R_TCSR] & TCSR_UDT)); ptimer_stop(VAR_0->ptimer); if (VAR_0->regs[R_TCSR] & TCSR_UDT)
count = VAR_0->regs[R_TLR]; else
count = ~0 - VAR_0->regs[R_TLR]; ptimer_set_count(VAR_0->ptimer, count); ptimer_run(VAR_0->ptimer, 1); }