diff options
author | Ganesan Ramalingam <ganesanr@broadcom.com> | 2013-08-11 13:13:56 +0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-09-04 01:22:19 +0400 |
commit | 57ceb4b02045bd677b70f9e2b3d41e8c1bb86598 (patch) | |
tree | d8745a3424a87b5fa8ca56208943a21e16282550 /arch/mips/netlogic/common/time.c | |
parent | 5b6ff35d33cb0310c36f9081b9e39cd016715e9c (diff) | |
download | linux-57ceb4b02045bd677b70f9e2b3d41e8c1bb86598.tar.xz |
MIPS: Netlogic: XLP2XX CPU and PIC frequency
Add code to calculate the CPU and PIC frequency for XLP2XX SoCs.
Since the PIC frequency on XLP2XX can be configured, add a new macro
pic_timer_freq() to be used in netlogic/common/time.c.
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Cc: Ganesan Ramalingam <ganesanr@broadcom.com>
Patchwork: http://patchwork.linux-mips.org/patch/5701/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic/common/time.c')
-rw-r--r-- | arch/mips/netlogic/common/time.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/netlogic/common/time.c b/arch/mips/netlogic/common/time.c index 045a396c57ce..13391b8a6031 100644 --- a/arch/mips/netlogic/common/time.c +++ b/arch/mips/netlogic/common/time.c @@ -45,6 +45,7 @@ #if defined(CONFIG_CPU_XLP) #include <asm/netlogic/xlp-hal/iomap.h> #include <asm/netlogic/xlp-hal/xlp.h> +#include <asm/netlogic/xlp-hal/sys.h> #include <asm/netlogic/xlp-hal/pic.h> #elif defined(CONFIG_CPU_XLR) #include <asm/netlogic/xlr/iomap.h> @@ -91,7 +92,7 @@ static void nlm_init_pic_timer(void) csrc_pic.read = nlm_get_pic_timer; } csrc_pic.rating = 1000; - clocksource_register_hz(&csrc_pic, PIC_CLK_HZ); + clocksource_register_hz(&csrc_pic, pic_timer_freq()); } void __init plat_time_init(void) |