summaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/xlp/setup.c
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2013-06-10 08:41:02 +0200
committerRalf Baechle <ralf@linux-mips.org>2013-06-13 17:46:42 +0200
commit571886b2a52395f030d439c6259663a033e11e6a (patch)
tree5e386eaa6465785dc16d3dc2693fe8b23e557f1c /arch/mips/netlogic/xlp/setup.c
parentMIPS: Netlogic: Split reset code out of smpboot.S (diff)
downloadlinux-571886b2a52395f030d439c6259663a033e11e6a.tar.xz
linux-571886b2a52395f030d439c6259663a033e11e6a.zip
MIPS: Netlogic: Initialization when !CONFIG_SMP
The core initialization and reset vector setup needs to be done even when booting uniprocessor. Move this code from smp.c to setup.c Signed-off-by: Jayachandran C <jchandra@broadcom.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5428/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/netlogic/xlp/setup.c')
-rw-r--r--arch/mips/netlogic/xlp/setup.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c
index 7b6694998cdc..5bdd354fef48 100644
--- a/arch/mips/netlogic/xlp/setup.c
+++ b/arch/mips/netlogic/xlp/setup.c
@@ -98,11 +98,19 @@ void nlm_percpu_init(int hwcpuid)
void __init prom_init(void)
{
+ void *reset_vec;
+
nlm_io_base = CKSEG1ADDR(XLP_DEFAULT_IO_BASE);
+ nlm_init_boot_cpu();
xlp_mmu_init();
nlm_node_init(0);
xlp_dt_init((void *)(long)fw_arg0);
+ /* Update reset entry point with CPU init code */
+ reset_vec = (void *)CKSEG1ADDR(RESET_VEC_PHYS);
+ memcpy(reset_vec, (void *)nlm_reset_entry,
+ (nlm_reset_entry_end - nlm_reset_entry));
+
#ifdef CONFIG_SMP
cpumask_setall(&nlm_cpumask);
nlm_wakeup_secondary_cpus();