aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/xlp/setup.c
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2012-10-31 12:01:39 +0000
committerJohn Crispin <blogic@openwrt.org>2012-11-09 11:37:19 +0100
commit77ae798f5b736dfdc692b86b393d9699052ac77a (patch)
tree040a68a1c544167364e4ca2b78e69179c397e4b2 /arch/mips/netlogic/xlp/setup.c
parentMIPS: Netlogic: Move from u32 cpumask to cpumask_t (diff)
downloadlinux-dev-77ae798f5b736dfdc692b86b393d9699052ac77a.tar.xz
linux-dev-77ae798f5b736dfdc692b86b393d9699052ac77a.zip
MIPS: Netlogic: Support for multi-chip configuration
Upto 4 Netlogic XLP SoCs can be connected over ICI links to form a coherent multi-node system. Each SoC has its own set of on-chip devices including PIC. To support this, add a per SoC stucture and use it for the PIC and SYS block addresses instead of using global variables. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Patchwork: http://patchwork.linux-mips.org/patch/4469 Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/netlogic/xlp/setup.c')
-rw-r--r--arch/mips/netlogic/xlp/setup.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c
index 9f8d360a246e..465b8d60463f 100644
--- a/arch/mips/netlogic/xlp/setup.c
+++ b/arch/mips/netlogic/xlp/setup.c
@@ -52,17 +52,17 @@
#include <asm/netlogic/xlp-hal/xlp.h>
#include <asm/netlogic/xlp-hal/sys.h>
-unsigned long nlm_common_ebase = 0x0;
-
-/* default to uniprocessor */
-uint32_t nlm_coremask = 1;
+uint64_t nlm_io_base;
+struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
cpumask_t nlm_cpumask = CPU_MASK_CPU0;
-int nlm_threads_per_core = 1;
+unsigned int nlm_threads_per_core;
extern u32 __dtb_start[];
static void nlm_linux_exit(void)
{
- nlm_write_sys_reg(nlm_sys_base, SYS_CHIP_RESET, 1);
+ uint64_t sysbase = nlm_get_node(0)->sysbase;
+
+ nlm_write_sys_reg(sysbase, SYS_CHIP_RESET, 1);
for ( ; ; )
cpu_wait();
}
@@ -110,10 +110,9 @@ void xlp_mmu_init(void)
void __init prom_init(void)
{
+ nlm_io_base = CKSEG1ADDR(XLP_DEFAULT_IO_BASE);
xlp_mmu_init();
- nlm_hal_init();
-
- nlm_common_ebase = read_c0_ebase() & (~((1 << 12) - 1));
+ nlm_node_init(0);
#ifdef CONFIG_SMP
cpumask_setall(&nlm_cpumask);