diff options
Diffstat (limited to 'arch/m68k/coldfire/m54xx.c')
-rw-r--r-- | arch/m68k/coldfire/m54xx.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/arch/m68k/coldfire/m54xx.c b/arch/m68k/coldfire/m54xx.c index c32f76791f48..386df3b68cdf 100644 --- a/arch/m68k/coldfire/m54xx.c +++ b/arch/m68k/coldfire/m54xx.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <asm/m54xxgpt.h> | 25 | #include <asm/m54xxgpt.h> |
26 | #ifdef CONFIG_MMU | 26 | #ifdef CONFIG_MMU |
27 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
28 | #include <linux/pfn.h> | ||
29 | #endif | 28 | #endif |
30 | 29 | ||
31 | /***************************************************************************/ | 30 | /***************************************************************************/ |
@@ -78,47 +77,10 @@ static void mcf54xx_reset(void) | |||
78 | 77 | ||
79 | /***************************************************************************/ | 78 | /***************************************************************************/ |
80 | 79 | ||
81 | #ifdef CONFIG_MMU | ||
82 | |||
83 | unsigned long num_pages; | ||
84 | |||
85 | static void __init mcf54xx_bootmem_alloc(void) | ||
86 | { | ||
87 | unsigned long start_pfn; | ||
88 | unsigned long memstart; | ||
89 | |||
90 | /* _rambase and _ramend will be naturally page aligned */ | ||
91 | m68k_memory[0].addr = _rambase; | ||
92 | m68k_memory[0].size = _ramend - _rambase; | ||
93 | |||
94 | /* compute total pages in system */ | ||
95 | num_pages = PFN_DOWN(_ramend - _rambase); | ||
96 | |||
97 | /* page numbers */ | ||
98 | memstart = PAGE_ALIGN(_ramstart); | ||
99 | min_low_pfn = PFN_DOWN(_rambase); | ||
100 | start_pfn = PFN_DOWN(memstart); | ||
101 | max_pfn = max_low_pfn = PFN_DOWN(_ramend); | ||
102 | high_memory = (void *)_ramend; | ||
103 | |||
104 | m68k_virt_to_node_shift = fls(_ramend - _rambase - 1) - 6; | ||
105 | module_fixup(NULL, __start_fixup, __stop_fixup); | ||
106 | |||
107 | /* setup bootmem data */ | ||
108 | m68k_setup_node(0); | ||
109 | memstart += init_bootmem_node(NODE_DATA(0), start_pfn, | ||
110 | min_low_pfn, max_low_pfn); | ||
111 | free_bootmem_node(NODE_DATA(0), memstart, _ramend - memstart); | ||
112 | } | ||
113 | |||
114 | #endif /* CONFIG_MMU */ | ||
115 | |||
116 | /***************************************************************************/ | ||
117 | |||
118 | void __init config_BSP(char *commandp, int size) | 80 | void __init config_BSP(char *commandp, int size) |
119 | { | 81 | { |
120 | #ifdef CONFIG_MMU | 82 | #ifdef CONFIG_MMU |
121 | mcf54xx_bootmem_alloc(); | 83 | cf_bootmem_alloc(); |
122 | mmu_context_init(); | 84 | mmu_context_init(); |
123 | #endif | 85 | #endif |
124 | mach_reset = mcf54xx_reset; | 86 | mach_reset = mcf54xx_reset; |