aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/mpic_timer.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-09powerpc/mpic_timer: fix convert ticks to time subtraction overflowWang Dongsheng1-2/+5
In some cases tmp_sec may be greater than ticks, because in the process of calculation ticks and tmp_sec will be rounded. Signed-off-by: Wang Dongsheng <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2014-01-09powerpc/mpic_timer: fix the time is not accurate caused by GTCRR toggle bitWang Dongsheng1-0/+3
When the timer GTCCR toggle bit is inverted, we calculated the rest of the time is not accurate. So we need to ignore this bit. Signed-off-by: Wang Dongsheng <[email protected]> Signed-off-by: Scott Wood <[email protected]>
2013-10-09powerpc: add explicit OF includesRob Herring1-0/+2
When removing prom.h include by of.h, several OF headers will no longer be implicitly included. Add explicit includes of of_*.h as needed. Signed-off-by: Rob Herring <[email protected]> Acked-by: Grant Likely <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Anatolij Gustschin <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Olof Johansson <[email protected]> Cc: [email protected]
2013-07-01powerpc/mpic: add global timer support[email protected]1-0/+593
The MPIC global timer is a hardware timer inside the Freescale PIC complying with OpenPIC standard. When the specified interval times out, the hardware timer generates an interrupt. The driver currently is only tested on fsl chip, but it can potentially support other global timers complying to OpenPIC standard. The two independent groups of global timer on fsl chip, group A and group B, are identical in their functionality, except that they appear at different locations within the PIC register map. The hardware timer can be cascaded to create timers larger than the default 31-bit global timers. Timer cascade fields allow configuration of up to two 63-bit timers. But These two groups of timers cannot be cascaded together. It can be used as a wakeup source for low power modes. It also could be used as periodical timer for protocols, drivers and etc. Signed-off-by: Wang Dongsheng <[email protected]> Signed-off-by: Li Yang <[email protected]> Signed-off-by: Scott Wood <[email protected]>