Commit a16028da63c78001823bfb375b3f6d9d86e5a534
Committed by
Wolfgang Denk
1 parent
dac4d7e884
Exists in
master
and in
54 other branches
lmb: only force on arches that use it
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Showing 8 changed files with 40 additions and 20 deletions Side-by-side Diff
common/cmd_bootm.c
... | ... | @@ -153,18 +153,6 @@ |
153 | 153 | ulong load_addr = CONFIG_SYS_LOAD_ADDR; /* Default Load Address */ |
154 | 154 | static bootm_headers_t images; /* pointers to os/initrd/fdt images */ |
155 | 155 | |
156 | -void __board_lmb_reserve(struct lmb *lmb) | |
157 | -{ | |
158 | - /* please define platform specific board_lmb_reserve() */ | |
159 | -} | |
160 | -void board_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__board_lmb_reserve"))); | |
161 | - | |
162 | -void __arch_lmb_reserve(struct lmb *lmb) | |
163 | -{ | |
164 | - /* please define platform specific arch_lmb_reserve() */ | |
165 | -} | |
166 | -void arch_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__arch_lmb_reserve"))); | |
167 | - | |
168 | 156 | /* Allow for arch specific config before we boot */ |
169 | 157 | void __arch_preboot_os(void) |
170 | 158 | { |
171 | 159 | |
172 | 160 | |
173 | 161 | |
... | ... | @@ -200,16 +188,12 @@ |
200 | 188 | # error Unknown CPU type |
201 | 189 | #endif |
202 | 190 | |
203 | -static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | |
191 | +static void bootm_start_lmb(void) | |
204 | 192 | { |
193 | +#ifdef CONFIG_LMB | |
205 | 194 | ulong mem_start; |
206 | 195 | phys_size_t mem_size; |
207 | - void *os_hdr; | |
208 | - int ret; | |
209 | 196 | |
210 | - memset ((void *)&images, 0, sizeof (images)); | |
211 | - images.verify = getenv_yesno ("verify"); | |
212 | - | |
213 | 197 | lmb_init(&images.lmb); |
214 | 198 | |
215 | 199 | mem_start = getenv_bootm_low(); |
... | ... | @@ -219,6 +203,20 @@ |
219 | 203 | |
220 | 204 | arch_lmb_reserve(&images.lmb); |
221 | 205 | board_lmb_reserve(&images.lmb); |
206 | +#else | |
207 | +# define lmb_reserve(lmb, base, size) | |
208 | +#endif | |
209 | +} | |
210 | + | |
211 | +static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) | |
212 | +{ | |
213 | + void *os_hdr; | |
214 | + int ret; | |
215 | + | |
216 | + memset ((void *)&images, 0, sizeof (images)); | |
217 | + images.verify = getenv_yesno ("verify"); | |
218 | + | |
219 | + bootm_start_lmb(); | |
222 | 220 | |
223 | 221 | /* get kernel image header, start address and length */ |
224 | 222 | os_hdr = boot_get_kernel (cmdtp, flag, argc, argv, |
include/asm-m68k/config.h
include/asm-ppc/config.h
include/asm-sparc/config.h
include/image.h
include/lmb.h
lib_generic/Makefile
lib_generic/lmb.c
... | ... | @@ -334,4 +334,16 @@ |
334 | 334 | } |
335 | 335 | return 0; |
336 | 336 | } |
337 | + | |
338 | +void __board_lmb_reserve(struct lmb *lmb) | |
339 | +{ | |
340 | + /* please define platform specific board_lmb_reserve() */ | |
341 | +} | |
342 | +void board_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__board_lmb_reserve"))); | |
343 | + | |
344 | +void __arch_lmb_reserve(struct lmb *lmb) | |
345 | +{ | |
346 | + /* please define platform specific arch_lmb_reserve() */ | |
347 | +} | |
348 | +void arch_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__arch_lmb_reserve"))); |