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>
This commit is contained in:
committed by
John Crispin
parent
a69ba6293d
commit
4e45e542cd
@@ -64,7 +64,7 @@ void nlm_xlr_uart_out(struct uart_port *p, int offset, int value)
|
||||
.iotype = UPIO_MEM32, \
|
||||
.flags = (UPF_SKIP_TEST | \
|
||||
UPF_FIXED_TYPE | UPF_BOOT_AUTOCONF),\
|
||||
.uartclk = PIC_CLKS_PER_SEC, \
|
||||
.uartclk = PIC_CLK_HZ, \
|
||||
.type = PORT_16550A, \
|
||||
.serial_in = nlm_xlr_uart_in, \
|
||||
.serial_out = nlm_xlr_uart_out, \
|
||||
|
||||
Reference in New Issue
Block a user