aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2012-10-31 08:01:32 -0400
committerJohn Crispin <blogic@openwrt.org>2012-11-09 05:37:19 -0500
commite83fc6be612ae6642f330e4aff93f32593c25a04 (patch)
tree332606acba32a7df34d2d0b2c17c7d35a7c41546 /arch/mips
parent5b47a4db1ea7fb7c99dc69335775d2b03d4872b0 (diff)
MIPS: Netlogic: Move fdt init to plat_mem_setup
At this point early printk is available, so debugging device tree issues is easier. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Patchwork: http://patchwork.linux-mips.org/patch/4460 Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/netlogic/xlp/setup.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c
index d8997098defd..b886a508f85a 100644
--- a/arch/mips/netlogic/xlp/setup.c
+++ b/arch/mips/netlogic/xlp/setup.c
@@ -68,10 +68,23 @@ static void nlm_linux_exit(void)
68 68
69void __init plat_mem_setup(void) 69void __init plat_mem_setup(void)
70{ 70{
71 void *fdtp;
72
71 panic_timeout = 5; 73 panic_timeout = 5;
72 _machine_restart = (void (*)(char *))nlm_linux_exit; 74 _machine_restart = (void (*)(char *))nlm_linux_exit;
73 _machine_halt = nlm_linux_exit; 75 _machine_halt = nlm_linux_exit;
74 pm_power_off = nlm_linux_exit; 76 pm_power_off = nlm_linux_exit;
77
78 /*
79 * If no FDT pointer is passed in, use the built-in FDT.
80 * device_tree_init() does not handle CKSEG0 pointers in
81 * 64-bit, so convert pointer.
82 */
83 fdtp = (void *)(long)fw_arg0;
84 if (!fdtp)
85 fdtp = __dtb_start;
86 fdtp = phys_to_virt(__pa(fdtp));
87 early_init_devtree(fdtp);
75} 88}
76 89
77const char *get_system_type(void) 90const char *get_system_type(void)
@@ -96,23 +109,11 @@ void xlp_mmu_init(void)
96 109
97void __init prom_init(void) 110void __init prom_init(void)
98{ 111{
99 void *fdtp;
100
101 xlp_mmu_init(); 112 xlp_mmu_init();
102 nlm_hal_init(); 113 nlm_hal_init();
103 114
104 /*
105 * If no FDT pointer is passed in, use the built-in FDT.
106 * device_tree_init() does not handle CKSEG0 pointers in
107 * 64-bit, so convert pointer.
108 */
109 fdtp = (void *)(long)fw_arg0;
110 if (!fdtp)
111 fdtp = __dtb_start;
112 fdtp = phys_to_virt(__pa(fdtp));
113 early_init_devtree(fdtp);
114
115 nlm_common_ebase = read_c0_ebase() & (~((1 << 12) - 1)); 115 nlm_common_ebase = read_c0_ebase() & (~((1 << 12) - 1));
116
116#ifdef CONFIG_SMP 117#ifdef CONFIG_SMP
117 nlm_wakeup_secondary_cpus(0xffffffff); 118 nlm_wakeup_secondary_cpus(0xffffffff);
118 119