aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/xlr/setup.c
diff options
context:
space:
mode:
authorGanesan Ramalingam <ganesanr@broadcom.com>2012-10-31 08:01:42 -0400
committerJohn Crispin <blogic@openwrt.org>2012-11-09 05:37:20 -0500
commited21cfe207276e2d2883173399dd0380db372e18 (patch)
tree99382401195a5163fc6fd2191d786034512aa874 /arch/mips/netlogic/xlr/setup.c
parent38541742da05f65d77e514a70bae9b84251c4bc4 (diff)
MIPS: Netlogic: Support for XLR/XLS Fast Message Network
On XLR/XLS, the cpu cores communicate with fast on-chip devices (e.g. network accelerator, security engine etc.) using the Fast Messaging Network(FMN). The FMN queues and credits needs to be configured and intialized before it can be used. The co-processor 2 on XLR/XLS CPU cores has registers for FMN access, and the XLR/XLS has custom instructions for sending and loading messages. The FMN can deliver also per-cpu interrupts when messages are available at the CPU. This patch adds FMN initialization, adds interrupt setup and handling, and also provides support for sending and receiving FMN messages. Signed-off-by: Ganesan Ramalingam <ganesanr@broadcom.com> Signed-off-by: Jayachandran C <jchandra@broadcom.com> Patchwork: http://patchwork.linux-mips.org/patch/4468 Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/netlogic/xlr/setup.c')
-rw-r--r--arch/mips/netlogic/xlr/setup.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/mips/netlogic/xlr/setup.c b/arch/mips/netlogic/xlr/setup.c
index 696d4248b92f..4e7f49d3d5a8 100644
--- a/arch/mips/netlogic/xlr/setup.c
+++ b/arch/mips/netlogic/xlr/setup.c
@@ -49,6 +49,7 @@
49#include <asm/netlogic/xlr/iomap.h> 49#include <asm/netlogic/xlr/iomap.h>
50#include <asm/netlogic/xlr/pic.h> 50#include <asm/netlogic/xlr/pic.h>
51#include <asm/netlogic/xlr/gpio.h> 51#include <asm/netlogic/xlr/gpio.h>
52#include <asm/netlogic/xlr/fmn.h>
52 53
53uint64_t nlm_io_base = DEFAULT_NETLOGIC_IO_BASE; 54uint64_t nlm_io_base = DEFAULT_NETLOGIC_IO_BASE;
54struct psb_info nlm_prom_info; 55struct psb_info nlm_prom_info;
@@ -111,6 +112,12 @@ void __init prom_free_prom_memory(void)
111 /* Nothing yet */ 112 /* Nothing yet */
112} 113}
113 114
115void nlm_percpu_init(int hwcpuid)
116{
117 if (hwcpuid % 4 == 0)
118 xlr_percpu_fmn_init();
119}
120
114static void __init build_arcs_cmdline(int *argv) 121static void __init build_arcs_cmdline(int *argv)
115{ 122{
116 int i, remain, len; 123 int i, remain, len;
@@ -208,4 +215,6 @@ void __init prom_init(void)
208 nlm_wakeup_secondary_cpus(); 215 nlm_wakeup_secondary_cpus();
209 register_smp_ops(&nlm_smp_ops); 216 register_smp_ops(&nlm_smp_ops);
210#endif 217#endif
218 xlr_board_info_setup();
219 xlr_percpu_fmn_init();
211} 220}