MIPS: Netlogic: Use PIC timer as a clocksource
authorJayachandran C <jchandra@broadcom.com>
Mon, 14 Jan 2013 15:11:57 +0000 (15:11 +0000)
committerJohn Crispin <blogic@openwrt.org>
Sat, 16 Feb 2013 23:15:20 +0000 (00:15 +0100)
commit4e45e542cd742c1c3e30e7f252640644c66548b5
treed2c744190851b06cf7cd326ff3df16d2a6badae3
parenta69ba6293d11b7dfd395a742f3449d6ddda8ecad
MIPS: Netlogic: Use PIC timer as a clocksource

The XLR/XLS/XLP PIC has a 8 countdown timers which run at the PIC
frequencey. One of these can be used as a clocksource to provide
timestamps that is common across cores. This can be used in place
of the count/compare clocksource which is per-CPU.

On XLR/XLS PIC registers are 32-bit, so we just use the lower 32-bits
of the PIC counter. On XLP, the whole 64-bit can be used.

Provide common macros and functions for PIC timer registers on XLR/XLS
and XLP, and use them to register a PIC clocksource.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Patchwork: http://patchwork.linux-mips.org/patch/4786/
Signed-off-by: John Crispin <blogic@openwrt.org>
arch/mips/include/asm/netlogic/xlp-hal/pic.h
arch/mips/include/asm/netlogic/xlr/pic.h
arch/mips/netlogic/common/irq.c
arch/mips/netlogic/common/time.c
arch/mips/netlogic/xlr/platform.c
arch/mips/netlogic/xlr/setup.c