浏览代码

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>
Kumar Gala 16 年之前
父节点
当前提交
3216ca9692
共有 13 个文件被更改,包括 13 次插入73 次删除
  1. 2 3
      common/cmd_bootm.c
  2. 0 17
      common/image.c
  3. 1 5
      lib_arm/bootm.c
  4. 1 5
      lib_avr32/bootm.c
  5. 1 5
      lib_blackfin/bootm.c
  6. 1 5
      lib_i386/bootm.c
  7. 1 4
      lib_m68k/bootm.c
  8. 1 5
      lib_microblaze/bootm.c
  9. 1 5
      lib_mips/bootm.c
  10. 1 5
      lib_nios2/bootm.c
  11. 1 4
      lib_ppc/bootm.c
  12. 1 5
      lib_sh/bootm.c
  13. 1 5
      lib_sparc/bootm.c

+ 2 - 3
common/cmd_bootm.c

@@ -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;

+ 0 - 17
common/image.c

@@ -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

+ 1 - 5
lib_arm/bootm.c

@@ -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;
 }
 

+ 1 - 5
lib_avr32/bootm.c

@@ -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;
 }

+ 1 - 5
lib_blackfin/bootm.c

@@ -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);
 }

+ 1 - 5
lib_i386/bootm.c

@@ -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;
 }

+ 1 - 4
lib_m68k/bootm.c

@@ -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 ;
 }
 

+ 1 - 5
lib_microblaze/bootm.c

@@ -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;
 }

+ 1 - 5
lib_mips/bootm.c

@@ -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;
 }
 

+ 1 - 5
lib_nios2/bootm.c

@@ -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;
 }

+ 1 - 4
lib_ppc/bootm.c

@@ -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 ;
 }
 

+ 1 - 5
lib_sh/bootm.c

@@ -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;
 }

+ 1 - 5
lib_sparc/bootm.c

@@ -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;
 }