Merge branch 'master' of git://git.denx.de/u-boot-x86

* 'master' of git://git.denx.de/u-boot-x86:
  sc520: fix build warning about unused temp var
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
index 8f04ddb..fba5e01 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/cpu.c
@@ -226,12 +226,7 @@
 	}
 
 	debug("Starting %s process...\n", __FUNCTION__);
-#if !defined(CONFIG_SYS_HUSH_PARSER)
-	ret = run_command (s, 0);
-#else
-	ret = parse_string_outer(s, FLAG_PARSE_SEMICOLON
-				  | FLAG_EXIT_FROM_LOOP);
-#endif
+	ret = run_command(s, 0);
 	if (ret < 0)
 		debug("Error.. %s failed\n", __FUNCTION__);
 	else
diff --git a/arch/arm/cpu/armv7/imx-common/timer.c b/arch/arm/cpu/armv7/imx-common/timer.c
old mode 100755
new mode 100644
diff --git a/board/Marvell/db64360/db64360.c b/board/Marvell/db64360/db64360.c
index 5183466..6cae686 100644
--- a/board/Marvell/db64360/db64360.c
+++ b/board/Marvell/db64360/db64360.c
@@ -934,5 +934,9 @@
 
 int board_eth_init(bd_t *bis)
 {
-	return pci_eth_init(bis);
+	int ret;
+	ret = pci_eth_init(bis);
+	if (!ret)
+		ret = mv6436x_eth_initialize(bis);
+	return ret;
 }
diff --git a/board/Marvell/db64360/eth.h b/board/Marvell/db64360/eth.h
index aab32d2..6fbfdfe 100644
--- a/board/Marvell/db64360/eth.h
+++ b/board/Marvell/db64360/eth.h
@@ -39,5 +39,6 @@
 void db64360_eth0_disable(void);
 bool network_start(bd_t *bis);
 
+int mv6436x_eth_initialize(bd_t *);
 
 #endif /* __EVB64360_ETH_H__ */
diff --git a/board/Marvell/db64460/db64460.c b/board/Marvell/db64460/db64460.c
index a7836ed..d4f58b3 100644
--- a/board/Marvell/db64460/db64460.c
+++ b/board/Marvell/db64460/db64460.c
@@ -934,5 +934,9 @@
 
 int board_eth_init(bd_t *bis)
 {
-	return pci_eth_init(bis);
+	int ret;
+	ret = pci_eth_init(bis);
+	if (!ret)
+		ret = mv6446x_eth_initialize(bis);
+	return ret;
 }
diff --git a/board/Marvell/db64460/eth.h b/board/Marvell/db64460/eth.h
index 6c3b2e0..59cfd6f 100644
--- a/board/Marvell/db64460/eth.h
+++ b/board/Marvell/db64460/eth.h
@@ -38,4 +38,6 @@
 void db64460_eth0_disable(void);
 bool network_start(bd_t *bis);
 
+int mv6446x_eth_initialize(bd_t *);
+
 #endif /* __EVB64460_ETH_H__ */
diff --git a/board/esd/common/cmd_loadpci.c b/board/esd/common/cmd_loadpci.c
index 8f4ad84..8fcae63 100644
--- a/board/esd/common/cmd_loadpci.c
+++ b/board/esd/common/cmd_loadpci.c
@@ -110,7 +110,7 @@
 			 * Call run_cmd
 			 */
 			printf("running command at addr 0x%s ...\n", addr);
-			run_command((char*)la, 0);
+			run_command((char *)la, 0);
 			break;
 
 		default:
diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c
index 08311c9..98051fb 100644
--- a/board/esd/cpci750/cpci750.c
+++ b/board/esd/cpci750/cpci750.c
@@ -1101,3 +1101,8 @@
 	pldver, 1, 1, do_pldver,
 	"Show PLD version",
 	"Show PLD version)");
+
+int board_eth_init(bd_t *bis)
+{
+	return mv6436x_eth_initialize(bis);
+}
diff --git a/board/esd/cpci750/eth.h b/board/esd/cpci750/eth.h
index aab32d2..6fbfdfe 100644
--- a/board/esd/cpci750/eth.h
+++ b/board/esd/cpci750/eth.h
@@ -39,5 +39,6 @@
 void db64360_eth0_disable(void);
 bool network_start(bd_t *bis);
 
+int mv6436x_eth_initialize(bd_t *);
 
 #endif /* __EVB64360_ETH_H__ */
diff --git a/board/esd/du440/du440.c b/board/esd/du440/du440.c
index 426321e..1ada1bc 100644
--- a/board/esd/du440/du440.c
+++ b/board/esd/du440/du440.c
@@ -831,7 +831,7 @@
 	*d = '\0';
 
 	start = get_ticks();
-	ret = run_command (cmd, 0);
+	ret = run_command(cmd, 0);
 	end = get_ticks();
 
 	printf("ticks=%ld\n", (ulong)(end - start));
diff --git a/board/prodrive/p3mx/eth.h b/board/prodrive/p3mx/eth.h
index aab32d2..44ffba8 100644
--- a/board/prodrive/p3mx/eth.h
+++ b/board/prodrive/p3mx/eth.h
@@ -39,5 +39,6 @@
 void db64360_eth0_disable(void);
 bool network_start(bd_t *bis);
 
+int mv6446x_eth_initialize(bd_t *);
 
 #endif /* __EVB64360_ETH_H__ */
diff --git a/board/prodrive/p3mx/p3mx.c b/board/prodrive/p3mx/p3mx.c
index 09e4f82..389affc 100644
--- a/board/prodrive/p3mx/p3mx.c
+++ b/board/prodrive/p3mx/p3mx.c
@@ -851,3 +851,8 @@
 	       != temp);
 
 }
+
+int board_eth_init(bd_t *bis)
+{
+	return mv6446x_eth_initialize(bis);
+}
diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c
index 87b108f..9791423 100644
--- a/common/cmd_bedbug.c
+++ b/common/cmd_bedbug.c
@@ -84,7 +84,7 @@
 	len = dis_last_len;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/* New command */
@@ -123,7 +123,7 @@
 	int rcode = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	printf ("\nEnter '.' when done\n");
 	mem_addr = simple_strtoul (argv[1], NULL, 16);
@@ -237,7 +237,7 @@
 		if (len == -1)
 			printf ("<INTERRUPT>\n");
 		else
-			rc = run_command (lastcommand, flag);
+			rc = run_command(lastcommand, flag);
 
 		if (rc <= 0) {
 			/* invalid command or not repeatable, forget it */
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index 682f395..4c29fa3 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -102,7 +102,7 @@
 		addr = simple_strtoul(argv[1], NULL, 16);
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	return (bmp_info(addr));
@@ -126,7 +126,7 @@
 	        y = simple_strtoul(argv[3], NULL, 10);
 	        break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	 return (bmp_display(addr, x, y));
@@ -166,7 +166,7 @@
 	if (c)
 		return  c->cmd(cmdtp, flag, argc, argv);
 	else
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index 0afd939..a799b33 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -43,7 +43,7 @@
 	int     rcode = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul(argv[1], NULL, 16);
 
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index d5745b1..9304584 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -493,12 +493,12 @@
 		}
 	} else {
 		/* Unrecognized command */
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (images.state >= state) {
 		printf("Trying to execute a command out of order\n");
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	images.state |= state;
@@ -1045,14 +1045,8 @@
 {
 	int rcode = 0;
 
-#ifndef CONFIG_SYS_HUSH_PARSER
 	if (run_command(getenv("bootcmd"), flag) < 0)
 		rcode = 1;
-#else
-	if (parse_string_outer(getenv("bootcmd"),
-			FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0)
-		rcode = 1;
-#endif
 	return rcode;
 }
 
diff --git a/common/cmd_cache.c b/common/cmd_cache.c
index 9778d3b..8dca71f 100644
--- a/common/cmd_cache.c
+++ b/common/cmd_cache.c
@@ -54,7 +54,7 @@
 			icache_status() ? "ON" : "OFF");
 		return 0;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return 0;
 }
@@ -83,7 +83,7 @@
 			dcache_status() ? "ON" : "OFF");
 		return 0;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return 0;
 
diff --git a/common/cmd_dataflash_mmc_mux.c b/common/cmd_dataflash_mmc_mux.c
index 1678d6e..f8f1787 100644
--- a/common/cmd_dataflash_mmc_mux.c
+++ b/common/cmd_dataflash_mmc_mux.c
@@ -41,7 +41,7 @@
 			AT91F_GetMuxStatus () ? "MMC" : "SPI");
 		return 0;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return 0;
 }
diff --git a/common/cmd_date.c b/common/cmd_date.c
index f0fa02a..335bc05 100644
--- a/common/cmd_date.c
+++ b/common/cmd_date.c
@@ -93,8 +93,7 @@
 
 		break;
 	default:
-		cmd_usage(cmdtp);
-		rcode = 1;
+		rcode = CMD_RET_USAGE;
 	}
 
 	/* switch back to original I2C bus */
diff --git a/common/cmd_dcr.c b/common/cmd_dcr.c
index 568e226..d3bbc36 100644
--- a/common/cmd_dcr.c
+++ b/common/cmd_dcr.c
@@ -45,7 +45,7 @@
 
 	/* Validate arguments */
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Get a DCR */
 	dcrn = (unsigned short) simple_strtoul (argv[1], NULL, 16);
@@ -71,7 +71,7 @@
 
 	/* Validate arguments */
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Set a DCR */
 	dcrn = (unsigned short) simple_strtoul (argv[1], NULL, 16);
@@ -116,7 +116,7 @@
 
 	/* Validate arguments */
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Find out whether ther is '.' (dot) symbol in the first parameter. */
 	strncpy (buf, argv[1], sizeof(buf)-1);
@@ -170,7 +170,7 @@
 
 	/* Validate arguments */
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Find out whether ther is '.' (dot) symbol in the first parameter. */
 	strncpy (buf, argv[1], sizeof(buf)-1);
diff --git a/common/cmd_df.c b/common/cmd_df.c
index 9a3c84c..f7e5df3 100644
--- a/common/cmd_df.c
+++ b/common/cmd_df.c
@@ -27,7 +27,7 @@
 	}
 
 usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_eeprom.c b/common/cmd_eeprom.c
index a48b3d2..4a43116 100644
--- a/common/cmd_eeprom.c
+++ b/common/cmd_eeprom.c
@@ -104,7 +104,7 @@
 		}
 	}
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 #endif
 
diff --git a/common/cmd_ext2.c b/common/cmd_ext2.c
index 35fb361..79b1e2f 100644
--- a/common/cmd_ext2.c
+++ b/common/cmd_ext2.c
@@ -66,7 +66,7 @@
 	int part_length;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	dev = (int)simple_strtoul (argv[2], &ep, 16);
 	dev_desc = get_dev(argv[1],dev);
@@ -163,7 +163,7 @@
 		break;
 
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (!filename) {
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 4fe410d..66e0ef0 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -744,7 +744,7 @@
 		boot_drive=simple_strtoul(argv[2], NULL, 10);
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	/* setup FDC and scan for drives  */
 	if(fdc_setup(boot_drive,pCMD,pFG)==FALSE) {
diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c
index 04a5e01..fbee861 100644
--- a/common/cmd_fdos.c
+++ b/common/cmd_fdos.c
@@ -72,7 +72,7 @@
 	name = argv [2];
 	break;
     default:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
     }
 
     /* Init physical layer                                                   */
diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 9bdecca..9a5c53e 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -66,7 +66,7 @@
 int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Set the address of the fdt
@@ -123,7 +123,7 @@
 		int  err;
 
 		if (argc < 4)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		/*
 		 * Set the address and length of the fdt.
@@ -175,7 +175,7 @@
 		 * Parameters: Node path, new node to be appended to the path.
 		 */
 		if (argc < 4)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		pathp = argv[2];
 		nodep = argv[3];
@@ -211,7 +211,7 @@
 		 * Parameters: Node path, property, optional value.
 		 */
 		if (argc < 4)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		pathp  = argv[2];
 		prop   = argv[3];
@@ -409,7 +409,7 @@
 			}
 		} else {
 			/* Unrecognized command */
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 	}
 #ifdef CONFIG_OF_BOARD_SETUP
@@ -422,7 +422,7 @@
 		unsigned long initrd_start = 0, initrd_end = 0;
 
 		if ((argc != 2) && (argc != 4))
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		if (argc == 4) {
 			initrd_start = simple_strtoul(argv[2], NULL, 16);
@@ -438,7 +438,7 @@
 	}
 	else {
 		/* Unrecognized command */
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	return 0;
diff --git a/common/cmd_fitupd.c b/common/cmd_fitupd.c
index 4d1192b..7a3789e 100644
--- a/common/cmd_fitupd.c
+++ b/common/cmd_fitupd.c
@@ -20,7 +20,7 @@
 	ulong addr = 0UL;
 
 	if (argc > 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (argc == 2)
 		addr = simple_strtoul(argv[1], NULL, 16);
diff --git a/common/cmd_flash.c b/common/cmd_flash.c
index c6ea25a..0e9b2e3 100644
--- a/common/cmd_flash.c
+++ b/common/cmd_flash.c
@@ -335,7 +335,7 @@
 	int rcode = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strcmp(argv[1], "all") == 0) {
 		for (bank=1; bank<=CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
@@ -384,7 +384,7 @@
 #endif
 
 	if (argc != 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strcmp(argv[1], "bank") == 0) {
 		bank = simple_strtoul(argv[2], NULL, 16);
@@ -405,7 +405,7 @@
 	}
 
 	if (addr_first >= addr_last)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	rcode = flash_sect_erase(addr_first, addr_last);
 	return rcode;
@@ -475,7 +475,7 @@
 #endif
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 #if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH)
 	if (strcmp(argv[1], "off") == 0)
@@ -483,7 +483,7 @@
 	else if (strcmp(argv[1], "on") == 0)
 		p = 1;
 	else
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 #endif
 
 #ifdef CONFIG_HAS_DATAFLASH
@@ -583,7 +583,7 @@
 #endif
 
 	if (argc != 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strcmp(argv[2], "bank") == 0) {
 		bank = simple_strtoul(argv[3], NULL, 16);
@@ -623,7 +623,7 @@
 	}
 
 	if (addr_first >= addr_last)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	rcode = flash_sect_protect (p, addr_first, addr_last);
 #endif /* CONFIG_SYS_NO_FLASH */
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c
index 915a5c0..1834246 100644
--- a/common/cmd_fpga.c
+++ b/common/cmd_fpga.c
@@ -255,7 +255,7 @@
 
 	switch (op) {
 	case FPGA_NONE:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	case FPGA_INFO:
 		rc = fpga_info (dev);
@@ -334,7 +334,7 @@
 
 	default:
 		printf ("Unknown operation\n");
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return (rc);
 }
diff --git a/common/cmd_gpio.c b/common/cmd_gpio.c
index 9cc790a..47eee89 100644
--- a/common/cmd_gpio.c
+++ b/common/cmd_gpio.c
@@ -38,7 +38,7 @@
 
 	if (argc != 3)
  show_usage:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	str_cmd = argv[1];
 	str_gpio = argv[2];
 
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index e795139..2cdc4ed 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -190,7 +190,7 @@
 	u_char  *memaddr;
 
 	if (argc != 5)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * I2C chip address
@@ -204,7 +204,7 @@
 	devaddr = simple_strtoul(argv[2], NULL, 16);
 	alen = get_alen(argv[2]);
 	if (alen > 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Length is the number of objects, not number of bytes.
@@ -242,7 +242,7 @@
 	length = i2c_dp_last_length;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/*
@@ -261,7 +261,7 @@
 		addr = simple_strtoul(argv[2], NULL, 16);
 		alen = get_alen(argv[2]);
 		if (alen > 3)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		/*
 		 * If another parameter, it is the length to display.
@@ -330,7 +330,7 @@
 	int	count;
 
 	if ((argc < 4) || (argc > 5))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Chip is always specified.
@@ -343,7 +343,7 @@
 	addr = simple_strtoul(argv[2], NULL, 16);
 	alen = get_alen(argv[2]);
 	if (alen > 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Value to write is always specified.
@@ -392,7 +392,7 @@
 	ulong	err;
 
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Chip is always specified.
@@ -405,7 +405,7 @@
 	addr = simple_strtoul(argv[2], NULL, 16);
 	alen = get_alen(argv[2]);
 	if (alen > 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Count is always specified
@@ -451,7 +451,7 @@
 	int	nbytes;
 
 	if (argc != 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 #ifdef CONFIG_BOOT_RETRY_TIME
 	reset_cmd_timeout();	/* got a good command to get here */
@@ -482,7 +482,7 @@
 		addr = simple_strtoul(argv[2], NULL, 16);
 		alen = get_alen(argv[2]);
 		if (alen > 3)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 	}
 
 	/*
@@ -613,7 +613,7 @@
 	int	delay;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Chip is always specified.
@@ -626,7 +626,7 @@
 	addr = simple_strtoul(argv[2], NULL, 16);
 	alen = get_alen(argv[2]);
 	if (alen > 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Length is the number of objects, not number of bytes.
@@ -765,7 +765,7 @@
 	};
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * Chip is always specified.
@@ -1300,7 +1300,7 @@
 	cmd_tbl_t *c;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Strip off leading 'i2c' command argument */
 	argc--;
@@ -1309,9 +1309,9 @@
 	c = find_cmd_tbl(argv[0], &cmd_i2c_sub[0], ARRAY_SIZE(cmd_i2c_sub));
 
 	if (c)
-		return  c->cmd(cmdtp, flag, argc, argv);
+		return c->cmd(cmdtp, flag, argc, argv);
 	else
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 }
 
 /***************************************************/
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 305c602..3fb7506 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -179,7 +179,7 @@
 	switch (argc) {
 	case 0:
 	case 1:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	case 2:
 		if (strncmp(argv[1], "res", 3) == 0) {
 			puts("\nReset IDE"
@@ -232,7 +232,7 @@
 			}
 			return rcode;
 		}
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	case 3:
 		if (strncmp(argv[1], "dev", 3) == 0) {
 			int dev = (int) simple_strtoul(argv[2], NULL, 10);
@@ -266,7 +266,7 @@
 			return rcode;
 		}
 
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	default:
 		/* at least 4 args */
 
@@ -325,7 +325,7 @@
 			else
 				return 1;
 		} else {
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 
 		return rcode;
@@ -361,7 +361,7 @@
 		break;
 	default:
 		show_boot_progress(-42);
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	show_boot_progress(42);
 
diff --git a/common/cmd_irq.c b/common/cmd_irq.c
index d35a43f..9f158ef 100644
--- a/common/cmd_irq.c
+++ b/common/cmd_irq.c
@@ -28,7 +28,7 @@
 {
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* on */
 	if (strncmp(argv[1], "on", 2) == 0)
diff --git a/common/cmd_itest.c b/common/cmd_itest.c
index 2a238a4..d5df758 100644
--- a/common/cmd_itest.c
+++ b/common/cmd_itest.c
@@ -161,7 +161,7 @@
 
 	/* Validate arguments */
 	if ((argc != 4))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for a data width specification.
 	 * Defaults to long (4) if no specification.
diff --git a/common/cmd_led.c b/common/cmd_led.c
index f55f94c..d83b3ba 100644
--- a/common/cmd_led.c
+++ b/common/cmd_led.c
@@ -93,12 +93,12 @@
 
 	/* Validate arguments */
 	if ((argc != 3)) {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	cmd = get_led_cmd(argv[2]);
 	if (cmd < 0) {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	for (i = 0; led_commands[i].string; i++) {
@@ -132,7 +132,7 @@
 
 	/* If we ran out of matches, print Usage */
 	if (!match) {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	return 0;
diff --git a/common/cmd_load.c b/common/cmd_load.c
index dad0303..f4d66de 100644
--- a/common/cmd_load.c
+++ b/common/cmd_load.c
@@ -1102,7 +1102,7 @@
 			if (strcmp(argv[1], "on") == 0)
 				hwflow_onoff(1);
 			else
-				return cmd_usage(cmdtp);
+				return CMD_RET_USAGE;
 	}
 	printf("RTS/CTS hardware flow control: %s\n", hwflow_onoff(0) ? "on" : "off");
 	return 0;
diff --git a/common/cmd_log.c b/common/cmd_log.c
index 249614f..f9fbe00 100644
--- a/common/cmd_log.c
+++ b/common/cmd_log.c
@@ -241,10 +241,10 @@
 			}
 			return 0;
 		}
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 }
 
diff --git a/common/cmd_md5sum.c b/common/cmd_md5sum.c
index 629a74d..b93dd9b 100644
--- a/common/cmd_md5sum.c
+++ b/common/cmd_md5sum.c
@@ -32,7 +32,7 @@
 	u8 output[16];
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul(argv[1], NULL, 16);
 	len = simple_strtoul(argv[2], NULL, 16);
diff --git a/common/cmd_mdio.c b/common/cmd_mdio.c
index 4ac9de4..77d8df1 100644
--- a/common/cmd_mdio.c
+++ b/common/cmd_mdio.c
@@ -193,7 +193,7 @@
 	struct mii_dev *bus;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * We use the last specified parameters, unless new ones are
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index f7e76d6..fa6f599 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -74,7 +74,7 @@
 	length = dp_last_length;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/* New command specified.  Check for a size specification.
@@ -168,7 +168,7 @@
 	int	size;
 
 	if ((argc < 3) || (argc > 4))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for size specification.
 	*/
@@ -210,7 +210,7 @@
 	ulong count;
 
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	count = simple_strtoul(argv[3], NULL, 10);
 
@@ -237,7 +237,7 @@
 	ulong count;
 
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	count = simple_strtoul(argv[3], NULL, 10);
 
@@ -266,7 +266,7 @@
 	int     rcode = 0;
 
 	if (argc != 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for size specification.
 	*/
@@ -352,7 +352,7 @@
 	int	size;
 
 	if (argc != 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for size specification.
 	*/
@@ -478,7 +478,7 @@
 	volatile u_char	*cp;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for a size spefication.
 	 * Defaults to long if no or incorrect specification.
@@ -547,7 +547,7 @@
 	volatile u_char	*cp;
 
 	if (argc < 4)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Check for a size spefication.
 	 * Defaults to long if no or incorrect specification.
@@ -979,7 +979,7 @@
 	int	nbytes, size;
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 #ifdef CONFIG_BOOT_RETRY_TIME
 	reset_cmd_timeout();	/* got a good command to get here */
@@ -1084,7 +1084,7 @@
 	ulong *ptr;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul (argv[1], NULL, 16);
 	addr += base_address;
@@ -1118,7 +1118,7 @@
 
 	if (argc < 3) {
 usage:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	av = argv + 1;
diff --git a/common/cmd_mfsl.c b/common/cmd_mfsl.c
index 00180b0..ddf80d7 100644
--- a/common/cmd_mfsl.c
+++ b/common/cmd_mfsl.c
@@ -38,13 +38,13 @@
 	unsigned int blocking;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
 	blocking = (unsigned int)simple_strtoul (argv[2], NULL, 16);
 	if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER) {
 		puts ("Bad number of FSL\n");
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	switch (fslnum) {
@@ -193,13 +193,13 @@
 	unsigned int blocking;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
 	num = (unsigned int)simple_strtoul (argv[2], NULL, 16);
 	blocking = (unsigned int)simple_strtoul (argv[3], NULL, 16);
 	if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	switch (fslnum) {
 #if (XILINX_FSL_NUMBER > 0)
@@ -347,7 +347,7 @@
 	unsigned int val = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	reg = (unsigned int)simple_strtoul (argv[1], NULL, 16);
 	val = (unsigned int)simple_strtoul (argv[2], NULL, 16);
diff --git a/common/cmd_mgdisk.c b/common/cmd_mgdisk.c
index d99af2d..3bd2429 100644
--- a/common/cmd_mgdisk.c
+++ b/common/cmd_mgdisk.c
@@ -54,7 +54,7 @@
 			return 1;
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 	return 0;
 }
diff --git a/common/cmd_mii.c b/common/cmd_mii.c
index 23b723e..8df44cc 100644
--- a/common/cmd_mii.c
+++ b/common/cmd_mii.c
@@ -293,7 +293,7 @@
 	const char	*devname;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 #if defined(CONFIG_MII_INIT)
 	mii_init ();
@@ -420,7 +420,7 @@
 		else
 			miiphy_set_current_dev (argv[2]);
 	} else {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	/*
diff --git a/common/cmd_misc.c b/common/cmd_misc.c
index 061b1bb..973b1c2 100644
--- a/common/cmd_misc.c
+++ b/common/cmd_misc.c
@@ -33,7 +33,7 @@
 	ulong delay;
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	delay = simple_strtoul(argv[1], NULL, 10) * CONFIG_SYS_HZ;
 
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 8f13c22..750509d 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -32,7 +32,7 @@
 	int dev;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strcmp(argv[1], "init") == 0) {
 		if (argc == 2) {
@@ -43,7 +43,7 @@
 		} else if (argc == 3) {
 			dev = (int)simple_strtoul(argv[2], NULL, 10);
 		} else {
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 
 		if (mmc_legacy_init(dev) != 0) {
@@ -68,12 +68,12 @@
 #endif
 			curr_device = dev;
 		} else {
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 
 		printf("mmc%d is current device\n", curr_device);
 	} else {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	return 0;
@@ -153,7 +153,7 @@
 	enum mmc_state state;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (curr_device < 0) {
 		if (get_mmc_num() > 0)
@@ -216,7 +216,7 @@
 				return 1;
 			}
 		} else
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		mmc = find_mmc_device(dev);
 		if (!mmc) {
@@ -307,7 +307,7 @@
 		return (n == cnt) ? 0 : 1;
 	}
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_mmc_spi.c b/common/cmd_mmc_spi.c
index cfd0fb1..98cd788 100644
--- a/common/cmd_mmc_spi.c
+++ b/common/cmd_mmc_spi.c
@@ -78,8 +78,7 @@
 	return 0;
 
 usage:
-	cmd_usage(cmdtp);
-	return 1;
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_mp.c b/common/cmd_mp.c
index b115b59..4b27be4 100644
--- a/common/cmd_mp.c
+++ b/common/cmd_mp.c
@@ -29,7 +29,7 @@
 	unsigned long cpuid;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	cpuid = simple_strtoul(argv[1], NULL, 10);
 	if (!is_core_valid(cpuid)) {
@@ -46,17 +46,17 @@
 		else if (strncmp(argv[2], "disable", 7) == 0)
 			return cpu_disable(cpuid);
 		else
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 		return 0;
 	}
 
 	/* 4 or greater, make sure its release */
 	if (strncmp(argv[2], "release", 7) != 0)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (cpu_release(cpuid, argc - 3, argv + 3))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	return 0;
 }
diff --git a/common/cmd_mtdparts.c b/common/cmd_mtdparts.c
index b7c833b..2268829 100644
--- a/common/cmd_mtdparts.c
+++ b/common/cmd_mtdparts.c
@@ -2035,7 +2035,7 @@
 		return spread_partitions();
 #endif /* CONFIG_CMD_MTDPARTS_SPREAD */
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 /***************************************************/
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index fa96a52..035a6f6 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -358,7 +358,7 @@
 	return ret;
 
 usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 #endif
@@ -720,7 +720,7 @@
 #endif
 
 usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
@@ -909,7 +909,7 @@
 usage:
 #endif
 		show_boot_progress(-53);
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	show_boot_progress(53);
diff --git a/common/cmd_net.c b/common/cmd_net.c
index 89519fa..3dd6810 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -231,7 +231,7 @@
 #endif
 	default:
 		show_boot_progress (-80);
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	show_boot_progress (80);
@@ -271,7 +271,7 @@
 
 	NetPingIP = string_to_ip(argv[1]);
 	if (NetPingIP == 0)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (NetLoop(PING) < 0) {
 		printf("ping failed; host %s is not alive\n", argv[1]);
@@ -377,7 +377,7 @@
 int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc == 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * We should check for a valid hostname:
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 20080dc..22f9821 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -173,7 +173,7 @@
 	int rcode = 1, arg = 1, idx;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	memset(matched, 0, env_htab.size / 8);
 
@@ -411,7 +411,7 @@
 int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	return _do_env_set(flag, argc, argv);
 }
@@ -435,7 +435,7 @@
 	/* Check the syntax */
 	switch (argc) {
 	case 1:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	case 2:		/* env_ask envname */
 		sprintf(message, "Please enter '%s':", argv[1]);
@@ -493,7 +493,7 @@
 	char *init_val;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* Set read buffer to initial value or empty sting */
 	init_val = getenv(argv[1]);
@@ -631,7 +631,7 @@
 			  int argc, char * const argv[])
 {
 	if (argc != 2 || strcmp(argv[1], "-f") != 0)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	set_default_env("## Resetting to default environment\n");
 	return 0;
@@ -730,14 +730,14 @@
 				sep = '\n';
 				break;
 			default:
-				return cmd_usage(cmdtp);
+				return CMD_RET_USAGE;
 			}
 		}
 NXTARG:		;
 	}
 
 	if (argc < 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = (char *)simple_strtoul(argv[0], NULL, 16);
 
@@ -838,13 +838,13 @@
 				del = 1;
 				break;
 			default:
-				return cmd_usage(cmdtp);
+				return CMD_RET_USAGE;
 			}
 		}
 	}
 
 	if (argc < 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (!fmt)
 		printf("## Warning: defaulting to text format\n");
@@ -944,7 +944,7 @@
 	cmd_tbl_t *cp;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* drop initial "env" arg */
 	argc--;
@@ -955,7 +955,7 @@
 	if (cp)
 		return cp->cmd(cmdtp, flag, argc, argv);
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index a27adaa..0f2e208 100644
--- a/common/cmd_onenand.c
+++ b/common/cmd_onenand.c
@@ -390,7 +390,7 @@
 	size_t retlen = 0;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	s = strchr(argv[0], '.');
 	if ((s != NULL) && (!strcmp(s, ".oob")))
@@ -417,7 +417,7 @@
 	size_t retlen = 0;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (strncmp(argv[0] + 6, "yaffs", 5) == 0)
 		withoob = 1;
@@ -503,7 +503,7 @@
 	char *s;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	s = strchr(argv[0], '.');
 	ofs = (int)simple_strtoul(argv[1], NULL, 16);
@@ -525,7 +525,7 @@
 	argv += 2;
 
 	if (argc <= 0)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	while (argc > 0) {
 		addr = simple_strtoul(*argv, NULL, 16);
@@ -569,7 +569,7 @@
 	cmd_tbl_t *c;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	mtd = &onenand_mtd;
 
@@ -582,7 +582,7 @@
 	if (c)
 		return c->cmd(cmdtp, flag, argc, argv);
 	else
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_otp.c b/common/cmd_otp.c
index eb93eb2..6f93335 100644
--- a/common/cmd_otp.c
+++ b/common/cmd_otp.c
@@ -89,7 +89,7 @@
 
 	if (argc < 4) {
  usage:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	prompt_user = false;
diff --git a/common/cmd_pci.c b/common/cmd_pci.c
index 1e477bc..a1fe519 100644
--- a/common/cmd_pci.c
+++ b/common/cmd_pci.c
@@ -480,7 +480,7 @@
 
 	return 1;
  usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 /***************************************************/
diff --git a/common/cmd_portio.c b/common/cmd_portio.c
index 4f2f499..eae8f07 100644
--- a/common/cmd_portio.c
+++ b/common/cmd_portio.c
@@ -44,7 +44,7 @@
 	uint value = out_last_value;
 
 	if (argc != 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/*
@@ -102,7 +102,7 @@
 	uint size = in_last_size;
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		/*
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 7c0cb66..8a68fa1 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -322,7 +322,7 @@
 	int err;
 
 	if (argc != 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 
 	pxefile_addr_str = from_env("pxefile_addr_r");
@@ -537,7 +537,7 @@
 
 	printf("running: %s\n", dupcmd);
 
-	ret = run_command2(dupcmd, 0);
+	ret = run_command(dupcmd, 0);
 
 	free(dupcmd);
 
@@ -1312,7 +1312,7 @@
 	} else if (argc == 2) {
 		pxefile_addr_str = argv[1];
 	} else {
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (strict_strtoul(pxefile_addr_str, 16, &pxefile_addr_r) < 0) {
@@ -1344,7 +1344,7 @@
 	cmd_tbl_t *cp;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/* drop initial "pxe" arg */
 	argc--;
@@ -1355,7 +1355,7 @@
 	if (cp)
 		return cp->cmd(cmdtp, flag, argc, argv);
 
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_reiser.c b/common/cmd_reiser.c
index ced1d40..fbb9484 100644
--- a/common/cmd_reiser.c
+++ b/common/cmd_reiser.c
@@ -57,7 +57,7 @@
 	int part_length;
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	dev = (int)simple_strtoul (argv[2], &ep, 16);
 	dev_desc = get_dev(argv[1],dev);
@@ -149,7 +149,7 @@
 		break;
 
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (!filename) {
diff --git a/common/cmd_sata.c b/common/cmd_sata.c
index f62c0cb..7b1703f 100644
--- a/common/cmd_sata.c
+++ b/common/cmd_sata.c
@@ -79,7 +79,7 @@
 	switch (argc) {
 	case 0:
 	case 1:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	case 2:
 		if (strncmp(argv[1],"inf", 3) == 0) {
 			int i;
@@ -116,7 +116,7 @@
 			}
 			return rc;
 		}
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	case 3:
 		if (strncmp(argv[1], "dev", 3) == 0) {
 			int dev = (int)simple_strtoul(argv[2], NULL, 10);
@@ -147,7 +147,7 @@
 			}
 			return rc;
 		}
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	default: /* at least 4 args */
 		if (strcmp(argv[1], "read") == 0) {
@@ -183,7 +183,7 @@
 				n, (n == cnt) ? "OK" : "ERROR");
 			return (n == cnt) ? 0 : 1;
 		} else {
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 		}
 
 		return rc;
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index fa10751..d15b567 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -230,7 +230,7 @@
 		boot_device = argv[2];
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (!boot_device) {
@@ -336,10 +336,11 @@
 int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	switch (argc) {
-    case 0:
-    case 1:	return cmd_usage(cmdtp);
+	case 0:
+	case 1:
+		return CMD_RET_USAGE;
 
-    case 2:
+	case 2:
 			if (strncmp(argv[1],"res",3) == 0) {
 				printf("\nReset SCSI\n");
 				scsi_bus_reset();
@@ -384,7 +385,7 @@
 					printf("\nno SCSI devices available\n");
 				return 1;
 			}
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 	case 3:
 			if (strncmp(argv[1],"dev",3) == 0) {
 				int dev = (int)simple_strtoul(argv[2], NULL, 10);
@@ -412,7 +413,7 @@
 				}
 				return 1;
 			}
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
     default:
 			/* at least 4 args */
 			if (strcmp(argv[1],"read") == 0) {
@@ -427,7 +428,7 @@
 				return 0;
 			}
 	} /* switch */
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 /****************************************************************************************
diff --git a/common/cmd_setexpr.c b/common/cmd_setexpr.c
index 1ff1232..1b3edb7 100644
--- a/common/cmd_setexpr.c
+++ b/common/cmd_setexpr.c
@@ -58,7 +58,7 @@
 
 	/* Validate arguments */
 	if ((argc != 5) || (strlen(argv[3]) != 1))
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	w = cmd_get_data_size(argv[0], 4);
 
diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index 98e4162..9c76464 100644
--- a/common/cmd_sf.c
+++ b/common/cmd_sf.c
@@ -298,7 +298,7 @@
 		return ret;
 
 usage:
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 U_BOOT_CMD(
diff --git a/common/cmd_sha1sum.c b/common/cmd_sha1sum.c
index 2b2dd8b..2713a14 100644
--- a/common/cmd_sha1sum.c
+++ b/common/cmd_sha1sum.c
@@ -32,7 +32,7 @@
 	u8 output[20];
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul(argv[1], NULL, 16);
 	len = simple_strtoul(argv[2], NULL, 16);
diff --git a/common/cmd_source.c b/common/cmd_source.c
index 16a627a..32fff5c 100644
--- a/common/cmd_source.c
+++ b/common/cmd_source.c
@@ -179,7 +179,7 @@
 				if (*line) {
 					debug ("** exec: \"%s\"\n",
 						line);
-					if (run_command (line, 0) < 0) {
+					if (run_command(line, 0) < 0) {
 						rcode = 1;
 						break;
 					}
diff --git a/common/cmd_strings.c b/common/cmd_strings.c
index 2986324..41b1665 100644
--- a/common/cmd_strings.c
+++ b/common/cmd_strings.c
@@ -15,7 +15,7 @@
 int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc == 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((flag & CMD_FLAG_REPEAT) == 0) {
 		start_addr = (char *)simple_strtoul(argv[1], NULL, 16);
diff --git a/common/cmd_time.c b/common/cmd_time.c
index c937ae4..6dbdbbf 100644
--- a/common/cmd_time.c
+++ b/common/cmd_time.c
@@ -38,7 +38,7 @@
 		return 1;
 	}
 	if (argc > cmdtp->maxargs)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	/*
 	 * TODO(clchiou): get_timer_masked() is only defined in certain ARM
@@ -77,7 +77,7 @@
 	int retval = 0;
 
 	if (argc == 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	retval = run_command_and_time_it(0, argc - 1, argv + 1, &cycles);
 	report_time(cycles);
diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c
index 8c1bc23..35b1d31 100644
--- a/common/cmd_ubi.c
+++ b/common/cmd_ubi.c
@@ -438,7 +438,7 @@
 	int err = 0;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (mtdparts_init() != 0) {
 		printf("Error initializing mtdparts!\n");
@@ -465,7 +465,7 @@
 		}
 
 		if (argc < 3)
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 
 #ifdef CONFIG_CMD_UBIFS
 		/*
diff --git a/common/cmd_ubifs.c b/common/cmd_ubifs.c
index 3cd2d8f..7752123 100644
--- a/common/cmd_ubifs.c
+++ b/common/cmd_ubifs.c
@@ -53,7 +53,7 @@
 	int ret;
 
 	if (argc != 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	vol_name = argv[1];
 	debug("Using volume %s\n", vol_name);
@@ -94,7 +94,7 @@
 int do_ubifs_umount(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	if (argc != 1)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if (ubifs_initialized == 0) {
 		printf("No UBIFS volume mounted!\n");
@@ -141,18 +141,18 @@
 	}
 
 	if (argc < 3)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	addr = simple_strtoul(argv[1], &endp, 16);
 	if (endp == argv[1])
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	filename = argv[2];
 
 	if (argc == 4) {
 		size = simple_strtoul(argv[3], &endp, 16);
 		if (endp == argv[3])
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 	}
 	debug("Loading file '%s' to address 0x%08x (size %d)\n", filename, addr, size);
 
diff --git a/common/cmd_unzip.c b/common/cmd_unzip.c
index 6483b92..43ed791 100644
--- a/common/cmd_unzip.c
+++ b/common/cmd_unzip.c
@@ -39,7 +39,7 @@
 			dst = simple_strtoul(argv[2], NULL, 16);
 			break;
 		default:
-			return cmd_usage(cmdtp);
+			return CMD_RET_USAGE;
 	}
 
 	if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0)
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 320667f..4a86590 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -379,7 +379,7 @@
 		boot_device = argv[2];
 		break;
 	default:
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 	}
 
 	if (!boot_device) {
@@ -509,7 +509,7 @@
 #endif
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	if ((strncmp(argv[1], "reset", 5) == 0) ||
 		 (strncmp(argv[1], "start", 5) == 0)) {
@@ -694,7 +694,7 @@
 		return 0;
 	}
 #endif /* CONFIG_USB_STORAGE */
-	return cmd_usage(cmdtp);
+	return CMD_RET_USAGE;
 }
 
 #ifdef CONFIG_USB_STORAGE
diff --git a/common/command.c b/common/command.c
index c5cecd3..aa0fb0a 100644
--- a/common/command.c
+++ b/common/command.c
@@ -487,3 +487,63 @@
 	}
 }
 #endif
+
+/**
+ * Call a command function. This should be the only route in U-Boot to call
+ * a command, so that we can track whether we are waiting for input or
+ * executing a command.
+ *
+ * @param cmdtp		Pointer to the command to execute
+ * @param flag		Some flags normally 0 (see CMD_FLAG_.. above)
+ * @param argc		Number of arguments (arg 0 must be the command text)
+ * @param argv		Arguments
+ * @return 0 if command succeeded, else non-zero (CMD_RET_...)
+ */
+static int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	int result;
+
+	result = (cmdtp->cmd)(cmdtp, flag, argc, argv);
+	if (result)
+		debug("Command failed, result=%d", result);
+	return result;
+}
+
+enum command_ret_t cmd_process(int flag, int argc, char * const argv[],
+			       int *repeatable)
+{
+	enum command_ret_t rc = CMD_RET_SUCCESS;
+	cmd_tbl_t *cmdtp;
+
+	/* Look up command in command table */
+	cmdtp = find_cmd(argv[0]);
+	if (cmdtp == NULL) {
+		printf("Unknown command '%s' - try 'help'\n", argv[0]);
+		return 1;
+	}
+
+	/* found - check max args */
+	if (argc > cmdtp->maxargs)
+		rc = CMD_RET_USAGE;
+
+#if defined(CONFIG_CMD_BOOTD)
+	/* avoid "bootd" recursion */
+	else if (cmdtp->cmd == do_bootd) {
+		if (flag & CMD_FLAG_BOOTD) {
+			puts("'bootd' recursion detected\n");
+			rc = CMD_RET_FAILURE;
+		} else {
+			flag |= CMD_FLAG_BOOTD;
+		}
+	}
+#endif
+
+	/* If OK so far, then do the command */
+	if (!rc) {
+		rc = cmd_call(cmdtp, flag, argc, argv);
+		*repeatable &= cmdtp->repeatable;
+	}
+	if (rc == CMD_RET_USAGE)
+		rc = cmd_usage(cmdtp);
+	return rc;
+}
diff --git a/common/hush.c b/common/hush.c
index e8e24d7..672ab9e 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1538,7 +1538,6 @@
 	int nextin;
 	int flag = do_repeat ? CMD_FLAG_REPEAT : 0;
 	struct child_prog *child;
-	cmd_tbl_t *cmdtp;
 	char *p;
 # if __GNUC__
 	/* Avoid longjmp clobbering */
@@ -1642,62 +1641,30 @@
 				 * Is it really safe for inline use?  Experimentally,
 				 * things seem to work with glibc. */
 				setup_redirects(child, squirrel);
-#else
-			/* check ";", because ,example , argv consist from
-			 * "help;flinfo" must not execute
-			 */
-			if (strchr(child->argv[i], ';')) {
-				printf ("Unknown command '%s' - try 'help' or use 'run' command\n",
-					child->argv[i]);
-				return -1;
-			}
-			/* Look up command in command table */
 
-
-			if ((cmdtp = find_cmd(child->argv[i])) == NULL) {
-				printf ("Unknown command '%s' - try 'help'\n", child->argv[i]);
-				return -1;	/* give up after bad command */
-			} else {
-				int rcode;
-#if defined(CONFIG_CMD_BOOTD)
-				/* avoid "bootd" recursion */
-				if (cmdtp->cmd == do_bootd) {
-					if (flag & CMD_FLAG_BOOTD) {
-						printf ("'bootd' recursion detected\n");
-						return -1;
-					}
-				else
-					flag |= CMD_FLAG_BOOTD;
-				}
-#endif
-				/* found - check max args */
-				if ((child->argc - i) > cmdtp->maxargs)
-					return cmd_usage(cmdtp);
-#endif
-				child->argv+=i;  /* XXX horrible hack */
-#ifndef __U_BOOT__
+				child->argv += i;  /* XXX horrible hack */
 				rcode = x->function(child);
-#else
-				/* OK - call function to do the command */
-
-				rcode = (cmdtp->cmd)
-(cmdtp, flag,child->argc-i,&child->argv[i]);
-				if ( !cmdtp->repeatable )
-					flag_repeat = 0;
-
-
-#endif
-				child->argv-=i;  /* XXX restore hack so free() can work right */
-#ifndef __U_BOOT__
-
+				/* XXX restore hack so free() can work right */
+				child->argv -= i;
 				restore_redirects(squirrel);
-#endif
-
-				return rcode;
 			}
+			return rcode;
 		}
-#ifndef __U_BOOT__
+#else
+		/* check ";", because ,example , argv consist from
+		 * "help;flinfo" must not execute
+		 */
+		if (strchr(child->argv[i], ';')) {
+			printf("Unknown command '%s' - try 'help' or use "
+					"'run' command\n", child->argv[i]);
+			return -1;
+		}
+		/* Process the command */
+		return cmd_process(flag, child->argc, child->argv,
+				   &flag_repeat);
+#endif
 	}
+#ifndef __U_BOOT__
 
 	for (i = 0; i < pi->num_progs; i++) {
 		child = & (pi->progs[i]);
diff --git a/common/main.c b/common/main.c
index 91e888f..db181d3 100644
--- a/common/main.c
+++ b/common/main.c
@@ -267,28 +267,6 @@
 # endif	/* CONFIG_AUTOBOOT_KEYED */
 #endif	/* CONFIG_BOOTDELAY >= 0  */
 
-/*
- * Return 0 on success, or != 0 on error.
- */
-#ifndef CONFIG_CMD_PXE
-static inline
-#endif
-int run_command2(const char *cmd, int flag)
-{
-#ifndef CONFIG_SYS_HUSH_PARSER
-	/*
-	 * run_command can return 0 or 1 for success, so clean up its result.
-	 */
-	if (run_command(cmd, flag) == -1)
-		return 1;
-
-	return 0;
-#else
-	return parse_string_outer(cmd,
-			FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
-#endif
-}
-
 /****************************************************************************/
 
 void main_loop (void)
@@ -355,7 +333,7 @@
 		int prev = disable_ctrlc(1);	/* disable Control C checking */
 # endif
 
-		run_command2(p, 0);
+		run_command(p, 0);
 
 # ifdef CONFIG_AUTOBOOT_KEYED
 		disable_ctrlc(prev);	/* restore Control C checking */
@@ -403,7 +381,7 @@
 		int prev = disable_ctrlc(1);	/* disable Control C checking */
 # endif
 
-		run_command2(s, 0);
+		run_command(s, 0);
 
 # ifdef CONFIG_AUTOBOOT_KEYED
 		disable_ctrlc(prev);	/* restore Control C checking */
@@ -414,7 +392,7 @@
 	if (menukey == CONFIG_MENUKEY) {
 		s = getenv("menucmd");
 		if (s)
-			run_command2(s, 0);
+			run_command(s, 0);
 	}
 #endif /* CONFIG_MENUKEY */
 #endif /* CONFIG_BOOTDELAY */
@@ -460,7 +438,7 @@
 		if (len == -1)
 			puts ("<INTERRUPT>\n");
 		else
-			rc = run_command (lastcommand, flag);
+			rc = run_command(lastcommand, flag);
 
 		if (rc <= 0) {
 			/* invalid command or not repeatable, forget it */
@@ -1154,6 +1132,7 @@
 
 /****************************************************************************/
 
+#ifndef CONFIG_SYS_HUSH_PARSER
 static void process_macros (const char *input, char *output)
 {
 	char c, prev;
@@ -1280,10 +1259,8 @@
  * the environment data, which may change magicly when the command we run
  * creates or modifies environment variables (like "bootp" does).
  */
-
-int run_command (const char *cmd, int flag)
+static int builtin_run_command(const char *cmd, int flag)
 {
-	cmd_tbl_t *cmdtp;
 	char cmdbuf[CONFIG_SYS_CBSIZE];	/* working copy of cmd		*/
 	char *token;			/* start of token in cmdbuf	*/
 	char *sep;			/* end of token (separator) in cmdbuf */
@@ -1361,42 +1338,7 @@
 			continue;
 		}
 
-		/* Look up command in command table */
-		if ((cmdtp = find_cmd(argv[0])) == NULL) {
-			printf ("Unknown command '%s' - try 'help'\n", argv[0]);
-			rc = -1;	/* give up after bad command */
-			continue;
-		}
-
-		/* found - check max args */
-		if (argc > cmdtp->maxargs) {
-			cmd_usage(cmdtp);
-			rc = -1;
-			continue;
-		}
-
-#if defined(CONFIG_CMD_BOOTD)
-		/* avoid "bootd" recursion */
-		if (cmdtp->cmd == do_bootd) {
-#ifdef DEBUG_PARSER
-			printf ("[%s]\n", finaltoken);
-#endif
-			if (flag & CMD_FLAG_BOOTD) {
-				puts ("'bootd' recursion detected\n");
-				rc = -1;
-				continue;
-			} else {
-				flag |= CMD_FLAG_BOOTD;
-			}
-		}
-#endif
-
-		/* OK - call function to do the command */
-		if ((cmdtp->cmd) (cmdtp, flag, argc, argv) != 0) {
-			rc = -1;
-		}
-
-		repeatable &= cmdtp->repeatable;
+		rc = cmd_process(flag, argc, argv, &repeatable);
 
 		/* Did the user stop this? */
 		if (had_ctrlc ())
@@ -1405,6 +1347,31 @@
 
 	return rc ? rc : repeatable;
 }
+#endif
+
+/*
+ * Run a command using the selected parser.
+ *
+ * @param cmd	Command to run
+ * @param flag	Execution flags (CMD_FLAG_...)
+ * @return 0 on success, or != 0 on error.
+ */
+int run_command(const char *cmd, int flag)
+{
+#ifndef CONFIG_SYS_HUSH_PARSER
+	/*
+	 * builtin_run_command can return 0 or 1 for success, so clean up
+	 * its result.
+	 */
+	if (builtin_run_command(cmd, flag) == -1)
+		return 1;
+
+	return 0;
+#else
+	return parse_string_outer(cmd,
+			FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
+#endif
+}
 
 /****************************************************************************/
 
@@ -1414,7 +1381,7 @@
 	int i;
 
 	if (argc < 2)
-		return cmd_usage(cmdtp);
+		return CMD_RET_USAGE;
 
 	for (i=1; i<argc; ++i) {
 		char *arg;
@@ -1424,7 +1391,7 @@
 			return 1;
 		}
 
-		if (run_command2(arg, flag) != 0)
+		if (run_command(arg, flag) != 0)
 			return 1;
 	}
 	return 0;
diff --git a/drivers/fpga/ivm_core.c b/drivers/fpga/ivm_core.c
old mode 100755
new mode 100644
diff --git a/include/command.h b/include/command.h
index 3912b80..6e1bdc2 100644
--- a/include/command.h
+++ b/include/command.h
@@ -112,6 +112,35 @@
 #endif
 extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 
+/*
+ * Error codes that commands return to cmd_process(). We use the standard 0
+ * and 1 for success and failure, but add one more case - failure with a
+ * request to call cmd_usage(). But the cmd_process() function handles
+ * CMD_RET_USAGE itself and after calling cmd_usage() it will return 1.
+ * This is just a convenience for commands to avoid them having to call
+ * cmd_usage() all over the place.
+ */
+enum command_ret_t {
+	CMD_RET_SUCCESS,	/* 0 = Success */
+	CMD_RET_FAILURE,	/* 1 = Failure */
+	CMD_RET_USAGE = -1,	/* Failure, please report 'usage' error */
+};
+
+/**
+ * Process a command with arguments. We look up the command and execute it
+ * if valid. Otherwise we print a usage message.
+ *
+ * @param flag		Some flags normally 0 (see CMD_FLAG_.. above)
+ * @param argc		Number of arguments (arg 0 must be the command text)
+ * @param argv		Arguments
+ * @param repeatable	This function sets this to 0 if the command is not
+ *			repeatable. If the command is repeatable, the value
+ *			is left unchanged.
+ * @return 0 if the command succeeded, 1 if it failed
+ */
+int cmd_process(int flag, int argc, char * const argv[],
+			       int *repeatable);
+
 #endif	/* __ASSEMBLY__ */
 
 /*
@@ -150,4 +179,5 @@
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
 #endif
+
 #endif	/* __COMMAND_H */
diff --git a/include/common.h b/include/common.h
index a2c6b27..0bda049 100644
--- a/include/common.h
+++ b/include/common.h
@@ -260,10 +260,7 @@
 
 /* common/main.c */
 void	main_loop	(void);
-int	run_command	(const char *cmd, int flag);
-#ifdef CONFIG_CMD_PXE
-int run_command2(const char *cmd, int flag);
-#endif
+int run_command(const char *cmd, int flag);
 int	readline	(const char *const prompt);
 int	readline_into_buffer(const char *const prompt, char *buffer,
 			int timeout);
diff --git a/include/lattice.h b/include/lattice.h
old mode 100755
new mode 100644
diff --git a/net/eth.c b/net/eth.c
index 3fb5fb6..f14767b 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -81,9 +81,6 @@
 int cpu_eth_init(bd_t *bis) __attribute__((weak, alias("__def_eth_init")));
 int board_eth_init(bd_t *bis) __attribute__((weak, alias("__def_eth_init")));
 
-extern int mv6436x_eth_initialize(bd_t *);
-extern int mv6446x_eth_initialize(bd_t *);
-
 #ifdef CONFIG_API
 extern void (*push_packet)(volatile void *, int);
 
@@ -281,12 +278,6 @@
 	} else
 		printf("Net Initialization Skipped\n");
 
-#if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)
-	mv6436x_eth_initialize(bis);
-#endif
-#if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
-	mv6446x_eth_initialize(bis);
-#endif
 	if (!eth_devices) {
 		puts ("No ethernet found.\n");
 		show_boot_progress (-64);