Fix fallout from autostart revert

The autostart revert caused a bit of duplicated code as well as
code that was using images->autostart that needs to get removed so
we can build again.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
Kumar Gala 2008-08-11 09:20:53 -05:00 committed by Wolfgang Denk
parent 3cf8a234b8
commit 3216ca9692
13 changed files with 13 additions and 73 deletions

View File

@ -361,10 +361,9 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
show_boot_progress (-9);
#ifdef DEBUG
puts ("\n## Control returned to monitor - resetting...\n");
if (images.autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
#endif
if (!images.autostart && iflag)
if (iflag)
enable_interrupts();
return 1;

View File

@ -189,23 +189,6 @@ int image_check_dcrc (image_header_t *hdr)
return (dcrc == image_get_dcrc (hdr));
}
void memmove_wd (void *to, void *from, size_t len, ulong chunksz)
{
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
while (len > 0) {
size_t tail = (len > chunksz) ? chunksz : len;
WATCHDOG_RESET ();
memmove (to, from, tail);
to += tail;
from += tail;
len -= tail;
}
#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
memmove (to, from, len);
#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
}
#endif /* USE_HOSTCC */
/**
* image_multi_count - get component (sub-image) count
* @hdr: pointer to the header of the multi component image

View File

@ -137,9 +137,6 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
setup_end_tag (bd);
#endif
if (!images->autostart)
return ;
/* we assume that the kernel is in place */
printf ("\nStarting kernel ...\n\n");
@ -157,8 +154,7 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return;
}

View File

@ -221,9 +221,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
params = setup_ethernet_tags(params);
setup_end_tag(params);
if (!images->autostart)
return ;
printf("\nStarting kernel at %p (params at %p)...\n\n",
theKernel, params_start);
@ -234,7 +231,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return;
}

View File

@ -40,9 +40,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
char *cmdline;
ulong ep = 0;
if (!images->autostart)
return;
#ifdef SHARED_RESOURCES
swap_to(FLASH);
#endif
@ -74,6 +71,5 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
}

View File

@ -84,9 +84,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
}
if (!images->autostart)
return ;
#ifdef DEBUG
printf ("## Transferring control to Linux (at address %08x) ...\n",
(u32)base_ptr);
@ -100,7 +97,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return;
}

View File

@ -129,8 +129,6 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag,
show_boot_progress (15);
if (!images->autostart)
return;
/*
* Linux Kernel Parameters (passing board info data):
* r3: ptr to board info data
@ -144,8 +142,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag,
return ;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return ;
}

View File

@ -67,15 +67,11 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
(ulong) theKernel);
#endif
if (!images->autostart)
return ;
theKernel (commandline);
/* does not return */
return;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return;
}

View File

@ -120,9 +120,6 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
linux_env_set("eth1addr", cp);
}
if (!images->autostart)
return ;
/* we assume that the kernel is in place */
printf ("\nStarting kernel ...\n\n");
@ -131,8 +128,7 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
return;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return;
}

View File

@ -50,9 +50,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
}
void (*kernel)(void) = (void (*)(void))ep;
if (!images->autostart)
return ;
/* For now we assume the Microtronix linux ... which only
* needs to be called ;-)
*/
@ -61,7 +58,6 @@ void do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return;
}

View File

@ -277,8 +277,6 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
unlock_ram_in_cache();
#endif
if (!images->autostart)
return ;
#if defined(CONFIG_OF_LIBFDT)
if (of_flat_tree) { /* device tree; boot new style */
@ -311,8 +309,7 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return ;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return ;
}

View File

@ -83,9 +83,6 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
}
void (*kernel) (void) = (void (*)(void))ep;
if (!images->autostart)
return ;
/* Setup parameters */
memset(PARAM, 0, 0x1000); /* Clear zero page */
strcpy(COMMAND_LINE, bootargs);
@ -95,7 +92,6 @@ void do_bootm_linux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
return;
error:
if (images->autostart)
do_reset (cmdtp, flag, argc, argv);
do_reset (cmdtp, flag, argc, argv);
return;
}

View File

@ -204,9 +204,6 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
bootargs = getenv("bootargs");
prepare_bootargs(bootargs);
if (!images->autostart)
return;
/* turn on mmu & setup context table & page table for process 0 (kernel) */
srmmu_init_cpu((unsigned int)kernel);
@ -220,7 +217,6 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
while (1) ;
error:
if (images->autostart)
do_reset(cmdtp, flag, argc, argv);
do_reset(cmdtp, flag, argc, argv);
return;
}