mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-08 05:43:21 +09:00
Merge with /home/sr/git/u-boot/denx-of
This commit is contained in:
commit
f7214cf9ea
@ -833,10 +833,6 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
|
|||||||
printf ("ERROR: flat device tree size does not agree with image\n");
|
printf ("ERROR: flat device tree size does not agree with image\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (getenv("disable_of") == NULL) {
|
|
||||||
printf ("ERROR: bootm needs flat device tree as third argument\n");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@ -913,23 +909,11 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
|
|||||||
|
|
||||||
SHOW_BOOT_PROGRESS (15);
|
SHOW_BOOT_PROGRESS (15);
|
||||||
|
|
||||||
#ifndef CONFIG_OF_FLAT_TREE
|
|
||||||
|
|
||||||
#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
|
#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
|
||||||
unlock_ram_in_cache();
|
unlock_ram_in_cache();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
#ifdef CONFIG_OF_FLAT_TREE
|
||||||
* Linux Kernel Parameters:
|
|
||||||
* r3: ptr to board info data
|
|
||||||
* r4: initrd_start or 0 if no initrd
|
|
||||||
* r5: initrd_end - unused if r4 is 0
|
|
||||||
* r6: Start of command line string
|
|
||||||
* r7: End of command line string
|
|
||||||
*/
|
|
||||||
(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
|
|
||||||
|
|
||||||
#else /* CONFIG_OF_FLAT_TREE */
|
|
||||||
/* move of_flat_tree if needed */
|
/* move of_flat_tree if needed */
|
||||||
if (of_data) {
|
if (of_data) {
|
||||||
ulong of_start, of_len;
|
ulong of_start, of_len;
|
||||||
@ -948,30 +932,36 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
|
|||||||
of_start, of_start + of_len - 1);
|
of_start, of_start + of_len - 1);
|
||||||
memmove ((void *)of_start, (void *)of_data, of_len);
|
memmove ((void *)of_start, (void *)of_data, of_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
|
|
||||||
/* ft_dump_blob(of_flat_tree); */
|
|
||||||
|
|
||||||
#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
|
|
||||||
unlock_ram_in_cache();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Linux Kernel Parameters:
|
* Linux Kernel Parameters (passing board info data):
|
||||||
|
* r3: ptr to board info data
|
||||||
|
* r4: initrd_start or 0 if no initrd
|
||||||
|
* r5: initrd_end - unused if r4 is 0
|
||||||
|
* r6: Start of command line string
|
||||||
|
* r7: End of command line string
|
||||||
|
*/
|
||||||
|
#ifdef CONFIG_OF_FLAT_TREE
|
||||||
|
if (!of_flat_tree) /* no device tree; boot old style */
|
||||||
|
#endif
|
||||||
|
(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
|
||||||
|
/* does not return */
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF_FLAT_TREE
|
||||||
|
/*
|
||||||
|
* Linux Kernel Parameters (passing device tree):
|
||||||
* r3: ptr to OF flat tree, followed by the board info data
|
* r3: ptr to OF flat tree, followed by the board info data
|
||||||
* r4: physical pointer to the kernel itself
|
* r4: physical pointer to the kernel itself
|
||||||
* r5: NULL
|
* r5: NULL
|
||||||
* r6: NULL
|
* r6: NULL
|
||||||
* r7: NULL
|
* r7: NULL
|
||||||
*/
|
*/
|
||||||
if (getenv("disable_of") != NULL)
|
|
||||||
(*kernel) ((bd_t *)of_flat_tree, initrd_start, initrd_end,
|
|
||||||
cmd_start, cmd_end);
|
|
||||||
else {
|
|
||||||
ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
|
ft_setup(of_flat_tree, kbd, initrd_start, initrd_end);
|
||||||
/* ft_dump_blob(of_flat_tree); */
|
/* ft_dump_blob(of_flat_tree); */
|
||||||
|
|
||||||
(*kernel) ((bd_t *)of_flat_tree, (ulong)kernel, 0, 0, 0);
|
(*kernel) ((bd_t *)of_flat_tree, (ulong)kernel, 0, 0, 0);
|
||||||
}
|
#endif
|
||||||
#endif /* CONFIG_OF_FLAT_TREE */
|
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_PPC */
|
#endif /* CONFIG_PPC */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user