diff options
author | Jayachandran C <jchandra@broadcom.com> | 2013-06-10 02:41:02 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-06-13 11:46:42 -0400 |
commit | 571886b2a52395f030d439c6259663a033e11e6a (patch) | |
tree | 5e386eaa6465785dc16d3dc2693fe8b23e557f1c /arch/mips/netlogic/xlp | |
parent | 9584c55a5cc0db82329dd1142ca570e2d64ea491 (diff) |
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')
-rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 8 | ||||
-rw-r--r-- | arch/mips/netlogic/xlp/wakeup.c | 1 |
2 files changed, 8 insertions, 1 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) | |||
98 | 98 | ||
99 | void __init prom_init(void) | 99 | void __init prom_init(void) |
100 | { | 100 | { |
101 | void *reset_vec; | ||
102 | |||
101 | nlm_io_base = CKSEG1ADDR(XLP_DEFAULT_IO_BASE); | 103 | nlm_io_base = CKSEG1ADDR(XLP_DEFAULT_IO_BASE); |
104 | nlm_init_boot_cpu(); | ||
102 | xlp_mmu_init(); | 105 | xlp_mmu_init(); |
103 | nlm_node_init(0); | 106 | nlm_node_init(0); |
104 | xlp_dt_init((void *)(long)fw_arg0); | 107 | xlp_dt_init((void *)(long)fw_arg0); |
105 | 108 | ||
109 | /* Update reset entry point with CPU init code */ | ||
110 | reset_vec = (void *)CKSEG1ADDR(RESET_VEC_PHYS); | ||
111 | memcpy(reset_vec, (void *)nlm_reset_entry, | ||
112 | (nlm_reset_entry_end - nlm_reset_entry)); | ||
113 | |||
106 | #ifdef CONFIG_SMP | 114 | #ifdef CONFIG_SMP |
107 | cpumask_setall(&nlm_cpumask); | 115 | cpumask_setall(&nlm_cpumask); |
108 | nlm_wakeup_secondary_cpus(); | 116 | nlm_wakeup_secondary_cpus(); |
diff --git a/arch/mips/netlogic/xlp/wakeup.c b/arch/mips/netlogic/xlp/wakeup.c index 1a7d529fcec0..abb3e08cc052 100644 --- a/arch/mips/netlogic/xlp/wakeup.c +++ b/arch/mips/netlogic/xlp/wakeup.c | |||
@@ -137,7 +137,6 @@ void xlp_wakeup_secondary_cpus() | |||
137 | * In case of u-boot, the secondaries are in reset | 137 | * In case of u-boot, the secondaries are in reset |
138 | * first wakeup core 0 threads | 138 | * first wakeup core 0 threads |
139 | */ | 139 | */ |
140 | nlm_init_boot_cpu(); | ||
141 | xlp_boot_core0_siblings(); | 140 | xlp_boot_core0_siblings(); |
142 | 141 | ||
143 | /* now get other cores out of reset */ | 142 | /* now get other cores out of reset */ |