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
@@ -70,7 +70,7 @@ static void __init nlm_early_serial_setup(void)
|
||||
s.iotype = UPIO_MEM32;
|
||||
s.regshift = 2;
|
||||
s.irq = PIC_UART_0_IRQ;
|
||||
s.uartclk = PIC_CLKS_PER_SEC;
|
||||
s.uartclk = PIC_CLK_HZ;
|
||||
s.serial_in = nlm_xlr_uart_in;
|
||||
s.serial_out = nlm_xlr_uart_out;
|
||||
s.mapbase = uart_base;
|
||||
|
Reference in New Issue
Block a user