summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2012-10-31 12:01:32 +0000
committerJohn Crispin <blogic@openwrt.org>2012-11-09 11:37:19 +0100
commite83fc6be612ae6642f330e4aff93f32593c25a04 (patch)
tree332606acba32a7df34d2d0b2c17c7d35a7c41546 /arch/mips
parent5b47a4db1ea7fb7c99dc69335775d2b03d4872b0 (diff)
downloadop-kernel-dev-e83fc6be612ae6642f330e4aff93f32593c25a04.zip
op-kernel-dev-e83fc6be612ae6642f330e4aff93f32593c25a04.tar.gz
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 d899709..b886a50 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)
void __init plat_mem_setup(void)
{
+ void *fdtp;
+
panic_timeout = 5;
_machine_restart = (void (*)(char *))nlm_linux_exit;
_machine_halt = nlm_linux_exit;
pm_power_off = nlm_linux_exit;
+
+ /*
+ * If no FDT pointer is passed in, use the built-in FDT.
+ * device_tree_init() does not handle CKSEG0 pointers in
+ * 64-bit, so convert pointer.
+ */
+ fdtp = (void *)(long)fw_arg0;
+ if (!fdtp)
+ fdtp = __dtb_start;
+ fdtp = phys_to_virt(__pa(fdtp));
+ early_init_devtree(fdtp);
}
const char *get_system_type(void)
@@ -96,23 +109,11 @@ void xlp_mmu_init(void)
void __init prom_init(void)
{
- void *fdtp;
-
xlp_mmu_init();
nlm_hal_init();
- /*
- * If no FDT pointer is passed in, use the built-in FDT.
- * device_tree_init() does not handle CKSEG0 pointers in
- * 64-bit, so convert pointer.
- */
- fdtp = (void *)(long)fw_arg0;
- if (!fdtp)
- fdtp = __dtb_start;
- fdtp = phys_to_virt(__pa(fdtp));
- early_init_devtree(fdtp);
-
nlm_common_ebase = read_c0_ebase() & (~((1 << 12) - 1));
+
#ifdef CONFIG_SMP
nlm_wakeup_secondary_cpus(0xffffffff);
OpenPOWER on IntegriCloud