aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/xlr
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2013-01-14 10:11:57 -0500
committerJohn Crispin <blogic@openwrt.org>2013-02-16 18:15:20 -0500
commit4e45e542cd742c1c3e30e7f252640644c66548b5 (patch)
treed2c744190851b06cf7cd326ff3df16d2a6badae3 /arch/mips/netlogic/xlr
parenta69ba6293d11b7dfd395a742f3449d6ddda8ecad (diff)
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>
Diffstat (limited to 'arch/mips/netlogic/xlr')
-rw-r--r--arch/mips/netlogic/xlr/platform.c2
-rw-r--r--arch/mips/netlogic/xlr/setup.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/netlogic/xlr/platform.c b/arch/mips/netlogic/xlr/platform.c
index 507230eeb768..ce838f951356 100644
--- a/arch/mips/netlogic/xlr/platform.c
+++ b/arch/mips/netlogic/xlr/platform.c
@@ -64,7 +64,7 @@ void nlm_xlr_uart_out(struct uart_port *p, int offset, int value)
64 .iotype = UPIO_MEM32, \ 64 .iotype = UPIO_MEM32, \
65 .flags = (UPF_SKIP_TEST | \ 65 .flags = (UPF_SKIP_TEST | \
66 UPF_FIXED_TYPE | UPF_BOOT_AUTOCONF),\ 66 UPF_FIXED_TYPE | UPF_BOOT_AUTOCONF),\
67 .uartclk = PIC_CLKS_PER_SEC, \ 67 .uartclk = PIC_CLK_HZ, \
68 .type = PORT_16550A, \ 68 .type = PORT_16550A, \
69 .serial_in = nlm_xlr_uart_in, \ 69 .serial_in = nlm_xlr_uart_in, \
70 .serial_out = nlm_xlr_uart_out, \ 70 .serial_out = nlm_xlr_uart_out, \
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
index c5ce6992ac4c..54b301c809e1 100644
--- a/arch/mips/netlogic/xlr/setup.c
+++ b/arch/mips/netlogic/xlr/setup.c
@@ -70,7 +70,7 @@ static void __init nlm_early_serial_setup(void)
70 s.iotype = UPIO_MEM32; 70 s.iotype = UPIO_MEM32;
71 s.regshift = 2; 71 s.regshift = 2;
72 s.irq = PIC_UART_0_IRQ; 72 s.irq = PIC_UART_0_IRQ;
73 s.uartclk = PIC_CLKS_PER_SEC; 73 s.uartclk = PIC_CLK_HZ;
74 s.serial_in = nlm_xlr_uart_in; 74 s.serial_in = nlm_xlr_uart_in;
75 s.serial_out = nlm_xlr_uart_out; 75 s.serial_out = nlm_xlr_uart_out;
76 s.mapbase = uart_base; 76 s.mapbase = uart_base;