diff options
Diffstat (limited to 'arch/powerpc/boot/main.c')
-rw-r--r-- | arch/powerpc/boot/main.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/powerpc/boot/main.c b/arch/powerpc/boot/main.c index 630a453e16fa..6f6b50d238b6 100644 --- a/arch/powerpc/boot/main.c +++ b/arch/powerpc/boot/main.c | |||
@@ -298,6 +298,7 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | |||
298 | { | 298 | { |
299 | kernel_entry_t kentry; | 299 | kernel_entry_t kentry; |
300 | char cmdline[COMMAND_LINE_SIZE]; | 300 | char cmdline[COMMAND_LINE_SIZE]; |
301 | unsigned long ft_addr = 0; | ||
301 | 302 | ||
302 | memset(__bss_start, 0, _end - __bss_start); | 303 | memset(__bss_start, 0, _end - __bss_start); |
303 | memset(&platform_ops, 0, sizeof(platform_ops)); | 304 | memset(&platform_ops, 0, sizeof(platform_ops)); |
@@ -328,14 +329,20 @@ void start(unsigned long a1, unsigned long a2, void *promptr, void *sp) | |||
328 | set_cmdline(cmdline); | 329 | set_cmdline(cmdline); |
329 | } | 330 | } |
330 | 331 | ||
332 | printf("Finalizing device tree..."); | ||
333 | if (dt_ops.finalize) | ||
334 | ft_addr = dt_ops.finalize(); | ||
335 | if (ft_addr) | ||
336 | printf(" flat tree at 0x%lx\n\r", ft_addr); | ||
337 | else | ||
338 | printf(" using OF tree (promptr=%p)\n\r", promptr); | ||
339 | |||
331 | if (console_ops.close) | 340 | if (console_ops.close) |
332 | console_ops.close(); | 341 | console_ops.close(); |
333 | 342 | ||
334 | kentry = (kernel_entry_t) vmlinux.addr; | 343 | kentry = (kernel_entry_t) vmlinux.addr; |
335 | if (_dtb_end > _dtb_start) { | 344 | if (ft_addr) |
336 | dt_ops.ft_pack(); | 345 | kentry(ft_addr, 0, NULL); |
337 | kentry(dt_ops.ft_addr(), 0, NULL); | ||
338 | } | ||
339 | else | 346 | else |
340 | /* XXX initrd addr/size should be passed in properties */ | 347 | /* XXX initrd addr/size should be passed in properties */ |
341 | kentry(initrd.addr, initrd.size, promptr); | 348 | kentry(initrd.addr, initrd.size, promptr); |