[PATCH 5/7] powerpc: add the mpic timer support

Jean-Michel Hautbois jhautbois at gmail.com
Tue Jan 18 03:24:47 EST 2011


Hi,

I am interested by this implementation.

> +static ssize_t mpic_tm_timeout_store(struct device *dev,
> +                               struct device_attribute *attr,
> +                               const char *buf, size_t count)
> +{

<snip>

> +
> +       spin_lock_irq(&priv->lock);
> +
> +       /* stop timer 0 */
> +       temp = in_be32(&priv->regs->gtbcr);
> +       temp |= MPIC_TIMER_STOP; /* counting inhibited */
> +       out_be32(&priv->regs->gtbcr, temp);
> +
> +       if (interval != 0) {
> +               /* start timer */
> +               out_be32(&priv->regs->gtbcr, interval | MPIC_TIMER_STOP);
> +               out_be32(&priv->regs->gtbcr, interval);
> +       }
> +
> +       spin_unlock_irq(&priv->lock);
> +       return count;
> +}

What is the delay when doing that stop/start thing ?
Is this delay variable and/or big or not ?
I would imagine a timer which would see its interval regularly
corrected, and I would like to know if this is really really fast
(say, less than some ticks) or not.

Thanks in advance for any answer !
Regards,
JM


More information about the Linuxppc-dev mailing list