diff options
-rw-r--r-- | arch/mips/netlogic/xlp/setup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c index 8f6992432f34..7b638f7be491 100644 --- a/arch/mips/netlogic/xlp/setup.c +++ b/arch/mips/netlogic/xlp/setup.c | |||
@@ -61,6 +61,18 @@ static void nlm_linux_exit(void) | |||
61 | cpu_wait(); | 61 | cpu_wait(); |
62 | } | 62 | } |
63 | 63 | ||
64 | static void nlm_fixup_mem(void) | ||
65 | { | ||
66 | const int pref_backup = 512; | ||
67 | int i; | ||
68 | |||
69 | for (i = 0; i < boot_mem_map.nr_map; i++) { | ||
70 | if (boot_mem_map.map[i].type != BOOT_MEM_RAM) | ||
71 | continue; | ||
72 | boot_mem_map.map[i].size -= pref_backup; | ||
73 | } | ||
74 | } | ||
75 | |||
64 | void __init plat_mem_setup(void) | 76 | void __init plat_mem_setup(void) |
65 | { | 77 | { |
66 | panic_timeout = 5; | 78 | panic_timeout = 5; |
@@ -70,6 +82,7 @@ void __init plat_mem_setup(void) | |||
70 | 82 | ||
71 | /* memory and bootargs from DT */ | 83 | /* memory and bootargs from DT */ |
72 | early_init_devtree(initial_boot_params); | 84 | early_init_devtree(initial_boot_params); |
85 | nlm_fixup_mem(); | ||
73 | } | 86 | } |
74 | 87 | ||
75 | const char *get_system_type(void) | 88 | const char *get_system_type(void) |