diff options
Diffstat (limited to 'arch/mips/mti-sead3/sead3-setup.c')
-rw-r--r-- | arch/mips/mti-sead3/sead3-setup.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/mips/mti-sead3/sead3-setup.c b/arch/mips/mti-sead3/sead3-setup.c index 8ad46ad31b49..f012fd164cee 100644 --- a/arch/mips/mti-sead3/sead3-setup.c +++ b/arch/mips/mti-sead3/sead3-setup.c | |||
@@ -6,6 +6,12 @@ | |||
6 | * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. | 6 | * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <linux/of_platform.h> | ||
10 | #include <linux/of_fdt.h> | ||
11 | #include <linux/bootmem.h> | ||
12 | |||
13 | #include <asm/mips-boards/generic.h> | ||
14 | #include <asm/prom.h> | ||
9 | 15 | ||
10 | int coherentio; /* 0 => no DMA cache coherency (may be set by user) */ | 16 | int coherentio; /* 0 => no DMA cache coherency (may be set by user) */ |
11 | int hw_coherentio; /* 0 => no HW DMA cache coherency (reflects real HW) */ | 17 | int hw_coherentio; /* 0 => no HW DMA cache coherency (reflects real HW) */ |
@@ -17,4 +23,25 @@ const char *get_system_type(void) | |||
17 | 23 | ||
18 | void __init plat_mem_setup(void) | 24 | void __init plat_mem_setup(void) |
19 | { | 25 | { |
26 | /* | ||
27 | * Load the builtin devicetree. This causes the chosen node to be | ||
28 | * parsed resulting in our memory appearing | ||
29 | */ | ||
30 | __dt_setup_arch(&__dtb_start); | ||
31 | } | ||
32 | |||
33 | void __init device_tree_init(void) | ||
34 | { | ||
35 | unsigned long base, size; | ||
36 | |||
37 | if (!initial_boot_params) | ||
38 | return; | ||
39 | |||
40 | base = virt_to_phys((void *)initial_boot_params); | ||
41 | size = be32_to_cpu(initial_boot_params->totalsize); | ||
42 | |||
43 | /* Before we do anything, lets reserve the dt blob */ | ||
44 | reserve_bootmem(base, size, BOOTMEM_DEFAULT); | ||
45 | |||
46 | unflatten_device_tree(); | ||
20 | } | 47 | } |