aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/netlogic/xlp/setup.c
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2013-03-23 13:27:59 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-05-07 19:19:05 -0400
commit035114fbdbf8c88fbf80a160716be9d0078f01ee (patch)
treef7096be45fb10c67766cb3533ff02f031df15fb3 /arch/mips/netlogic/xlp/setup.c
parent033e6f288733f1477e7a8774999673ca82206ece (diff)
MIPS: Netlogic: Support for multiple built-in device trees
This enables us to have a default device tree per SoC family to be built into the kernel. The default device tree for XLP3xx has been added as part of this change. Later this can be used to provide support default boards for XLP2xx and XLP9xx SoCs. Kconfig options are provided for each default device tree so that just the needed ones can be selected to be built into the kernel. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Patchwork: http://patchwork.linux-mips.org/patch/5023/ Acked-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/netlogic/xlp/setup.c')
-rw-r--r--arch/mips/netlogic/xlp/setup.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c
index 4894d62043ac..af319143b591 100644
--- a/arch/mips/netlogic/xlp/setup.c
+++ b/arch/mips/netlogic/xlp/setup.c
@@ -56,7 +56,7 @@ uint64_t nlm_io_base;
56struct nlm_soc_info nlm_nodes[NLM_NR_NODES]; 56struct nlm_soc_info nlm_nodes[NLM_NR_NODES];
57cpumask_t nlm_cpumask = CPU_MASK_CPU0; 57cpumask_t nlm_cpumask = CPU_MASK_CPU0;
58unsigned int nlm_threads_per_core; 58unsigned int nlm_threads_per_core;
59extern u32 __dtb_start[]; 59extern u32 __dtb_xlp_evp_begin[], __dtb_xlp_svp_begin[], __dtb_start[];
60 60
61static void nlm_linux_exit(void) 61static void nlm_linux_exit(void)
62{ 62{
@@ -82,8 +82,24 @@ void __init plat_mem_setup(void)
82 * 64-bit, so convert pointer. 82 * 64-bit, so convert pointer.
83 */ 83 */
84 fdtp = (void *)(long)fw_arg0; 84 fdtp = (void *)(long)fw_arg0;
85 if (!fdtp) 85 if (!fdtp) {
86 fdtp = __dtb_start; 86 switch (current_cpu_data.processor_id & 0xff00) {
87#ifdef CONFIG_DT_XLP_SVP
88 case PRID_IMP_NETLOGIC_XLP3XX:
89 fdtp = __dtb_xlp_svp_begin;
90 break;
91#endif
92#ifdef CONFIG_DT_XLP_EVP
93 case PRID_IMP_NETLOGIC_XLP8XX:
94 fdtp = __dtb_xlp_evp_begin;
95 break;
96#endif
97 default:
98 /* Pick a built-in if any, and hope for the best */
99 fdtp = __dtb_start;
100 break;
101 }
102 }
87 fdtp = phys_to_virt(__pa(fdtp)); 103 fdtp = phys_to_virt(__pa(fdtp));
88 early_init_devtree(fdtp); 104 early_init_devtree(fdtp);
89} 105}